eoss-ui 0.7.95 → 0.7.96
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/lib/cascader.js +1 -1
- package/lib/data-table-form.js +8 -8
- package/lib/data-table.js +8 -7
- package/lib/eoss-ui.common.js +282 -281
- package/lib/flow-list.js +96 -96
- package/lib/flow.js +162 -162
- package/lib/index.js +1 -1
- package/lib/main.js +5 -5
- package/lib/select.js +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/package.json +1 -1
- package/packages/button-group/src/main.vue +346 -346
- package/packages/calogin/src/main.vue +412 -412
- package/packages/cascader/src/main.vue +1 -1
- package/packages/clients/src/main.vue +151 -151
- package/packages/data-table/src/column.vue +1 -0
- package/packages/data-table-form/src/tbody.vue +1 -1
- package/packages/flow/src/component/Circulate.vue +417 -417
- package/packages/flow/src/component/CommonOpinions.vue +376 -376
- package/packages/flow/src/component/CustomPreset.vue +324 -324
- package/packages/flow/src/component/FileList.vue +97 -97
- package/packages/flow/src/component/FreeCirculation.vue +244 -244
- package/packages/flow/src/component/Preset.vue +257 -257
- package/packages/flow/src/component/SendMsg.vue +242 -242
- package/packages/flow/src/component/SortFlow.vue +110 -110
- package/packages/flow/src/component/taskUnionExamine.vue +761 -761
- package/packages/flow/src/form.vue +123 -123
- package/packages/flow/src/freeStartFlow.vue +2855 -2855
- package/packages/flow/src/processForm.vue +1680 -1680
- package/packages/flow/src/processReject.vue +309 -309
- package/packages/flow/src/reset.vue +946 -946
- package/packages/flow/src/startTaskRead.vue +695 -695
- package/packages/flow/src/supervise.vue +159 -159
- package/packages/flow/src/table.vue +58 -58
- package/packages/flow-list/src/main.vue +2337 -2337
- package/packages/form/src/main.vue +3901 -3901
- package/packages/form/src/table.vue +1512 -1512
- package/packages/icon/src/main.vue +104 -104
- package/packages/login/src/resetPassword.vue +557 -557
- package/packages/main/src/public/online.vue +89 -89
- package/packages/main/src/public/search.vue +464 -464
- package/packages/main/src/public/settings.vue +273 -273
- package/packages/main/src/simplicity/apps.vue +388 -388
- package/packages/main/src/simplicity/avatar.vue +82 -82
- package/packages/main/src/simplicity/handler.vue +158 -158
- package/packages/main/src/simplicity/menu-list.vue +135 -135
- package/packages/main/src/simplicity/message.vue +293 -293
- package/packages/main/src/simplicity/notice.vue +222 -222
- package/packages/main/src/simplicity/sub-menu.vue +276 -276
- package/packages/main/src/simplicity/user.vue +259 -259
- package/packages/main/src/simplicityTop/apps.vue +388 -388
- package/packages/main/src/simplicityTop/avatar.vue +82 -82
- package/packages/main/src/simplicityTop/handler.vue +215 -215
- package/packages/main/src/simplicityTop/lists.vue +84 -84
- package/packages/main/src/simplicityTop/menu-list.vue +135 -135
- package/packages/main/src/simplicityTop/message.vue +293 -293
- package/packages/main/src/simplicityTop/notice.vue +222 -222
- package/packages/main/src/simplicityTop/router-page.vue +45 -45
- package/packages/main/src/simplicityTop/sub-menu.vue +274 -274
- package/packages/main/src/simplicityTop/user.vue +259 -259
- package/packages/menu/src/main.vue +595 -595
- package/packages/nav/src/main.vue +351 -351
- package/packages/select/src/main.vue +1 -1
- package/packages/selector/src/main.vue +761 -761
- package/packages/selector-panel/src/main.vue +1036 -1036
- package/packages/selector-panel/src/selection.vue +174 -174
- package/packages/switch/src/main.vue +170 -170
- package/packages/theme-chalk/gulpfile.js +25 -0
- package/packages/theme-chalk/src/data-table.scss +297 -297
- package/packages/theme-chalk/src/flow-list.scss +55 -55
- package/packages/theme-chalk/src/flow.scss +373 -373
- package/packages/theme-chalk/src/form.scss +501 -501
- package/packages/theme-chalk/src/handler.scss +148 -148
- package/packages/theme-chalk/src/icon.scss +3452 -3452
- package/packages/theme-chalk/src/login.scss +1006 -1006
- package/packages/theme-chalk/src/main.scss +664 -664
- package/packages/theme-chalk/src/menu.scss +224 -224
- package/packages/theme-chalk/src/selector.scss +114 -114
- package/packages/theme-chalk/src/simplicity-top.scss +1845 -1845
- package/packages/theme-chalk/src/simplicity.scss +1403 -1403
- package/packages/theme-chalk/src/tree.scss +165 -165
- package/packages/theme-chalk/src/upload.scss +172 -172
- package/packages/tips/src/main.vue +141 -141
- package/packages/toolbar/src/main.vue +430 -430
- package/packages/upload/src/main.vue +1344 -1344
- package/packages/wujie/src/main.vue +146 -146
- package/src/config/api.js +348 -348
- package/src/index.js +163 -163
- package/src/utils/rules.js +18 -18
- package/packages/theme-chalk/lib/base.css +0 -1
- package/packages/theme-chalk/lib/button-group.css +0 -1
- package/packages/theme-chalk/lib/button.css +0 -1
- package/packages/theme-chalk/lib/calendar.css +0 -1
- package/packages/theme-chalk/lib/calogin.css +0 -0
- package/packages/theme-chalk/lib/card.css +0 -1
- package/packages/theme-chalk/lib/cascader.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +0 -1
- package/packages/theme-chalk/lib/clients.css +0 -1
- package/packages/theme-chalk/lib/data-table-form.css +0 -1
- package/packages/theme-chalk/lib/data-table.css +0 -1
- package/packages/theme-chalk/lib/date-picker.css +0 -1
- package/packages/theme-chalk/lib/dialog.css +0 -1
- package/packages/theme-chalk/lib/enable-drag.css +0 -1
- package/packages/theme-chalk/lib/enterprise.css +0 -1
- package/packages/theme-chalk/lib/error-page.css +0 -1
- package/packages/theme-chalk/lib/flow-chart.css +0 -0
- package/packages/theme-chalk/lib/flow-group.css +0 -1
- package/packages/theme-chalk/lib/flow-list.css +0 -1
- package/packages/theme-chalk/lib/flow.css +0 -1
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/form.css +0 -1
- package/packages/theme-chalk/lib/handle-user.css +0 -1
- package/packages/theme-chalk/lib/handler.css +0 -1
- package/packages/theme-chalk/lib/icon.css +0 -1
- package/packages/theme-chalk/lib/icons.css +0 -1
- package/packages/theme-chalk/lib/index.css +0 -1
- package/packages/theme-chalk/lib/input-number.css +0 -0
- package/packages/theme-chalk/lib/input.css +0 -1
- package/packages/theme-chalk/lib/label.css +0 -1
- package/packages/theme-chalk/lib/layout.css +0 -1
- package/packages/theme-chalk/lib/login.css +0 -1
- package/packages/theme-chalk/lib/main.css +0 -1
- package/packages/theme-chalk/lib/menu.css +0 -1
- package/packages/theme-chalk/lib/nav.css +0 -1
- package/packages/theme-chalk/lib/notify.css +0 -0
- package/packages/theme-chalk/lib/page.css +0 -1
- package/packages/theme-chalk/lib/pagination.css +0 -1
- package/packages/theme-chalk/lib/player.css +0 -1
- package/packages/theme-chalk/lib/qr-code.css +0 -1
- package/packages/theme-chalk/lib/radio-group.css +0 -1
- package/packages/theme-chalk/lib/retrial-auth.css +0 -1
- package/packages/theme-chalk/lib/select-ganged.css +0 -1
- package/packages/theme-chalk/lib/select.css +0 -1
- package/packages/theme-chalk/lib/selector-panel.css +0 -1
- package/packages/theme-chalk/lib/selector.css +0 -1
- package/packages/theme-chalk/lib/simplicity-top.css +0 -1
- package/packages/theme-chalk/lib/simplicity.css +0 -1
- package/packages/theme-chalk/lib/sizer.css +0 -1
- package/packages/theme-chalk/lib/steps.css +0 -1
- package/packages/theme-chalk/lib/switch.css +0 -1
- package/packages/theme-chalk/lib/table-form.css +0 -0
- package/packages/theme-chalk/lib/tabs-panel.css +0 -0
- package/packages/theme-chalk/lib/tabs.css +0 -1
- package/packages/theme-chalk/lib/tips.css +0 -1
- package/packages/theme-chalk/lib/toolbar.css +0 -1
- package/packages/theme-chalk/lib/tree-group.css +0 -1
- package/packages/theme-chalk/lib/tree.css +0 -1
- package/packages/theme-chalk/lib/upload.css +0 -1
- package/packages/theme-chalk/lib/wujie.css +0 -0
- package/packages/theme-chalk/lib/wxlogin.css +0 -1
|
@@ -1,274 +1,274 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-drawer
|
|
3
|
-
class="es-simplicity-subMenus"
|
|
4
|
-
direction="ltr"
|
|
5
|
-
modal-class="es-simplicity-apps-modal"
|
|
6
|
-
size="auto"
|
|
7
|
-
:modal-append-to-body="false"
|
|
8
|
-
:close-on-press-escape="false"
|
|
9
|
-
:modal="false"
|
|
10
|
-
:with-header="false"
|
|
11
|
-
:wrapperClosable="false"
|
|
12
|
-
:visible.sync="show"
|
|
13
|
-
>
|
|
14
|
-
<div
|
|
15
|
-
class="es-simplicity-menus"
|
|
16
|
-
:class="{ 'es-simplicity-menus-plus': mode == 'plus' }"
|
|
17
|
-
>
|
|
18
|
-
<div class="es-simplicity-menus-box" :style="{ width: width + 'px' }">
|
|
19
|
-
<div class="es-simplicity-menus-title">
|
|
20
|
-
<el-tooltip
|
|
21
|
-
class="item"
|
|
22
|
-
effect="dark"
|
|
23
|
-
placement="right"
|
|
24
|
-
:content="title || text"
|
|
25
|
-
:auto="true"
|
|
26
|
-
>
|
|
27
|
-
<span class="es-simplicity-menus-title-text" v-if="!fold">{{
|
|
28
|
-
title || text
|
|
29
|
-
}}</span>
|
|
30
|
-
</el-tooltip>
|
|
31
|
-
<i
|
|
32
|
-
class="es-icon-shouqi es-simplicity-menus-title-icon"
|
|
33
|
-
v-show="!fold"
|
|
34
|
-
@click="handleFold(true)"
|
|
35
|
-
></i>
|
|
36
|
-
<i
|
|
37
|
-
class="es-icon-zhankai es-simplicity-menus-title-icon"
|
|
38
|
-
v-show="fold"
|
|
39
|
-
@click="handleFold(false)"
|
|
40
|
-
></i>
|
|
41
|
-
</div>
|
|
42
|
-
<div v-if="collapse" class="es-simplicity-menus-scrollbar">
|
|
43
|
-
<es-menu
|
|
44
|
-
popperClass="es-simplicity_menus"
|
|
45
|
-
:menu-class="
|
|
46
|
-
fold
|
|
47
|
-
? 'es-simplicity_menus es-simplicity_menus-fold'
|
|
48
|
-
: 'es-simplicity_menus'
|
|
49
|
-
"
|
|
50
|
-
:fourthTabs="true"
|
|
51
|
-
:data="menus"
|
|
52
|
-
:menuIcon="menuIcon"
|
|
53
|
-
:color="color"
|
|
54
|
-
:backgroundColor="backgroundColor"
|
|
55
|
-
:show-title="false"
|
|
56
|
-
:collapse="fold"
|
|
57
|
-
@select="handleSelect"
|
|
58
|
-
></es-menu>
|
|
59
|
-
</div>
|
|
60
|
-
<menu-list
|
|
61
|
-
v-else
|
|
62
|
-
:active="actives[0]"
|
|
63
|
-
:data="menus"
|
|
64
|
-
:menuIcon="menuIcon"
|
|
65
|
-
:color="color"
|
|
66
|
-
:backgroundColor="backgroundColor"
|
|
67
|
-
:fold="fold"
|
|
68
|
-
:width="size"
|
|
69
|
-
@menter="
|
|
70
|
-
(res) => {
|
|
71
|
-
this.getData(res, 0, true);
|
|
72
|
-
}
|
|
73
|
-
"
|
|
74
|
-
@mleave="
|
|
75
|
-
(res) => {
|
|
76
|
-
this.getData(res, 0, false);
|
|
77
|
-
}
|
|
78
|
-
"
|
|
79
|
-
@hover="handleHover"
|
|
80
|
-
@command="handleCommand"
|
|
81
|
-
></menu-list>
|
|
82
|
-
</div>
|
|
83
|
-
<div
|
|
84
|
-
class="es-simplicity-menus-view"
|
|
85
|
-
@mouseleave="handleLeave"
|
|
86
|
-
@mouseenter="handleEnter"
|
|
87
|
-
v-show="subMenus.length"
|
|
88
|
-
>
|
|
89
|
-
<div
|
|
90
|
-
class="es-simplicity-menus-box"
|
|
91
|
-
v-for="(item, index) in subMenus"
|
|
92
|
-
:key="item.id"
|
|
93
|
-
>
|
|
94
|
-
<div class="es-simplicity-menus-title">
|
|
95
|
-
<span class="es-simplicity-menus-title-text">{{
|
|
96
|
-
item.name || item.text || item.title
|
|
97
|
-
}}</span>
|
|
98
|
-
</div>
|
|
99
|
-
<menu-list
|
|
100
|
-
:active="actives[index + 1]"
|
|
101
|
-
:data="[...item.children, ...item.fourthTabs]"
|
|
102
|
-
:menuIcon="menuIcon"
|
|
103
|
-
:color="color"
|
|
104
|
-
:backgroundColor="backgroundColor"
|
|
105
|
-
:width="size"
|
|
106
|
-
@menter="
|
|
107
|
-
(res) => {
|
|
108
|
-
getData(res, index + 1, true);
|
|
109
|
-
}
|
|
110
|
-
"
|
|
111
|
-
@mleave="
|
|
112
|
-
(res) => {
|
|
113
|
-
getData(res, index + 1, false);
|
|
114
|
-
}
|
|
115
|
-
"
|
|
116
|
-
@command="handleCommand"
|
|
117
|
-
></menu-list>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</el-drawer>
|
|
122
|
-
</template>
|
|
123
|
-
|
|
124
|
-
<script>
|
|
125
|
-
import MenuList from './menu-list.vue';
|
|
126
|
-
export default {
|
|
127
|
-
name: 'SubMenu',
|
|
128
|
-
components: { MenuList },
|
|
129
|
-
props: {
|
|
130
|
-
mode: String,
|
|
131
|
-
collapse: Boolean,
|
|
132
|
-
title: String,
|
|
133
|
-
closed: Boolean,
|
|
134
|
-
color: {
|
|
135
|
-
type: [String, Array],
|
|
136
|
-
default: '#fff'
|
|
137
|
-
},
|
|
138
|
-
backgroundColor: {
|
|
139
|
-
type: [String, Array],
|
|
140
|
-
default() {
|
|
141
|
-
return [
|
|
142
|
-
'#FF9C52',
|
|
143
|
-
'#2591F7',
|
|
144
|
-
'#17C27B',
|
|
145
|
-
'#1265D7',
|
|
146
|
-
'#FFC724',
|
|
147
|
-
'#E34D59'
|
|
148
|
-
];
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
size: {
|
|
152
|
-
type: Number,
|
|
153
|
-
default: 220
|
|
154
|
-
},
|
|
155
|
-
visible: Boolean,
|
|
156
|
-
text: String,
|
|
157
|
-
menuIcon: String,
|
|
158
|
-
children: {
|
|
159
|
-
type: Array,
|
|
160
|
-
default() {
|
|
161
|
-
return [];
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
fourthTabs: {
|
|
165
|
-
type: Array,
|
|
166
|
-
default() {
|
|
167
|
-
return [];
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
data() {
|
|
172
|
-
return {
|
|
173
|
-
fold: this.closed,
|
|
174
|
-
width: this.size,
|
|
175
|
-
subMenus: [],
|
|
176
|
-
isEnter: false,
|
|
177
|
-
timer: null,
|
|
178
|
-
actives: []
|
|
179
|
-
};
|
|
180
|
-
},
|
|
181
|
-
computed: {
|
|
182
|
-
menus() {
|
|
183
|
-
return [...this.children, ...this.fourthTabs];
|
|
184
|
-
},
|
|
185
|
-
show: {
|
|
186
|
-
get() {
|
|
187
|
-
return this.visible;
|
|
188
|
-
},
|
|
189
|
-
set(val) {
|
|
190
|
-
this.$emit('update:visible', val);
|
|
191
|
-
return val;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
watch: {
|
|
196
|
-
closed(val) {
|
|
197
|
-
this.fold = val;
|
|
198
|
-
if (val) {
|
|
199
|
-
this.width = 48;
|
|
200
|
-
} else {
|
|
201
|
-
this.width = this.size;
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
visible(val) {
|
|
205
|
-
val === false && (this.actives = []);
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
created() {},
|
|
209
|
-
mounted() {},
|
|
210
|
-
methods: {
|
|
211
|
-
handleFold(res) {
|
|
212
|
-
this.fold = res;
|
|
213
|
-
if (res) {
|
|
214
|
-
this.width = 48;
|
|
215
|
-
} else {
|
|
216
|
-
this.width = this.size;
|
|
217
|
-
}
|
|
218
|
-
this.$emit('update:closed', res);
|
|
219
|
-
},
|
|
220
|
-
handleCommand(res) {
|
|
221
|
-
this.$emit('command', res);
|
|
222
|
-
},
|
|
223
|
-
handleSelect(res) {
|
|
224
|
-
this.$emit('command', res.node);
|
|
225
|
-
},
|
|
226
|
-
getData(res, n, is) {
|
|
227
|
-
this.isEnter = is;
|
|
228
|
-
if (is) {
|
|
229
|
-
this.actives.splice(n);
|
|
230
|
-
if (this.actives[n]) {
|
|
231
|
-
this.actives[n] = res.id;
|
|
232
|
-
} else {
|
|
233
|
-
this.actives.push(res.id);
|
|
234
|
-
}
|
|
235
|
-
this.subMenus.splice(n);
|
|
236
|
-
let { children, fourthTabs } = res;
|
|
237
|
-
if (
|
|
238
|
-
(children && children.length) ||
|
|
239
|
-
(fourthTabs && fourthTabs.length)
|
|
240
|
-
) {
|
|
241
|
-
this.subMenus = this.subMenus.concat(res);
|
|
242
|
-
}
|
|
243
|
-
} else {
|
|
244
|
-
if (n == 0) {
|
|
245
|
-
clearTimeout(this.timer);
|
|
246
|
-
this.timer = setTimeout(() => {
|
|
247
|
-
if (res && !this.isEnter) {
|
|
248
|
-
this.subMenus = [];
|
|
249
|
-
this.actives = [];
|
|
250
|
-
}
|
|
251
|
-
}, 300);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
handleHover(res) {
|
|
256
|
-
this.isEnter = res;
|
|
257
|
-
//if(this)
|
|
258
|
-
},
|
|
259
|
-
clearSubmenu() {
|
|
260
|
-
this.$refs.menus.clearActive();
|
|
261
|
-
this.subMenus = [];
|
|
262
|
-
},
|
|
263
|
-
handleLeave() {
|
|
264
|
-
this.subMenus = [];
|
|
265
|
-
this.actives = [];
|
|
266
|
-
},
|
|
267
|
-
handleEnter() {
|
|
268
|
-
this.isEnter = true;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
</script>
|
|
273
|
-
|
|
274
|
-
<style lang="scss" scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-drawer
|
|
3
|
+
class="es-simplicity-subMenus"
|
|
4
|
+
direction="ltr"
|
|
5
|
+
modal-class="es-simplicity-apps-modal"
|
|
6
|
+
size="auto"
|
|
7
|
+
:modal-append-to-body="false"
|
|
8
|
+
:close-on-press-escape="false"
|
|
9
|
+
:modal="false"
|
|
10
|
+
:with-header="false"
|
|
11
|
+
:wrapperClosable="false"
|
|
12
|
+
:visible.sync="show"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
class="es-simplicity-menus"
|
|
16
|
+
:class="{ 'es-simplicity-menus-plus': mode == 'plus' }"
|
|
17
|
+
>
|
|
18
|
+
<div class="es-simplicity-menus-box" :style="{ width: width + 'px' }">
|
|
19
|
+
<div class="es-simplicity-menus-title">
|
|
20
|
+
<el-tooltip
|
|
21
|
+
class="item"
|
|
22
|
+
effect="dark"
|
|
23
|
+
placement="right"
|
|
24
|
+
:content="title || text"
|
|
25
|
+
:auto="true"
|
|
26
|
+
>
|
|
27
|
+
<span class="es-simplicity-menus-title-text" v-if="!fold">{{
|
|
28
|
+
title || text
|
|
29
|
+
}}</span>
|
|
30
|
+
</el-tooltip>
|
|
31
|
+
<i
|
|
32
|
+
class="es-icon-shouqi es-simplicity-menus-title-icon"
|
|
33
|
+
v-show="!fold"
|
|
34
|
+
@click="handleFold(true)"
|
|
35
|
+
></i>
|
|
36
|
+
<i
|
|
37
|
+
class="es-icon-zhankai es-simplicity-menus-title-icon"
|
|
38
|
+
v-show="fold"
|
|
39
|
+
@click="handleFold(false)"
|
|
40
|
+
></i>
|
|
41
|
+
</div>
|
|
42
|
+
<div v-if="collapse" class="es-simplicity-menus-scrollbar">
|
|
43
|
+
<es-menu
|
|
44
|
+
popperClass="es-simplicity_menus"
|
|
45
|
+
:menu-class="
|
|
46
|
+
fold
|
|
47
|
+
? 'es-simplicity_menus es-simplicity_menus-fold'
|
|
48
|
+
: 'es-simplicity_menus'
|
|
49
|
+
"
|
|
50
|
+
:fourthTabs="true"
|
|
51
|
+
:data="menus"
|
|
52
|
+
:menuIcon="menuIcon"
|
|
53
|
+
:color="color"
|
|
54
|
+
:backgroundColor="backgroundColor"
|
|
55
|
+
:show-title="false"
|
|
56
|
+
:collapse="fold"
|
|
57
|
+
@select="handleSelect"
|
|
58
|
+
></es-menu>
|
|
59
|
+
</div>
|
|
60
|
+
<menu-list
|
|
61
|
+
v-else
|
|
62
|
+
:active="actives[0]"
|
|
63
|
+
:data="menus"
|
|
64
|
+
:menuIcon="menuIcon"
|
|
65
|
+
:color="color"
|
|
66
|
+
:backgroundColor="backgroundColor"
|
|
67
|
+
:fold="fold"
|
|
68
|
+
:width="size"
|
|
69
|
+
@menter="
|
|
70
|
+
(res) => {
|
|
71
|
+
this.getData(res, 0, true);
|
|
72
|
+
}
|
|
73
|
+
"
|
|
74
|
+
@mleave="
|
|
75
|
+
(res) => {
|
|
76
|
+
this.getData(res, 0, false);
|
|
77
|
+
}
|
|
78
|
+
"
|
|
79
|
+
@hover="handleHover"
|
|
80
|
+
@command="handleCommand"
|
|
81
|
+
></menu-list>
|
|
82
|
+
</div>
|
|
83
|
+
<div
|
|
84
|
+
class="es-simplicity-menus-view"
|
|
85
|
+
@mouseleave="handleLeave"
|
|
86
|
+
@mouseenter="handleEnter"
|
|
87
|
+
v-show="subMenus.length"
|
|
88
|
+
>
|
|
89
|
+
<div
|
|
90
|
+
class="es-simplicity-menus-box"
|
|
91
|
+
v-for="(item, index) in subMenus"
|
|
92
|
+
:key="item.id"
|
|
93
|
+
>
|
|
94
|
+
<div class="es-simplicity-menus-title">
|
|
95
|
+
<span class="es-simplicity-menus-title-text">{{
|
|
96
|
+
item.name || item.text || item.title
|
|
97
|
+
}}</span>
|
|
98
|
+
</div>
|
|
99
|
+
<menu-list
|
|
100
|
+
:active="actives[index + 1]"
|
|
101
|
+
:data="[...item.children, ...item.fourthTabs]"
|
|
102
|
+
:menuIcon="menuIcon"
|
|
103
|
+
:color="color"
|
|
104
|
+
:backgroundColor="backgroundColor"
|
|
105
|
+
:width="size"
|
|
106
|
+
@menter="
|
|
107
|
+
(res) => {
|
|
108
|
+
getData(res, index + 1, true);
|
|
109
|
+
}
|
|
110
|
+
"
|
|
111
|
+
@mleave="
|
|
112
|
+
(res) => {
|
|
113
|
+
getData(res, index + 1, false);
|
|
114
|
+
}
|
|
115
|
+
"
|
|
116
|
+
@command="handleCommand"
|
|
117
|
+
></menu-list>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</el-drawer>
|
|
122
|
+
</template>
|
|
123
|
+
|
|
124
|
+
<script>
|
|
125
|
+
import MenuList from './menu-list.vue';
|
|
126
|
+
export default {
|
|
127
|
+
name: 'SubMenu',
|
|
128
|
+
components: { MenuList },
|
|
129
|
+
props: {
|
|
130
|
+
mode: String,
|
|
131
|
+
collapse: Boolean,
|
|
132
|
+
title: String,
|
|
133
|
+
closed: Boolean,
|
|
134
|
+
color: {
|
|
135
|
+
type: [String, Array],
|
|
136
|
+
default: '#fff'
|
|
137
|
+
},
|
|
138
|
+
backgroundColor: {
|
|
139
|
+
type: [String, Array],
|
|
140
|
+
default() {
|
|
141
|
+
return [
|
|
142
|
+
'#FF9C52',
|
|
143
|
+
'#2591F7',
|
|
144
|
+
'#17C27B',
|
|
145
|
+
'#1265D7',
|
|
146
|
+
'#FFC724',
|
|
147
|
+
'#E34D59'
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
size: {
|
|
152
|
+
type: Number,
|
|
153
|
+
default: 220
|
|
154
|
+
},
|
|
155
|
+
visible: Boolean,
|
|
156
|
+
text: String,
|
|
157
|
+
menuIcon: String,
|
|
158
|
+
children: {
|
|
159
|
+
type: Array,
|
|
160
|
+
default() {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
fourthTabs: {
|
|
165
|
+
type: Array,
|
|
166
|
+
default() {
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
data() {
|
|
172
|
+
return {
|
|
173
|
+
fold: this.closed,
|
|
174
|
+
width: this.size,
|
|
175
|
+
subMenus: [],
|
|
176
|
+
isEnter: false,
|
|
177
|
+
timer: null,
|
|
178
|
+
actives: []
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
computed: {
|
|
182
|
+
menus() {
|
|
183
|
+
return [...this.children, ...this.fourthTabs];
|
|
184
|
+
},
|
|
185
|
+
show: {
|
|
186
|
+
get() {
|
|
187
|
+
return this.visible;
|
|
188
|
+
},
|
|
189
|
+
set(val) {
|
|
190
|
+
this.$emit('update:visible', val);
|
|
191
|
+
return val;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
watch: {
|
|
196
|
+
closed(val) {
|
|
197
|
+
this.fold = val;
|
|
198
|
+
if (val) {
|
|
199
|
+
this.width = 48;
|
|
200
|
+
} else {
|
|
201
|
+
this.width = this.size;
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
visible(val) {
|
|
205
|
+
val === false && (this.actives = []);
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
created() {},
|
|
209
|
+
mounted() {},
|
|
210
|
+
methods: {
|
|
211
|
+
handleFold(res) {
|
|
212
|
+
this.fold = res;
|
|
213
|
+
if (res) {
|
|
214
|
+
this.width = 48;
|
|
215
|
+
} else {
|
|
216
|
+
this.width = this.size;
|
|
217
|
+
}
|
|
218
|
+
this.$emit('update:closed', res);
|
|
219
|
+
},
|
|
220
|
+
handleCommand(res) {
|
|
221
|
+
this.$emit('command', res);
|
|
222
|
+
},
|
|
223
|
+
handleSelect(res) {
|
|
224
|
+
this.$emit('command', res.node);
|
|
225
|
+
},
|
|
226
|
+
getData(res, n, is) {
|
|
227
|
+
this.isEnter = is;
|
|
228
|
+
if (is) {
|
|
229
|
+
this.actives.splice(n);
|
|
230
|
+
if (this.actives[n]) {
|
|
231
|
+
this.actives[n] = res.id;
|
|
232
|
+
} else {
|
|
233
|
+
this.actives.push(res.id);
|
|
234
|
+
}
|
|
235
|
+
this.subMenus.splice(n);
|
|
236
|
+
let { children, fourthTabs } = res;
|
|
237
|
+
if (
|
|
238
|
+
(children && children.length) ||
|
|
239
|
+
(fourthTabs && fourthTabs.length)
|
|
240
|
+
) {
|
|
241
|
+
this.subMenus = this.subMenus.concat(res);
|
|
242
|
+
}
|
|
243
|
+
} else {
|
|
244
|
+
if (n == 0) {
|
|
245
|
+
clearTimeout(this.timer);
|
|
246
|
+
this.timer = setTimeout(() => {
|
|
247
|
+
if (res && !this.isEnter) {
|
|
248
|
+
this.subMenus = [];
|
|
249
|
+
this.actives = [];
|
|
250
|
+
}
|
|
251
|
+
}, 300);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
handleHover(res) {
|
|
256
|
+
this.isEnter = res;
|
|
257
|
+
//if(this)
|
|
258
|
+
},
|
|
259
|
+
clearSubmenu() {
|
|
260
|
+
this.$refs.menus.clearActive();
|
|
261
|
+
this.subMenus = [];
|
|
262
|
+
},
|
|
263
|
+
handleLeave() {
|
|
264
|
+
this.subMenus = [];
|
|
265
|
+
this.actives = [];
|
|
266
|
+
},
|
|
267
|
+
handleEnter() {
|
|
268
|
+
this.isEnter = true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
</script>
|
|
273
|
+
|
|
274
|
+
<style lang="scss" scoped></style>
|