eoss-ui 0.6.41 → 0.6.42

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.
Files changed (234) hide show
  1. package/lib/eoss-ui.common.js +1158 -1047
  2. package/lib/flow-list.js +123 -112
  3. package/lib/flow.js +882 -782
  4. package/lib/index.js +1 -1
  5. package/lib/main.js +132 -132
  6. package/lib/qr-code.js +13 -13
  7. package/lib/theme-chalk/flow.css +1 -1
  8. package/lib/theme-chalk/index.css +1 -1
  9. package/package.json +159 -159
  10. package/packages/button/index.js +5 -5
  11. package/packages/button/src/main.vue +418 -418
  12. package/packages/button-group/index.js +5 -5
  13. package/packages/button-group/src/main.vue +298 -298
  14. package/packages/calendar/index.js +5 -5
  15. package/packages/card/index.js +5 -5
  16. package/packages/card/src/main.vue +156 -156
  17. package/packages/cascader/index.js +5 -5
  18. package/packages/cascader/src/main.vue +168 -168
  19. package/packages/checkbox-group/index.js +5 -5
  20. package/packages/checkbox-group/src/main.vue +333 -333
  21. package/packages/clients/index.js +5 -5
  22. package/packages/clients/src/main.vue +144 -144
  23. package/packages/data-table/index.js +5 -5
  24. package/packages/data-table/src/children.vue +39 -39
  25. package/packages/data-table/src/column.vue +989 -989
  26. package/packages/data-table/src/main.vue +1822 -1822
  27. package/packages/data-table/src/sizer.vue +195 -195
  28. package/packages/data-table-form/index.js +5 -5
  29. package/packages/data-table-form/src/checkbox.vue +101 -101
  30. package/packages/data-table-form/src/colgroup.vue +17 -17
  31. package/packages/data-table-form/src/main.vue +181 -181
  32. package/packages/data-table-form/src/radio.vue +65 -65
  33. package/packages/data-table-form/src/table.vue +233 -233
  34. package/packages/data-table-form/src/tbody.vue +336 -336
  35. package/packages/data-table-form/src/thead.vue +68 -68
  36. package/packages/date-picker/index.js +5 -5
  37. package/packages/date-picker/src/main.vue +236 -236
  38. package/packages/dialog/index.js +5 -5
  39. package/packages/enterprise/index.js +5 -5
  40. package/packages/enterprise/src/main.vue +66 -66
  41. package/packages/error-page/index.js +5 -5
  42. package/packages/error-page/src/main.vue +44 -44
  43. package/packages/flow/index.js +5 -5
  44. package/packages/flow/src/component/CommonOpinions.vue +345 -345
  45. package/packages/flow/src/component/CustomPreset.vue +322 -322
  46. package/packages/flow/src/component/FileList.vue +99 -99
  47. package/packages/flow/src/component/Preset.vue +255 -255
  48. package/packages/flow/src/component/SendMsg.vue +229 -229
  49. package/packages/flow/src/component/TimeLimit.vue +190 -190
  50. package/packages/flow/src/component/taskUnionExamine.vue +611 -611
  51. package/packages/flow/src/form.vue +121 -121
  52. package/packages/flow/src/freeStartFlow.vue +2843 -2843
  53. package/packages/flow/src/main.vue +2952 -2862
  54. package/packages/flow/src/processForm.vue +1018 -1018
  55. package/packages/flow/src/processReject.vue +293 -293
  56. package/packages/flow/src/reset.vue +899 -899
  57. package/packages/flow/src/startTaskRead.vue +596 -596
  58. package/packages/flow/src/table.vue +58 -58
  59. package/packages/flow-group/index.js +5 -5
  60. package/packages/flow-group/src/main.vue +688 -688
  61. package/packages/flow-list/index.js +5 -5
  62. package/packages/flow-list/src/main.vue +1183 -1172
  63. package/packages/form/index.js +5 -5
  64. package/packages/form/src/main.vue +3584 -3584
  65. package/packages/form/src/table.vue +1420 -1420
  66. package/packages/handle-user/index.js +5 -5
  67. package/packages/handle-user/src/main.vue +138 -138
  68. package/packages/handler/index.js +5 -5
  69. package/packages/handler/src/main.vue +474 -474
  70. package/packages/icon/index.js +5 -5
  71. package/packages/icon/src/main.vue +101 -101
  72. package/packages/icons/index.js +5 -5
  73. package/packages/icons/src/main.vue +81 -81
  74. package/packages/input/index.js +5 -5
  75. package/packages/input/src/main.vue +356 -356
  76. package/packages/input-number/index.js +5 -5
  77. package/packages/input-number/src/main.vue +106 -106
  78. package/packages/label/index.js +5 -5
  79. package/packages/label/src/main.vue +457 -457
  80. package/packages/layout/index.js +5 -5
  81. package/packages/layout/src/item.vue +152 -152
  82. package/packages/layout/src/main.vue +31 -31
  83. package/packages/login/index.js +5 -5
  84. package/packages/login/src/main.vue +1935 -1935
  85. package/packages/login/src/resetPassword.vue +562 -562
  86. package/packages/main/index.js +5 -5
  87. package/packages/main/src/default/message.vue +249 -249
  88. package/packages/main/src/default/notice.vue +157 -157
  89. package/packages/main/src/default/userinfo.vue +505 -505
  90. package/packages/main/src/public/online.vue +89 -89
  91. package/packages/main/src/public/search.vue +461 -461
  92. package/packages/main/src/public/settings.vue +221 -221
  93. package/packages/main/src/simplicity/apps.vue +388 -388
  94. package/packages/main/src/simplicity/avatar.vue +82 -82
  95. package/packages/main/src/simplicity/handler.vue +259 -259
  96. package/packages/main/src/simplicity/index.vue +2047 -2047
  97. package/packages/main/src/simplicity/lists.vue +84 -84
  98. package/packages/main/src/simplicity/menu-list.vue +128 -128
  99. package/packages/main/src/simplicity/message.vue +259 -259
  100. package/packages/main/src/simplicity/notice.vue +190 -190
  101. package/packages/main/src/simplicity/router-page.vue +45 -45
  102. package/packages/main/src/simplicity/sub-menu.vue +241 -241
  103. package/packages/main/src/simplicity/user.vue +257 -257
  104. package/packages/main/src/simplicity/userinfo.vue +312 -312
  105. package/packages/menu/index.js +5 -5
  106. package/packages/menu/src/main.vue +536 -536
  107. package/packages/nav/index.js +5 -5
  108. package/packages/nav/src/main.vue +402 -402
  109. package/packages/notify/index.js +5 -5
  110. package/packages/notify/src/main.vue +538 -538
  111. package/packages/page/index.js +5 -5
  112. package/packages/page/src/main.vue +167 -167
  113. package/packages/pagination/index.js +5 -5
  114. package/packages/pagination/src/main.vue +96 -96
  115. package/packages/player/index.js +5 -5
  116. package/packages/player/src/main.vue +194 -194
  117. package/packages/qr-code/index.js +5 -5
  118. package/packages/qr-code/src/main.vue +170 -170
  119. package/packages/radio-group/index.js +6 -6
  120. package/packages/radio-group/src/main.vue +319 -319
  121. package/packages/retrial-auth/index.js +5 -5
  122. package/packages/retrial-auth/src/main.vue +280 -280
  123. package/packages/select/index.js +5 -5
  124. package/packages/select/src/main.vue +775 -775
  125. package/packages/select-ganged/index.js +5 -5
  126. package/packages/select-ganged/src/main.vue +724 -724
  127. package/packages/selector/index.js +5 -5
  128. package/packages/selector/src/main.vue +689 -689
  129. package/packages/selector-panel/index.js +5 -5
  130. package/packages/selector-panel/src/main.vue +1027 -1027
  131. package/packages/selector-panel/src/selection.vue +177 -177
  132. package/packages/selector-panel/src/tree.vue +129 -129
  133. package/packages/sizer/index.js +5 -5
  134. package/packages/sizer/src/main.vue +254 -254
  135. package/packages/steps/index.js +5 -5
  136. package/packages/steps/src/main.vue +181 -181
  137. package/packages/switch/index.js +5 -5
  138. package/packages/switch/src/main.vue +154 -154
  139. package/packages/table-form/index.js +5 -5
  140. package/packages/tabs/index.js +5 -5
  141. package/packages/tabs/src/main.vue +788 -788
  142. package/packages/tabs-panel/index.js +5 -5
  143. package/packages/tabs-panel/src/main.vue +29 -29
  144. package/packages/theme-chalk/lib/flow.css +1 -1
  145. package/packages/theme-chalk/lib/index.css +1 -1
  146. package/packages/theme-chalk/src/base.scss +260 -260
  147. package/packages/theme-chalk/src/button-group.scss +175 -175
  148. package/packages/theme-chalk/src/button.scss +24 -24
  149. package/packages/theme-chalk/src/calendar.scss +113 -113
  150. package/packages/theme-chalk/src/card.scss +99 -99
  151. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  152. package/packages/theme-chalk/src/clients.scss +87 -87
  153. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  154. package/packages/theme-chalk/src/data-table.scss +293 -293
  155. package/packages/theme-chalk/src/date-picker.scss +7 -7
  156. package/packages/theme-chalk/src/dialog.scss +77 -77
  157. package/packages/theme-chalk/src/enterprise.scss +5 -5
  158. package/packages/theme-chalk/src/error-page.scss +18 -18
  159. package/packages/theme-chalk/src/flow-group.scss +110 -110
  160. package/packages/theme-chalk/src/flow-list.scss +36 -36
  161. package/packages/theme-chalk/src/flow.scss +318 -310
  162. package/packages/theme-chalk/src/form.scss +496 -496
  163. package/packages/theme-chalk/src/handle-user.scss +40 -40
  164. package/packages/theme-chalk/src/handler.scss +143 -143
  165. package/packages/theme-chalk/src/icon.scss +1789 -1789
  166. package/packages/theme-chalk/src/icons.scss +99 -99
  167. package/packages/theme-chalk/src/input.scss +9 -9
  168. package/packages/theme-chalk/src/label.scss +24 -24
  169. package/packages/theme-chalk/src/layout.scss +46 -46
  170. package/packages/theme-chalk/src/login.scss +947 -947
  171. package/packages/theme-chalk/src/main.scss +639 -639
  172. package/packages/theme-chalk/src/menu.scss +222 -222
  173. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  174. package/packages/theme-chalk/src/nav.scss +125 -125
  175. package/packages/theme-chalk/src/page.scss +3 -3
  176. package/packages/theme-chalk/src/pagination.scss +29 -29
  177. package/packages/theme-chalk/src/player.scss +9 -9
  178. package/packages/theme-chalk/src/qr-code.scss +17 -17
  179. package/packages/theme-chalk/src/radio-group.scss +9 -9
  180. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  181. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  182. package/packages/theme-chalk/src/select.scss +8 -8
  183. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  184. package/packages/theme-chalk/src/selector.scss +91 -91
  185. package/packages/theme-chalk/src/simplicity.scss +1262 -1262
  186. package/packages/theme-chalk/src/sizer.scss +36 -36
  187. package/packages/theme-chalk/src/steps.scss +88 -88
  188. package/packages/theme-chalk/src/switch.scss +3 -3
  189. package/packages/theme-chalk/src/table-form.scss +1 -1
  190. package/packages/theme-chalk/src/tabs.scss +87 -87
  191. package/packages/theme-chalk/src/tips.scss +7 -7
  192. package/packages/theme-chalk/src/toolbar.scss +179 -179
  193. package/packages/theme-chalk/src/tree-group.scss +72 -72
  194. package/packages/theme-chalk/src/tree.scss +165 -165
  195. package/packages/theme-chalk/src/upload.scss +167 -167
  196. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  197. package/packages/tips/index.js +5 -5
  198. package/packages/tips/src/main.vue +141 -141
  199. package/packages/toolbar/index.js +5 -5
  200. package/packages/toolbar/src/main.vue +430 -430
  201. package/packages/tree/index.js +5 -5
  202. package/packages/tree-group/index.js +5 -5
  203. package/packages/upload/index.js +5 -5
  204. package/packages/upload/src/main.vue +1334 -1334
  205. package/packages/upload/src/picture.js +15 -15
  206. package/packages/wujie/index.js +5 -5
  207. package/packages/wujie/src/main.vue +145 -145
  208. package/packages/wxlogin/index.js +5 -5
  209. package/packages/wxlogin/src/main.vue +128 -128
  210. package/src/config/api.js +248 -248
  211. package/src/config/image.js +2 -2
  212. package/src/index.js +157 -157
  213. package/src/utils/bus.js +3 -3
  214. package/src/utils/date-util.js +312 -312
  215. package/src/utils/http.js +50 -50
  216. package/src/utils/rules.js +18 -18
  217. package/src/utils/store.js +21 -21
  218. package/src/utils/webSocket.js +107 -107
  219. package/packages/.DS_Store +0 -0
  220. package/packages/data-table/.DS_Store +0 -0
  221. package/packages/data-table-form/.DS_Store +0 -0
  222. package/packages/error-page/.DS_Store +0 -0
  223. package/packages/flow/.DS_Store +0 -0
  224. package/packages/form/.DS_Store +0 -0
  225. package/packages/login/.DS_Store +0 -0
  226. package/packages/main/.DS_Store +0 -0
  227. package/packages/main/src/.DS_Store +0 -0
  228. package/packages/selector/.DS_Store +0 -0
  229. package/packages/selector-panel/.DS_Store +0 -0
  230. package/packages/sizer/.DS_Store +0 -0
  231. package/packages/tabs/.DS_Store +0 -0
  232. package/packages/theme-chalk/src/.DS_Store +0 -0
  233. package/packages/upload/.DS_Store +0 -0
  234. package/src/.DS_Store +0 -0
@@ -1,241 +1,241 @@
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
- <span class="es-simplicity-menus-title-text" v-if="!fold">{{
21
- title || text
22
- }}</span>
23
- <i
24
- class="es-icon-shouqicaidan es-simplicity-menus-title-icon"
25
- v-show="!fold"
26
- @click="handleFold(true)"
27
- ></i>
28
- <i
29
- class="es-icon-shouqicaidan-right es-simplicity-menus-title-icon"
30
- v-show="fold"
31
- @click="handleFold(false)"
32
- ></i>
33
- </div>
34
- <menu-list
35
- :active="actives[0]"
36
- :data="menus"
37
- :menuIcon="menuIcon"
38
- :color="color"
39
- :backgroundColor="backgroundColor"
40
- :fold="fold"
41
- :width="size"
42
- @menter="
43
- (res) => {
44
- this.getData(res, 0, true);
45
- }
46
- "
47
- @mleave="
48
- (res) => {
49
- this.getData(res, 0, false);
50
- }
51
- "
52
- @hover="handleHover"
53
- @command="handleCommand"
54
- ></menu-list>
55
- </div>
56
- <div
57
- class="es-simplicity-menus-view"
58
- @mouseleave="handleLeave"
59
- @mouseenter="handleEnter"
60
- v-show="subMenus.length"
61
- >
62
- <div
63
- class="es-simplicity-menus-box"
64
- v-for="(item, index) in subMenus"
65
- :key="item.id"
66
- >
67
- <div class="es-simplicity-menus-title">
68
- <span class="es-simplicity-menus-title-text">{{
69
- item.name || item.text || item.title
70
- }}</span>
71
- </div>
72
- <menu-list
73
- :active="actives[index + 1]"
74
- :data="[...item.children, ...item.fourthTabs]"
75
- :menuIcon="menuIcon"
76
- :color="color"
77
- :backgroundColor="backgroundColor"
78
- :width="size"
79
- @menter="
80
- (res) => {
81
- getData(res, index + 1, true);
82
- }
83
- "
84
- @mleave="
85
- (res) => {
86
- getData(res, index + 1, false);
87
- }
88
- "
89
- @command="handleCommand"
90
- ></menu-list>
91
- </div>
92
- </div>
93
- </div>
94
- </el-drawer>
95
- </template>
96
-
97
- <script>
98
- import MenuList from './menu-list.vue';
99
- export default {
100
- name: 'SubMenu',
101
- components: { MenuList },
102
- props: {
103
- mode: String,
104
- title: String,
105
- active: String,
106
- closed: Boolean,
107
- color: {
108
- type: [String, Array],
109
- default: '#fff'
110
- },
111
- backgroundColor: {
112
- type: [String, Array],
113
- default() {
114
- return [
115
- '#FF9C52',
116
- '#2591F7',
117
- '#17C27B',
118
- '#1265D7',
119
- '#FFC724',
120
- '#E34D59'
121
- ];
122
- }
123
- },
124
- size: {
125
- type: Number,
126
- default: 220
127
- },
128
- visible: Boolean,
129
- text: String,
130
- menuIcon: String,
131
- children: {
132
- type: Array,
133
- default() {
134
- return [];
135
- }
136
- },
137
- fourthTabs: {
138
- type: Array,
139
- default() {
140
- return [];
141
- }
142
- }
143
- },
144
- data() {
145
- return {
146
- fold: this.closed,
147
- width: this.size,
148
- subMenus: [],
149
- isEnter: false,
150
- timer: null,
151
- actives: []
152
- };
153
- },
154
- computed: {
155
- menus() {
156
- return [...this.children, ...this.fourthTabs];
157
- },
158
- show: {
159
- get() {
160
- return this.visible;
161
- },
162
- set(val) {
163
- this.$emit('update:visible', val);
164
- return val;
165
- }
166
- }
167
- },
168
- watch: {
169
- closed(val) {
170
- this.fold = val;
171
- if (val) {
172
- this.width = 48;
173
- } else {
174
- this.width = this.size;
175
- }
176
- }
177
- },
178
- created() {},
179
- mounted() {},
180
- methods: {
181
- handleFold(res) {
182
- this.fold = res;
183
- if (res) {
184
- this.width = 48;
185
- } else {
186
- this.width = this.size;
187
- }
188
- this.$emit('update:closed', res);
189
- },
190
- handleCommand(res) {
191
- this.$emit('command', res);
192
- },
193
- getData(res, n, is) {
194
- this.isEnter = is;
195
- if (is) {
196
- this.actives.splice(n);
197
- if (this.actives[n]) {
198
- this.actives[n] = res.id;
199
- } else {
200
- this.actives.push(res.id);
201
- }
202
- this.subMenus.splice(n);
203
- let { children, fourthTabs } = res;
204
- if (
205
- (children && children.length) ||
206
- (fourthTabs && fourthTabs.length)
207
- ) {
208
- this.subMenus = this.subMenus.concat(res);
209
- }
210
- } else {
211
- if (n == 0) {
212
- clearTimeout(this.timer);
213
- this.timer = setTimeout(() => {
214
- if (res && !this.isEnter) {
215
- this.subMenus = [];
216
- this.actives = [];
217
- }
218
- }, 300);
219
- }
220
- }
221
- },
222
- handleHover(res) {
223
- this.isEnter = res;
224
- //if(this)
225
- },
226
- clearSubmenu() {
227
- this.$refs.menus.clearActive();
228
- this.subMenus = [];
229
- },
230
- handleLeave() {
231
- this.subMenus = [];
232
- this.actives = [];
233
- },
234
- handleEnter() {
235
- this.isEnter = true;
236
- }
237
- }
238
- };
239
- </script>
240
-
241
- <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
+ <span class="es-simplicity-menus-title-text" v-if="!fold">{{
21
+ title || text
22
+ }}</span>
23
+ <i
24
+ class="es-icon-shouqicaidan es-simplicity-menus-title-icon"
25
+ v-show="!fold"
26
+ @click="handleFold(true)"
27
+ ></i>
28
+ <i
29
+ class="es-icon-shouqicaidan-right es-simplicity-menus-title-icon"
30
+ v-show="fold"
31
+ @click="handleFold(false)"
32
+ ></i>
33
+ </div>
34
+ <menu-list
35
+ :active="actives[0]"
36
+ :data="menus"
37
+ :menuIcon="menuIcon"
38
+ :color="color"
39
+ :backgroundColor="backgroundColor"
40
+ :fold="fold"
41
+ :width="size"
42
+ @menter="
43
+ (res) => {
44
+ this.getData(res, 0, true);
45
+ }
46
+ "
47
+ @mleave="
48
+ (res) => {
49
+ this.getData(res, 0, false);
50
+ }
51
+ "
52
+ @hover="handleHover"
53
+ @command="handleCommand"
54
+ ></menu-list>
55
+ </div>
56
+ <div
57
+ class="es-simplicity-menus-view"
58
+ @mouseleave="handleLeave"
59
+ @mouseenter="handleEnter"
60
+ v-show="subMenus.length"
61
+ >
62
+ <div
63
+ class="es-simplicity-menus-box"
64
+ v-for="(item, index) in subMenus"
65
+ :key="item.id"
66
+ >
67
+ <div class="es-simplicity-menus-title">
68
+ <span class="es-simplicity-menus-title-text">{{
69
+ item.name || item.text || item.title
70
+ }}</span>
71
+ </div>
72
+ <menu-list
73
+ :active="actives[index + 1]"
74
+ :data="[...item.children, ...item.fourthTabs]"
75
+ :menuIcon="menuIcon"
76
+ :color="color"
77
+ :backgroundColor="backgroundColor"
78
+ :width="size"
79
+ @menter="
80
+ (res) => {
81
+ getData(res, index + 1, true);
82
+ }
83
+ "
84
+ @mleave="
85
+ (res) => {
86
+ getData(res, index + 1, false);
87
+ }
88
+ "
89
+ @command="handleCommand"
90
+ ></menu-list>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </el-drawer>
95
+ </template>
96
+
97
+ <script>
98
+ import MenuList from './menu-list.vue';
99
+ export default {
100
+ name: 'SubMenu',
101
+ components: { MenuList },
102
+ props: {
103
+ mode: String,
104
+ title: String,
105
+ active: String,
106
+ closed: Boolean,
107
+ color: {
108
+ type: [String, Array],
109
+ default: '#fff'
110
+ },
111
+ backgroundColor: {
112
+ type: [String, Array],
113
+ default() {
114
+ return [
115
+ '#FF9C52',
116
+ '#2591F7',
117
+ '#17C27B',
118
+ '#1265D7',
119
+ '#FFC724',
120
+ '#E34D59'
121
+ ];
122
+ }
123
+ },
124
+ size: {
125
+ type: Number,
126
+ default: 220
127
+ },
128
+ visible: Boolean,
129
+ text: String,
130
+ menuIcon: String,
131
+ children: {
132
+ type: Array,
133
+ default() {
134
+ return [];
135
+ }
136
+ },
137
+ fourthTabs: {
138
+ type: Array,
139
+ default() {
140
+ return [];
141
+ }
142
+ }
143
+ },
144
+ data() {
145
+ return {
146
+ fold: this.closed,
147
+ width: this.size,
148
+ subMenus: [],
149
+ isEnter: false,
150
+ timer: null,
151
+ actives: []
152
+ };
153
+ },
154
+ computed: {
155
+ menus() {
156
+ return [...this.children, ...this.fourthTabs];
157
+ },
158
+ show: {
159
+ get() {
160
+ return this.visible;
161
+ },
162
+ set(val) {
163
+ this.$emit('update:visible', val);
164
+ return val;
165
+ }
166
+ }
167
+ },
168
+ watch: {
169
+ closed(val) {
170
+ this.fold = val;
171
+ if (val) {
172
+ this.width = 48;
173
+ } else {
174
+ this.width = this.size;
175
+ }
176
+ }
177
+ },
178
+ created() {},
179
+ mounted() {},
180
+ methods: {
181
+ handleFold(res) {
182
+ this.fold = res;
183
+ if (res) {
184
+ this.width = 48;
185
+ } else {
186
+ this.width = this.size;
187
+ }
188
+ this.$emit('update:closed', res);
189
+ },
190
+ handleCommand(res) {
191
+ this.$emit('command', res);
192
+ },
193
+ getData(res, n, is) {
194
+ this.isEnter = is;
195
+ if (is) {
196
+ this.actives.splice(n);
197
+ if (this.actives[n]) {
198
+ this.actives[n] = res.id;
199
+ } else {
200
+ this.actives.push(res.id);
201
+ }
202
+ this.subMenus.splice(n);
203
+ let { children, fourthTabs } = res;
204
+ if (
205
+ (children && children.length) ||
206
+ (fourthTabs && fourthTabs.length)
207
+ ) {
208
+ this.subMenus = this.subMenus.concat(res);
209
+ }
210
+ } else {
211
+ if (n == 0) {
212
+ clearTimeout(this.timer);
213
+ this.timer = setTimeout(() => {
214
+ if (res && !this.isEnter) {
215
+ this.subMenus = [];
216
+ this.actives = [];
217
+ }
218
+ }, 300);
219
+ }
220
+ }
221
+ },
222
+ handleHover(res) {
223
+ this.isEnter = res;
224
+ //if(this)
225
+ },
226
+ clearSubmenu() {
227
+ this.$refs.menus.clearActive();
228
+ this.subMenus = [];
229
+ },
230
+ handleLeave() {
231
+ this.subMenus = [];
232
+ this.actives = [];
233
+ },
234
+ handleEnter() {
235
+ this.isEnter = true;
236
+ }
237
+ }
238
+ };
239
+ </script>
240
+
241
+ <style lang="scss" scoped></style>