@lambo-design/pro-layout 1.0.0-beta.462 → 1.0.0-beta.464
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
<Col class="font-padding" v-show="rightTopOptButtonList.includes('todo')">
|
|
13
13
|
<ProLayoutToolsQuickTodo></ProLayoutToolsQuickTodo>
|
|
14
14
|
</Col>
|
|
15
|
+
<Col class="front-padding" v-show="rightTopOptButtonList.includes('todoCenter')">
|
|
16
|
+
<ProLayoutToolsQuickTodoCenter></ProLayoutToolsQuickTodoCenter>
|
|
17
|
+
</Col>
|
|
15
18
|
<Col class="font-padding" v-show="shouldShowCustomSlot">
|
|
16
19
|
<slot name="pro-layout-custom-icons"></slot>
|
|
17
20
|
</Col>
|
|
@@ -32,6 +35,7 @@ import ProLayoutToolsQuickSearch from './pro-layout-tools-quick-search';
|
|
|
32
35
|
import ProLayoutToolsQuickCollect from './pro-layout-tools-quick-collect';
|
|
33
36
|
import ProLayoutToolsQuickFullscreen from './pro-layout-tools-quick-fullscreen';
|
|
34
37
|
import ProLayoutToolsQuickTodo from './pro-layout-tools-quick-todo';
|
|
38
|
+
import ProLayoutToolsQuickTodoCenter from './pro-layout-tools-quick-todoCenter'
|
|
35
39
|
import ProLayoutToolsQuickNotice from './pro-layout-tools-quick-notice';
|
|
36
40
|
import ProLayoutToolsQuickIntl from './pro-layout-tools-quick-intl';
|
|
37
41
|
import ProLayoutToolsQuickDocument from './pro-layout-tools-quick-document';
|
|
@@ -52,6 +56,7 @@ export default {
|
|
|
52
56
|
ProLayoutToolsQuickCollect,
|
|
53
57
|
ProLayoutToolsQuickFullscreen,
|
|
54
58
|
ProLayoutToolsQuickTodo,
|
|
59
|
+
ProLayoutToolsQuickTodoCenter,
|
|
55
60
|
ProLayoutToolsQuickNotice,
|
|
56
61
|
ProLayoutToolsQuickIntl
|
|
57
62
|
},
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pro-layout-tools-quick-todo">
|
|
3
|
+
<Dropdown >
|
|
4
|
+
<Badge :count="todoCenterDatas.length" class-name="badge-count">
|
|
5
|
+
<Icon type="ios-alarm-outline" size="18" style="cursor: pointer"/>
|
|
6
|
+
</Badge>
|
|
7
|
+
<template #list>
|
|
8
|
+
<DropdownMenu slot="list" class="todo-dropdown-menu">
|
|
9
|
+
<DropdownItem v-for="(item, index) in displayedTodos" :key="index" class="dropdown-item" @click.native="getDetail(item)" >
|
|
10
|
+
<div class="item-title" :title="item.taskTitle">
|
|
11
|
+
{{ item.taskTitle }}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="item-time">
|
|
14
|
+
{{ formatTimestamp(item.taskInitTime,'YYYY-MM-DD HH:mm:ss') }}
|
|
15
|
+
</div>
|
|
16
|
+
</DropdownItem>
|
|
17
|
+
<div class="dropdown-footer" :class="[todoCenterDatas.length == 0 ? 'no-line' : '']">
|
|
18
|
+
<Button type="text" v-if="todoCenterDatas.length > 0" @click="getMore" >{{ t('pro-layout.header.todo-more') }}</Button>
|
|
19
|
+
<div class="no-data" v-if="todoCenterDatas.length == 0" >{{ t('pro-layout.header.todo-no-data') }}</div>
|
|
20
|
+
</div>
|
|
21
|
+
</DropdownMenu>
|
|
22
|
+
</template>
|
|
23
|
+
</Dropdown>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import Bus from '@lambo-design/shared/utils/bus';
|
|
29
|
+
import {deepCopy} from '@lambo-design/shared/utils/assist';
|
|
30
|
+
import {formatTimestamp} from '@lambo-design/shared/utils/date'
|
|
31
|
+
import Locale from "@lambo-design/core/src/mixins/locale";
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: "pro-layout-tools-quick-todo",
|
|
35
|
+
mixins: [Locale],
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
formatTimestamp: formatTimestamp,
|
|
39
|
+
todoCenterDatas:[],
|
|
40
|
+
displayedTodos:[]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
initListener() {
|
|
45
|
+
Bus.$on('other-datas',(data) => {
|
|
46
|
+
this.initTodoList(data);
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
destroyListener() {
|
|
50
|
+
Bus.$off('other-datas')
|
|
51
|
+
},
|
|
52
|
+
initTodoList(data) {
|
|
53
|
+
if (data && data.todoCenterDatas) {
|
|
54
|
+
this.todoCenterDatas = deepCopy(data.todoCenterDatas);
|
|
55
|
+
this.displayedTodos = this.todoCenterDatas.slice(0, 10);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
getDetail(item){
|
|
59
|
+
Bus.$emit('other-operate','todoCenter-detail',item)
|
|
60
|
+
},
|
|
61
|
+
getMore() {
|
|
62
|
+
Bus.$emit('other-operate','todoCenter-more')
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
created() {
|
|
66
|
+
this.initListener()
|
|
67
|
+
},
|
|
68
|
+
beforeDestroy() {
|
|
69
|
+
this.destroyListener()
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style lang="less">
|
|
75
|
+
@import "@lambo-design/core/src/styles/default";
|
|
76
|
+
.pro-layout-tools-quick-todo{
|
|
77
|
+
.badge-count{
|
|
78
|
+
top:12px;
|
|
79
|
+
height: 10px;
|
|
80
|
+
line-height: 8px;
|
|
81
|
+
min-width: 8px;
|
|
82
|
+
padding: 0;
|
|
83
|
+
font-size: 8px;
|
|
84
|
+
width: 10px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
.todo-dropdown-menu {
|
|
88
|
+
max-height: 300px;
|
|
89
|
+
width: 300px;
|
|
90
|
+
overflow-y: auto;
|
|
91
|
+
&::-webkit-scrollbar {
|
|
92
|
+
width: 0;
|
|
93
|
+
height: 0;
|
|
94
|
+
}
|
|
95
|
+
.dropdown-item {
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
padding: 8px;
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-wrap: wrap;
|
|
100
|
+
align-items: flex-start;
|
|
101
|
+
.item-title{
|
|
102
|
+
font-family: "黑体", Arial, sans-serif;
|
|
103
|
+
margin-left: 5px;
|
|
104
|
+
flex: 1 0 auto;
|
|
105
|
+
width: 100%;
|
|
106
|
+
margin-right: auto;
|
|
107
|
+
white-space:nowrap;
|
|
108
|
+
overflow:hidden;
|
|
109
|
+
text-overflow: ellipsis;
|
|
110
|
+
}
|
|
111
|
+
.item-time{
|
|
112
|
+
font-family: "黑体", Arial, sans-serif;
|
|
113
|
+
font-weight: normal;
|
|
114
|
+
flex: 0 0 auto;
|
|
115
|
+
margin-top: 3px;
|
|
116
|
+
margin-left: auto;
|
|
117
|
+
color: #808695;
|
|
118
|
+
}
|
|
119
|
+
.item-des{
|
|
120
|
+
flex: 1 0 80%;
|
|
121
|
+
height: auto;
|
|
122
|
+
margin: 3px 20px 0;
|
|
123
|
+
font-size: 12px;
|
|
124
|
+
color: #808695;
|
|
125
|
+
white-space: normal;
|
|
126
|
+
word-wrap: break-word;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
.dropdown-footer{
|
|
130
|
+
line-height: 24px;
|
|
131
|
+
border-top: 1px solid var(--layout-sider-line-color,@_layout-sider-line-color);
|
|
132
|
+
padding: 8px;
|
|
133
|
+
text-align: center;
|
|
134
|
+
&.no-line{
|
|
135
|
+
border: 0;
|
|
136
|
+
}
|
|
137
|
+
.no-data{
|
|
138
|
+
text-align: center;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
</style>
|
package/src/index.vue
CHANGED
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
},
|
|
83
83
|
isHome: {
|
|
84
84
|
type: Boolean,
|
|
85
|
-
default:
|
|
85
|
+
default: true
|
|
86
86
|
},
|
|
87
87
|
systemInfo: {
|
|
88
88
|
type: Object,
|
|
@@ -203,6 +203,14 @@ export default {
|
|
|
203
203
|
const savedWidth = localStorage.getItem('siderWidth')
|
|
204
204
|
this.siderWidth = savedWidth ? parseInt(savedWidth) : 220
|
|
205
205
|
}
|
|
206
|
+
},
|
|
207
|
+
isHome: {
|
|
208
|
+
handler() {
|
|
209
|
+
if (this.isHome) {
|
|
210
|
+
this.isShowLeftMenu = false
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
immediate: true
|
|
206
214
|
}
|
|
207
215
|
},
|
|
208
216
|
methods: {
|