Browse Source

Merge remote-tracking branch 'origin/featComponent' into song

pull/24/head^2
lucky 4 years ago
parent
commit
92f3cb1a07
  1. 7
      CHANGELOG.md
  2. 2
      src/components/Globals/Globals.vue
  3. 11
      src/components/Plugin/Plugin.vue
  4. 20
      src/components/TimeLine/TimeLine.vue

7
CHANGELOG.md

@ -3,12 +3,10 @@
### 🌟 新功能
范围|描述|commitId
--|--|--
- | 标题栏变化 | [3898cfe](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/3898cfe)
- | 标题栏变化 | [c0fcd9d](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c0fcd9d)
- | 标题栏角色栏全局任务组件新建 | [0500cb4](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/0500cb4)
- | 插件数据获取 | [5b91bdc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/5b91bdc)
- | 存token | [b8a178d](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/b8a178d)
- | 定期任务面板骨架屏添加 | [b2698c0](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/b2698c0)
- | 角色栏实现 | [94cd671](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/94cd671)
- | 模拟接口测试 | [69e7931](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/69e7931)
- | 配置默认插件接口 | [f0c177d](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f0c177d)
@ -18,7 +16,6 @@
- | 时间轴修改状态时提示框增加 | [e841392](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e841392)
- | 提交到本地 | [9cbe411](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/9cbe411)
- | 添加时间轴上下滚动 | [2b81bbc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/2b81bbc)
- | 引入dayjs | [29b8b93](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/29b8b93)
- | db store | [6414c4f](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/6414c4f)
- | indexedDB | [687394e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/687394e)
- | post 封装 | [da52e94](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da52e94)
@ -51,11 +48,9 @@
- | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71)
- | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6)
- | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/d533a01)
- | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89)
- | 时间轴上下滚动数据加载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)
- | 下拉加载定期任务传参,时间格式化修改 | [0b95a0e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/0b95a0e)
- | 修改角色栏组件 | [a54c601](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/a54c601)
- | 修改main | [749ae9a](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/749ae9a)
@ -69,7 +64,6 @@
### 🔨 代码重构
范围|描述|commitId
--|--|--
- | 下滑时间轴添加备注 | [4fd20e3](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4fd20e3)
template | eslint prettier sass uview tailwindcss | [9c966a1](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/9c966a1)
@ -77,6 +71,7 @@
范围|描述|commitId
--|--|--
- | 测试接口 | [215e074](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/215e074)
- | 插件查询及展示 | [4dba770](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4dba770)
- | 角色栏文字颜色修改 | [215c6b3](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/215c6b3)
- | 解决警告 | [c932b09](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c932b09)
- | 组件文件夹新建 | [22bfe7b](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/22bfe7b)

2
src/components/Globals/Globals.vue

@ -5,7 +5,7 @@
<scroll-view :scrollY="true" :style="{ height: isShrink ? '40rpx' : '240rpx' }">
<skeleton :banner="false" :loading="!plugins.length" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton>
<view class="p-0 u-col-between">
<view class="grid grid-cols-3 gap-2 h-36" v-if="plugins.length">
<view class="grid grid-cols-3 gap-2 h-auto" v-if="plugins.length">
<Plugin
:class="getClass(plugin.col, plugin.row)"
:key="pluginIndex"

11
src/components/Plugin/Plugin.vue

@ -1,6 +1,5 @@
<template>
<view style="height: 100%" v-if="pluginContent && pluginContent.html">
<!-- <view> {{ pluginContent.html }} </view> -->
<view v-if="item && item.name">
<p-task-title :item="item" v-if="pluginId === '1'" />
<p-task-description :item="item" v-if="pluginId === '2'" />
@ -12,7 +11,6 @@
<p-task-countdown :item="item" v-if="pluginId === '8'" />
</view>
<view style="height: 100%" v-html="pluginContent.html"></view>
<!-- <u-parse :html="pluginContent.html" ref="ht-box"></u-parse> -->
</view>
</template>
@ -36,9 +34,15 @@ export default {
data() {
return { pluginContent: null };
},
async mounted() {
async created() {
await this.getPlugin();
console.log(this.pluginContent.js);
if (this.pluginContent.js) {
var scriptDom = document.createElement('script');
scriptDom.id = `p${this.pluginContent.pluginId}`;
scriptDom.innerHTML = this.pluginContent.js;
document.body.append(scriptDom);
}
},
methods: {
async getPlugin() {
@ -48,6 +52,7 @@ export default {
styleType,
});
this.pluginContent = res;
console.log(this.pluginContent);
},
},
};

20
src/components/TimeLine/TimeLine.vue

@ -84,13 +84,19 @@ export default {
if (tasks && tasks.length) {
let tasksHeight = 0;
const scrollHeight = document.getElementById('scroll').clientHeight;
// for (let i = 0; i < 3; i++) {
// if (tasks[i].panel && tasks[i].panel.height) {
// tasksHeight += +tasks[i].panel.height + 42;
// } else {
// tasksHeight += (width / 20) * 4 + 42;
// }
// }
let width = document.documentElement.clientWidth;
for (let i = 0; i < 3; i++) {
// TODO:
if (tasks[i].panel && tasks[i].panel.height) {
// + 42
tasksHeight += +tasks[i].panel.height + 42;
} else {
// rem + 42
// u-card h-16 = 4rem
// += 1rem + 42 = width / 20 + 42
tasksHeight += (width / 20) * 4 + 42;
}
}
this.top = tasksHeight - scrollHeight / 2;
console.log('this.top: ', this.top);
}

Loading…
Cancel
Save