Browse Source

feat: plugin-title 窗口通信调整,全局任务样式调整

disable-role
wally 4 years ago
parent
commit
18bc852a98
  1. 3
      CHANGELOG.md
  2. 6
      src/components/Globals/Globals.vue
  3. 2
      src/components/Plugin/Plugin.vue
  4. 4
      src/components/Roles/Roles.vue
  5. 2
      src/components/Title/Title.vue
  6. 2
      src/manifest.json
  7. 6
      src/plugins/p-task-title/p-task-title.vue
  8. 1
      src/utils/storage.js

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-11-09)
# 0.1.0 (2021-11-10)
### 🌟 新功能
范围|描述|commitId
@ -199,6 +199,7 @@
范围|描述|commitId
--|--|--
calendar | 日历细节调整 | 1a8d6bf
- | p-task-title 参数url处理 | 4fb9ec0
- | project 代码健壮性完善 | a3202c5
- | puppeteer升级v10 | f02b0e7
store/home | 删除store/home | db8a3b4

6
src/components/Globals/Globals.vue

@ -1,9 +1,11 @@
<template>
<view class="m-2" v-if="globals && globals.length">
<u-card @click="openCard" :show-foot="false" :show-head="false" style="max-height: 340rpx" border-radius="25" margin="0">
<!-- style="max-height: 340rpx" -->
<u-card @click="openCard" :show-foot="false" :show-head="false" border-radius="25" margin="0">
<!-- :style="{ 'max-height': isShrink ? '106rpx' : '340rpx' }" -->
<view slot="body">
<scroll-view :scrollY="true" style="max-height: 280rpx">
<!-- style="max-height: 280rpx" -->
<scroll-view :scrollY="true">
<!-- <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">

2
src/components/Plugin/Plugin.vue

@ -1,5 +1,6 @@
<template>
<view class="u-font-14" style="height: 100%">
<!-- 业务插件 代码片段 -->
<view v-if="pluginContent" @click="setStorage">
<view
:data-did="task.detailId"
@ -19,6 +20,7 @@
></view>
</view>
<!-- 内置插件 -->
<view v-else @click="setStorage">
<!-- <plugin-default /> -->
<!-- <component :task="task" :is="pluginComponent"></component> -->

4
src/components/Roles/Roles.vue

@ -23,9 +23,9 @@
{{ item.name }}
</view>
</view>
<view class="tab-item text-gray-400 text-bold">
<!-- <view class="tab-item text-gray-400 text-bold">
<view class="tab-children u-skeleton-fillet u-font-14" @click="open"> 禁用 </view>
</view>
</view> -->
</view>
</scroll-view>
</view>

2
src/components/Title/Title.vue

@ -2,7 +2,7 @@
<view>
<!-- :is-back="false" -->
<u-navbar :custom-back="onBack" class="overflow-hidden">
<view class="flex justify-start flex-1 px-3 font-bold min-0">
<view class="flex justify-start flex-1 pr-2 font-bold min-0" v-show="project.name">
<view class="truncate">{{ project.name }}</view>
</view>
<view class="mr-2" slot="right">

2
src/manifest.json

@ -7,7 +7,7 @@
"transformPx": false,
"h5": {
"router": {
"base": "/tall-project/v3.2.0"
"base": "/tall-project/iacd"
},
"title": "时物链条",
"sdkConfigs": {

6
src/plugins/p-task-title/p-task-title.vue

@ -1,9 +1,9 @@
<template>
<!-- 任务名插件 -->
<!-- <view>{{ task.name }}</view> -->
<view class="flex justify-between items-center" @click="postMsg(param)">
<view class="flex justify-between items-center h-8 text-gray-700" @click="postMsg(param)">
<view class="flex-1">{{ task.name }}</view>
<img style="height: 16px" src="https://www.tall.wiki/staticrec/photos/right.png" />
<u-icon name="arrow-right" color="#aaa"></u-icon>
</view>
</template>
@ -48,12 +48,12 @@ export default {
if (data && data.url) {
const baseUrl = process.env.VUE_APP_BASE_URL;
const url = `${baseUrl}/${data.url}?u=${this.userId}&p=${this.projectId}&t=${this.task.id}`;
console.log('发消息: ', url);
const msg = {
event: 'openDetail',
data: data.local ? data.url : url,
local: data.local,
};
console.log('发消息: ', msg);
top.postMessage(msg, '*');
}
}

1
src/utils/storage.js

@ -97,7 +97,6 @@ export default {
/* #ifdef H5 */
const capacity = JSON.stringify(localStorage).length;
let max = 1024 * 1024 * 4;
console.log('capacity: ', capacity, max);
if (capacity >= max) {
uni.clearStorageSync();
}

Loading…
Cancel
Save