eoss-ui 0.5.81-beta2 → 0.5.81-beta21

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 (131) hide show
  1. package/lib/button-group.js +76 -53
  2. package/lib/button.js +51 -46
  3. package/lib/checkbox-group.js +49 -45
  4. package/lib/clients.js +4 -3
  5. package/lib/config/api.js +3 -1
  6. package/lib/data-table-form.js +49 -45
  7. package/lib/data-table.js +471 -256
  8. package/lib/date-picker.js +49 -45
  9. package/lib/dialog.js +71 -70
  10. package/lib/eoss-ui.common.js +4165 -2449
  11. package/lib/flow-group.js +98 -63
  12. package/lib/flow-list.js +50 -46
  13. package/lib/flow.js +152 -83
  14. package/lib/form.js +96 -49
  15. package/lib/handle-user.js +66 -49
  16. package/lib/handler.js +61 -48
  17. package/lib/icon.js +49 -45
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +49 -45
  20. package/lib/input.js +49 -45
  21. package/lib/login.js +64 -53
  22. package/lib/main.js +2677 -1479
  23. package/lib/menu.js +1 -1
  24. package/lib/nav.js +49 -45
  25. package/lib/notify.js +54 -50
  26. package/lib/page.js +49 -45
  27. package/lib/pagination.js +3719 -3
  28. package/lib/player.js +54 -50
  29. package/lib/qr-code.js +49 -45
  30. package/lib/radio-group.js +49 -45
  31. package/lib/retrial-auth.js +50 -46
  32. package/lib/select-ganged.js +49 -45
  33. package/lib/select.js +50 -46
  34. package/lib/selector-panel.js +117 -65
  35. package/lib/selector.js +493 -422
  36. package/lib/sizer.js +49 -45
  37. package/lib/steps.js +49 -45
  38. package/lib/switch.js +49 -45
  39. package/lib/table-form.js +49 -45
  40. package/lib/tabs.js +86 -79
  41. package/lib/theme-chalk/base.css +1 -1
  42. package/lib/theme-chalk/button-group.css +1 -1
  43. package/lib/theme-chalk/data-table.css +1 -1
  44. package/lib/theme-chalk/handler.css +1 -1
  45. package/lib/theme-chalk/index.css +1 -1
  46. package/lib/theme-chalk/main.css +1 -1
  47. package/lib/theme-chalk/menu.css +1 -1
  48. package/lib/theme-chalk/nav.css +1 -1
  49. package/lib/theme-chalk/pagination.css +1 -1
  50. package/lib/theme-chalk/selector-panel.css +1 -1
  51. package/lib/theme-chalk/simplicity.css +1 -1
  52. package/lib/theme-chalk/sizer.css +1 -1
  53. package/lib/theme-chalk/tabs.css +1 -1
  54. package/lib/theme-chalk/toolbar.css +1 -1
  55. package/lib/theme-chalk/tree.css +1 -1
  56. package/lib/theme-chalk/upload.css +1 -1
  57. package/lib/tips.js +49 -45
  58. package/lib/tree-group.js +49 -45
  59. package/lib/tree.js +49 -45
  60. package/lib/upload.js +59 -55
  61. package/lib/wujie.js +49 -45
  62. package/lib/wxlogin.js +49 -45
  63. package/package.json +3 -3
  64. package/packages/button/src/main.vue +2 -1
  65. package/packages/button-group/src/main.vue +8 -6
  66. package/packages/clients/src/main.vue +2 -1
  67. package/packages/data-table/src/column.vue +132 -53
  68. package/packages/data-table/src/formItem.vue +430 -0
  69. package/packages/data-table/src/main.vue +85 -45
  70. package/packages/data-table/src/sizer.vue +2 -0
  71. package/packages/dialog/src/main.vue +17 -23
  72. package/packages/flow/src/main.vue +32 -17
  73. package/packages/flow-group/src/main.vue +18 -11
  74. package/packages/form/src/main.vue +45 -10
  75. package/packages/handle-user/src/main.vue +10 -3
  76. package/packages/handler/src/main.vue +5 -3
  77. package/packages/login/src/main.vue +13 -6
  78. package/packages/main/src/default/index.vue +102 -179
  79. package/packages/main/src/main.vue +243 -16
  80. package/packages/main/src/public/online.vue +90 -0
  81. package/packages/main/src/simplicity/apps.vue +176 -145
  82. package/packages/main/src/simplicity/avatar.vue +16 -6
  83. package/packages/main/src/simplicity/handler.vue +6 -2
  84. package/packages/main/src/simplicity/index.vue +555 -344
  85. package/packages/main/src/simplicity/menu-list.vue +75 -24
  86. package/packages/main/src/simplicity/message.vue +35 -25
  87. package/packages/main/src/simplicity/notice.vue +72 -39
  88. package/packages/main/src/simplicity/router-page.vue +44 -0
  89. package/packages/main/src/simplicity/settings.vue +1 -1
  90. package/packages/main/src/simplicity/sub-menu.vue +169 -54
  91. package/packages/main/src/simplicity/user.vue +10 -5
  92. package/packages/main/src/simplicity/userinfo.vue +1 -0
  93. package/packages/menu/src/main.vue +4 -3
  94. package/packages/pagination/src/main.vue +20 -1
  95. package/packages/select/src/main.vue +4 -1
  96. package/packages/selector/src/main.vue +152 -136
  97. package/packages/selector-panel/src/main.vue +23 -9
  98. package/packages/selector-panel/src/selection.vue +8 -2
  99. package/packages/tabs/src/main.vue +14 -14
  100. package/packages/theme-chalk/lib/base.css +1 -1
  101. package/packages/theme-chalk/lib/button-group.css +1 -1
  102. package/packages/theme-chalk/lib/data-table.css +1 -1
  103. package/packages/theme-chalk/lib/handler.css +1 -1
  104. package/packages/theme-chalk/lib/index.css +1 -1
  105. package/packages/theme-chalk/lib/main.css +1 -1
  106. package/packages/theme-chalk/lib/menu.css +1 -1
  107. package/packages/theme-chalk/lib/nav.css +1 -1
  108. package/packages/theme-chalk/lib/pagination.css +1 -1
  109. package/packages/theme-chalk/lib/selector-panel.css +1 -1
  110. package/packages/theme-chalk/lib/simplicity.css +1 -1
  111. package/packages/theme-chalk/lib/sizer.css +1 -1
  112. package/packages/theme-chalk/lib/tabs.css +1 -1
  113. package/packages/theme-chalk/lib/toolbar.css +1 -1
  114. package/packages/theme-chalk/lib/tree.css +1 -1
  115. package/packages/theme-chalk/lib/upload.css +1 -1
  116. package/packages/theme-chalk/src/base.scss +5 -0
  117. package/packages/theme-chalk/src/button-group.scss +18 -4
  118. package/packages/theme-chalk/src/common/var.scss +9 -2
  119. package/packages/theme-chalk/src/data-table.scss +60 -23
  120. package/packages/theme-chalk/src/handler.scss +5 -1
  121. package/packages/theme-chalk/src/login.scss +2 -2
  122. package/packages/theme-chalk/src/nav.scss +3 -2
  123. package/packages/theme-chalk/src/pagination.scss +7 -0
  124. package/packages/theme-chalk/src/selector-panel.scss +2 -1
  125. package/packages/theme-chalk/src/simplicity.scss +355 -58
  126. package/packages/theme-chalk/src/tabs.scss +24 -28
  127. package/packages/theme-chalk/src/toolbar.scss +16 -4
  128. package/packages/theme-chalk/src/tree.scss +4 -2
  129. package/packages/upload/src/main.vue +3 -1
  130. package/src/config/api.js +3 -1
  131. package/src/index.js +1 -1
@@ -0,0 +1,430 @@
1
+ <template>
2
+ <el-form-item
3
+ :name="name"
4
+ :prop="field || prop"
5
+ :rules="rules"
6
+ :index="index"
7
+ >
8
+ <es-select
9
+ v-if="type == 'select'"
10
+ v-bind="formOption"
11
+ :data="option"
12
+ v-model="model"
13
+ @blur="
14
+ (event) => {
15
+ handleBlur({
16
+ item: config,
17
+ event: event,
18
+ data: scope.row,
19
+ scope: scope
20
+ });
21
+ }
22
+ "
23
+ @focus="
24
+ (event) => {
25
+ handleFocus({
26
+ item: config,
27
+ event: event,
28
+ data: scope.row,
29
+ scope: scope
30
+ });
31
+ }
32
+ "
33
+ @change="
34
+ (value) => {
35
+ handleChange({
36
+ item: config,
37
+ name: field || prop,
38
+ value: value,
39
+ data: scope.row,
40
+ scope: scope
41
+ });
42
+ }
43
+ "
44
+ ></es-select>
45
+ <es-cascader
46
+ v-else-if="getType('cascader', scope)"
47
+ v-bind="formOption"
48
+ :data="option"
49
+ v-model="scope.row[field || prop]"
50
+ @blur="
51
+ (event) => {
52
+ handleBlur({
53
+ item: config,
54
+ event: event,
55
+ data: scope.row,
56
+ scope: scope
57
+ });
58
+ }
59
+ "
60
+ @focus="
61
+ (event) => {
62
+ handleFocus({
63
+ item: config,
64
+ event: event,
65
+ data: scope.row,
66
+ scope: scope
67
+ });
68
+ }
69
+ "
70
+ @change="
71
+ (value) => {
72
+ handleChange({
73
+ item: config,
74
+ name: field || prop,
75
+ value: value,
76
+ data: scope.row,
77
+ scope: scope
78
+ });
79
+ }
80
+ "
81
+ >
82
+ </es-cascader>
83
+ <es-select-ganged
84
+ v-else-if="getType('ganged', scope)"
85
+ v-bind="formOption"
86
+ :data="init(option, config)"
87
+ v-model="scope.row[field || prop]"
88
+ @change="
89
+ (value) => {
90
+ handleChange({
91
+ name: field || prop,
92
+ value: value,
93
+ data: scope.row,
94
+ item: item
95
+ });
96
+ }
97
+ "
98
+ ></es-select-ganged>
99
+ <es-radio-group
100
+ v-else-if="getType('radio', scope)"
101
+ v-bind="formOption"
102
+ :data="option"
103
+ v-model="scope.row[field || prop]"
104
+ @change="
105
+ (value) => {
106
+ handleChange({
107
+ item: config,
108
+ name: field || prop,
109
+ value: value,
110
+ data: scope.row
111
+ });
112
+ }
113
+ "
114
+ ></es-radio-group>
115
+ <es-checkbox-group
116
+ v-else-if="getType('checkbox', scope)"
117
+ v-bind="formOption"
118
+ :data="option"
119
+ v-model="scope.row[field || prop]"
120
+ @change="
121
+ (value) => {
122
+ handleChange({
123
+ item: config,
124
+ name: field || prop,
125
+ value: value,
126
+ data: scope.row
127
+ });
128
+ }
129
+ "
130
+ ></es-checkbox-group>
131
+ <es-switch
132
+ v-else-if="getType('switch', scope)"
133
+ v-bind="formOption"
134
+ :data="option"
135
+ v-model="scope.row[field || prop]"
136
+ @change="
137
+ (value) => {
138
+ handleChange({
139
+ item: config,
140
+ name: field || prop,
141
+ value: value,
142
+ data: scope.row
143
+ });
144
+ }
145
+ "
146
+ ></es-switch>
147
+ <es-date-picker
148
+ v-else-if="
149
+ config.date ||
150
+ getType(
151
+ type,
152
+ [
153
+ 'date',
154
+ 'year',
155
+ 'month',
156
+ 'date',
157
+ 'dates',
158
+ 'week',
159
+ 'datetime',
160
+ 'datetimerange',
161
+ 'daterange',
162
+ 'monthrange',
163
+ 'quarter',
164
+ 'halfyear'
165
+ ],
166
+ scope
167
+ )
168
+ "
169
+ v-bind="formOption"
170
+ v-model="scope.row[field || prop]"
171
+ :type="type"
172
+ @blur="
173
+ (event) => {
174
+ handleBlur({
175
+ item: config,
176
+ event: event,
177
+ data: scope.row,
178
+ scope: scope
179
+ });
180
+ }
181
+ "
182
+ @focus="
183
+ (event) => {
184
+ handleFocus({
185
+ item: config,
186
+ event: event,
187
+ data: scope.row,
188
+ scope: scope
189
+ });
190
+ }
191
+ "
192
+ @change="
193
+ (value) => {
194
+ handleChange({
195
+ item: config,
196
+ name: field || prop,
197
+ value: value,
198
+ data: scope.row,
199
+ scope: scope
200
+ });
201
+ }
202
+ "
203
+ ></es-date-picker>
204
+ <es-input-number
205
+ v-else-if="getType('number', scope)"
206
+ v-bind="formOption"
207
+ v-model="scope.row[field || prop]"
208
+ @blur="
209
+ (event) => {
210
+ handleBlur({
211
+ item: config,
212
+ event: event,
213
+ data: scope.row,
214
+ scope: scope
215
+ });
216
+ }
217
+ "
218
+ @focus="
219
+ (event) => {
220
+ handleFocus({
221
+ item: config,
222
+ event: event,
223
+ data: scope.row,
224
+ scope: scope
225
+ });
226
+ }
227
+ "
228
+ @change="
229
+ (value) => {
230
+ handleChange({
231
+ item: config,
232
+ name: field || prop,
233
+ value: value,
234
+ data: scope.row,
235
+ scope: scope
236
+ });
237
+ }
238
+ "
239
+ ></es-input-number>
240
+ <es-selector
241
+ v-else-if="getType('selector', scope)"
242
+ v-bind="formOption"
243
+ v-model="scope.row[field || prop]"
244
+ v-on="
245
+ exclAttribute({
246
+ data: events,
247
+ attrs: 'change'
248
+ })
249
+ "
250
+ @change="
251
+ (value) => {
252
+ handleChange({
253
+ item: config,
254
+ name: field || prop,
255
+ value: value,
256
+ data: scope.row
257
+ });
258
+ }
259
+ "
260
+ ></es-selector>
261
+ <template v-else-if="getType(['text', 'input', 'textarea'])">
262
+ <template v-if="config.lazy">
263
+ <input
264
+ v-if="getType(['text', 'input'], scope)"
265
+ class="el-input__inner"
266
+ v-bind="formOption"
267
+ v-model.lazy="scope.row[field]"
268
+ @blur="
269
+ (event) => {
270
+ handleBlur({
271
+ item: config,
272
+ event: event,
273
+ data: scope.row,
274
+ scope: scope
275
+ });
276
+ }
277
+ "
278
+ @focus="
279
+ (event) => {
280
+ handleFocus({
281
+ item: config,
282
+ event: event,
283
+ data: scope.row,
284
+ scope: scope
285
+ });
286
+ }
287
+ "
288
+ @change="
289
+ (value) => {
290
+ handleChange({
291
+ item: config,
292
+ name: field || prop,
293
+ value: value,
294
+ data: scope.row,
295
+ scope: scope
296
+ });
297
+ }
298
+ "
299
+ />
300
+ <textarea
301
+ v-else
302
+ class="el-textarea__inner"
303
+ v-bind="formOption"
304
+ v-model.lazy="scope.row[field]"
305
+ @blur="
306
+ (event) => {
307
+ handleBlur({
308
+ item: config,
309
+ event: event,
310
+ data: scope.row,
311
+ scope: scope
312
+ });
313
+ }
314
+ "
315
+ @focus="
316
+ (event) => {
317
+ handleFocus({
318
+ item: config,
319
+ event: event,
320
+ data: scope.row,
321
+ scope: scope
322
+ });
323
+ }
324
+ "
325
+ @change="
326
+ (value) => {
327
+ handleChange({
328
+ item: config,
329
+ name: field || prop,
330
+ value: value,
331
+ data: scope.row,
332
+ scope: scope
333
+ });
334
+ }
335
+ "
336
+ ></textarea>
337
+ </template>
338
+ <es-input
339
+ v-else
340
+ v-bind="formOption"
341
+ :type="type"
342
+ :scope="scope"
343
+ v-model="scope.row[field || prop]"
344
+ @blur="
345
+ (event) => {
346
+ handleBlur({
347
+ item: config,
348
+ event: event,
349
+ data: scope.row,
350
+ scope: scope
351
+ });
352
+ }
353
+ "
354
+ @focus="
355
+ (event) => {
356
+ handleFocus({
357
+ item: config,
358
+ event: event,
359
+ data: scope.row,
360
+ scope: scope
361
+ });
362
+ }
363
+ "
364
+ @change="
365
+ (value) => {
366
+ handleChange({
367
+ item: config,
368
+ name: field || prop,
369
+ value: value,
370
+ data: scope.row,
371
+ scope: scope
372
+ });
373
+ }
374
+ "
375
+ ></es-input>
376
+ </template>
377
+ </el-form-item>
378
+ </template>
379
+
380
+ <script>
381
+ export default {
382
+ name: 'FormItem',
383
+ components: {},
384
+ props: {
385
+ scope: {},
386
+ type: String,
387
+ name: String,
388
+ value: {},
389
+ index: [String, Number],
390
+ labelKey: String,
391
+ valueKey: String,
392
+ field: String,
393
+ prop: String,
394
+ rules: [Array, Object]
395
+ },
396
+ data() {
397
+ return {};
398
+ },
399
+ computed: {
400
+ model: {
401
+ get() {
402
+ return this.value;
403
+ },
404
+ set(val) {
405
+ this.$emit('input', val);
406
+ }
407
+ }
408
+ },
409
+ watch: {},
410
+ created() {},
411
+ mounted() {},
412
+ methods: {
413
+ getType(target, data) {
414
+ let type = this.type;
415
+ if (this.setType) {
416
+ let obj = this.setType(data);
417
+ if (util.isObject(obj)) {
418
+ type = obj.type;
419
+ this.options = obj.data;
420
+ } else {
421
+ type = obj;
422
+ }
423
+ }
424
+ return Array.isArray(target) ? target.includes(type) : type == target;
425
+ }
426
+ }
427
+ };
428
+ </script>
429
+
430
+ <style lang="scss" scoped></style>