|
|
@ -1,18 +1,9 @@ |
|
|
|
<template> |
|
|
|
<view class="m-2" v-if="globals && globals.length"> |
|
|
|
<!-- <u-card @click="openCard" :show-foot="false" :show-head="false" style="max-height: 218rpx" border-radius="25" margin="0"> --> |
|
|
|
<u-card @click="openCard" :show-foot="false" :show-head="false" style="max-height: 218rpx" border-radius="25" margin="0"> |
|
|
|
<!-- :style="{ 'max-height': isShrink ? '106rpx' : '340rpx' }" --> |
|
|
|
<u-card |
|
|
|
@click="openCard" |
|
|
|
:show-foot="false" |
|
|
|
:show-head="false" |
|
|
|
:style="{ 'min-height': '42px', 'max-height': globalsHeight + 'px' }" |
|
|
|
border-radius="25" |
|
|
|
margin="0" |
|
|
|
> |
|
|
|
<view slot="body"> |
|
|
|
<scroll-view :scrollY="true" :style="{ 'min-height': '24rpx', 'max-height': globalsHeight - 30 + 'px' }"> |
|
|
|
<!-- <scroll-view :scrollY="true" style="max-height: 280rpx"> --> |
|
|
|
<scroll-view :scrollY="true" style="max-height: 280rpx"> |
|
|
|
<!-- <scroll-view :scrollY="true" :style="{ 'max-height': isShrink ? '50rpx' : '280rpx' }"> --> |
|
|
|
<skeleton :banner="false" :loading="!globals.length" :row="4" animate class="u-line-2 skeleton"></skeleton> |
|
|
|
<view class="grid gap-2"> |
|
|
@ -45,8 +36,6 @@ |
|
|
|
import { mapGetters, mapMutations, mapState } from 'vuex'; |
|
|
|
import Skeleton from '@/components/Skeleton/Skeleton'; |
|
|
|
|
|
|
|
const sysHeight = uni.getSystemInfoSync().screenHeight; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Global', |
|
|
|
components: { Skeleton }, |
|
|
@ -55,18 +44,12 @@ export default { |
|
|
|
return { |
|
|
|
// loading: true, |
|
|
|
task: null, |
|
|
|
sysHeight: sysHeight, |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState('task', ['isShrink']), |
|
|
|
...mapGetters('task', ['globals']), |
|
|
|
|
|
|
|
globalsHeight: function () { |
|
|
|
let h = ((this.sysHeight - 44 - 30 - 10) / 5) * 4; |
|
|
|
return h; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|