Browse Source

feat: 日常任务插件调整

tall
aBin 4 years ago
parent
commit
c1881f91ab
  1. 2
      CHANGELOG.md
  2. 33
      src/components/Globals/Globals.vue
  3. 3
      src/components/Plugin/Plugin.vue

2
CHANGELOG.md

@ -50,9 +50,11 @@
- | 定期任务接口 | [aa4981c](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/aa4981c)
- | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71)
- | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6)
- | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da1eece)
- | 日常任务html数据查验 | [880ce5c](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/880ce5c)
- | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/d533a01)
- | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89)
- | 时间轴插件 | [225d3cc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/225d3cc)
- | 时间轴上下滚动数据加载bug修改 | [e82ede4](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e82ede4)
- | 时间轴上下滑动 | [4d0ae46](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4d0ae46)
- | 提示信息显示bug及日常任务收缩问题 | [f2f06c5](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f2f06c5)

33
src/components/Globals/Globals.vue

@ -4,22 +4,23 @@
<view slot="body">
<scroll-view :scrollY="true" :style="{ height: isShrink ? '40rpx' : '240rpx' }">
<skeleton :banner="false" :loading="!tasks.length" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton>
<view v-for="item in tasks" :key="item.id">
<view v-if="item.plugins">
<view class="p-0 u-col-between">
<view class="grid grid-cols-3 gap-2 h-auto">
<!-- ++{{ plugins }} -->
<Plugin
:item="item"
:class="getClass(plugin.colspan, plugin.rowspan)"
:key="plugin.pluginTaskId"
:pluginId="plugin.pluginId"
:styleType="plugin.styleType || 0"
v-for="plugin in item.plugins"
/>
</view>
</view>
</view>
<view class="grid grid-cols-3 gap-2 h-auto">
<template v-for="item in tasks">
<template v-if="item.plugins">
<template v-for="(pluginArr, arrIndex) in item.plugins">
<view class="p-0 u-col-between" :key="arrIndex">
<Plugin
:item="item"
:class="getClass(plugin.col, plugin.row)"
:key="plugin.pluginTaskId"
:pluginId="plugin.pluginId"
:styleType="plugin.styleType || 0"
v-for="plugin in pluginArr"
/>
</view>
</template>
</template>
</template>
</view>
</scroll-view>
</view>

3
src/components/Plugin/Plugin.vue

@ -1,7 +1,7 @@
<template>
<view>
<view style="height: 100%" v-if="pluginContent">
<view v-if="pluginContent && pluginContent.html">
<view v-if="pluginContent.html">
<view style="height: 100%" v-html="pluginContent.html"></view>
</view>
<view v-else>
@ -45,6 +45,7 @@ export default {
return { pluginContent: null };
},
async created() {
console.log(this.pluginId);
await this.getPlugin();
let domList = Array.from(document.getElementsByTagName('script'));
const index = domList.findIndex(item => item.id === `p${this.pluginContent.pluginId}`);

Loading…
Cancel
Save