|
|
@ -1,6 +1,13 @@ |
|
|
|
<template> |
|
|
|
<view class="m-2" v-if="globals && globals.length"> |
|
|
|
<u-card :show-foot="false" :show-head="false" :style="{ height: isShrink ? '106rpx' : '340rpx' }" border-radius="25" margin="0"> |
|
|
|
<u-card |
|
|
|
:show-foot="false" |
|
|
|
:show-head="false" |
|
|
|
@click="openCard" |
|
|
|
:style="{ height: isShrink ? '106rpx' : '340rpx' }" |
|
|
|
border-radius="25" |
|
|
|
margin="0" |
|
|
|
> |
|
|
|
<view slot="body"> |
|
|
|
<scroll-view :scrollY="true" :style="{ height: isShrink ? '50rpx' : '280rpx' }"> |
|
|
|
<skeleton :banner="false" :loading="!globals.length" :row="4" animate class="u-line-2 skeleton"></skeleton> |
|
|
@ -30,7 +37,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapGetters, mapState } from 'vuex'; |
|
|
|
import { mapGetters, mapMutations, mapState } from 'vuex'; |
|
|
|
import Skeleton from '@/components/Skeleton/Skeleton'; |
|
|
|
|
|
|
|
export default { |
|
|
@ -50,9 +57,17 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
...mapMutations('task', ['setShrink']), |
|
|
|
getClass(col, row) { |
|
|
|
return [`row-span-${row}`, `col-span-${col}`]; |
|
|
|
}, |
|
|
|
|
|
|
|
// 手动展开日常任务 |
|
|
|
openCard() { |
|
|
|
if (this.isShrink) { |
|
|
|
this.setShrink(false); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|