eoss-ui 0.3.97 → 0.4.10

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 (82) hide show
  1. package/lib/button-group.js +2 -1
  2. package/lib/button.js +2 -1
  3. package/lib/checkbox-group.js +8 -4
  4. package/lib/data-table-form.js +8 -7
  5. package/lib/data-table.js +101 -8
  6. package/lib/date-picker.js +2 -1
  7. package/lib/dialog.js +2 -1
  8. package/lib/eoss-ui.common.js +213 -78
  9. package/lib/flow-group.js +2 -1
  10. package/lib/flow-list.js +2 -1
  11. package/lib/flow.js +2 -1
  12. package/lib/form.js +2 -1
  13. package/lib/handle-user.js +2 -1
  14. package/lib/handler.js +2 -1
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +2 -1
  17. package/lib/input.js +2 -1
  18. package/lib/login.js +30 -13
  19. package/lib/main.js +2 -1
  20. package/lib/mainComp.js +2 -1
  21. package/lib/nav.js +2 -1
  22. package/lib/page.js +2 -1
  23. package/lib/player.js +2 -1
  24. package/lib/qr-code.js +2 -1
  25. package/lib/radio-group.js +8 -4
  26. package/lib/select-ganged.js +6 -2
  27. package/lib/select.js +9 -2
  28. package/lib/selector-panel.js +13 -9
  29. package/lib/selector.js +8 -4
  30. package/lib/sizer.js +2 -1
  31. package/lib/steps.js +2 -1
  32. package/lib/switch.js +2 -1
  33. package/lib/table-form.js +2 -1
  34. package/lib/tabs.js +2 -1
  35. package/lib/theme-chalk/base.css +1 -1
  36. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  37. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  38. package/lib/theme-chalk/icon.css +1 -1
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/theme-chalk/main.css +1 -1
  41. package/lib/theme-chalk/menu.css +1 -1
  42. package/lib/theme-chalk/sizer.css +1 -1
  43. package/lib/theme-chalk/upload.css +1 -1
  44. package/lib/tips.js +12 -6
  45. package/lib/tree-group.js +2 -1
  46. package/lib/tree.js +2 -1
  47. package/lib/upload.js +2 -1
  48. package/lib/utils/util.js +2 -1
  49. package/lib/wujie.js +2 -1
  50. package/lib/wxlogin.js +2 -1
  51. package/package.json +2 -2
  52. package/packages/checkbox-group/index.js +3 -3
  53. package/packages/checkbox-group/src/main.vue +4 -1
  54. package/packages/data-table/src/column.vue +90 -21
  55. package/packages/data-table-form/src/table.vue +1 -1
  56. package/packages/login/src/main.vue +40 -13
  57. package/packages/radio-group/index.js +3 -3
  58. package/packages/radio-group/src/main.vue +4 -1
  59. package/packages/select/src/main.vue +7 -1
  60. package/packages/select-ganged/src/main.vue +4 -1
  61. package/packages/selector/src/main.vue +4 -1
  62. package/packages/selector-panel/src/selection.vue +4 -1
  63. package/packages/theme-chalk/lib/base.css +1 -1
  64. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  65. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  66. package/packages/theme-chalk/lib/icon.css +1 -1
  67. package/packages/theme-chalk/lib/index.css +1 -1
  68. package/packages/theme-chalk/lib/main.css +1 -1
  69. package/packages/theme-chalk/lib/menu.css +1 -1
  70. package/packages/theme-chalk/lib/sizer.css +1 -1
  71. package/packages/theme-chalk/lib/upload.css +1 -1
  72. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  73. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  74. package/packages/theme-chalk/src/icon.scss +8 -0
  75. package/packages/tips/src/main.vue +5 -2
  76. package/src/index.js +1 -1
  77. package/src/utils/util.js +1 -1
  78. package/lib/theme-chalk/radio.css +0 -1
  79. package/packages/radio/index.js +0 -5
  80. package/packages/radio/src/main.vue +0 -259
  81. package/packages/theme-chalk/lib/radio.css +0 -1
  82. package/packages/theme-chalk/src/radio.scss +0 -3
@@ -80,12 +80,22 @@
80
80
  "
81
81
  @blur="
82
82
  event => {
83
- handleBlur({ item: item, event: event, data: scope.row });
83
+ handleBlur({
84
+ item: item,
85
+ event: event,
86
+ data: scope.row,
87
+ scope: scope
88
+ });
84
89
  }
85
90
  "
86
91
  @focus="
87
92
  event => {
88
- handleFocus({ item: item, event: event, data: scope.row });
93
+ handleFocus({
94
+ item: item,
95
+ event: event,
96
+ data: scope.row,
97
+ scope: scope
98
+ });
89
99
  }
90
100
  "
91
101
  @change="
@@ -94,7 +104,8 @@
94
104
  item: item,
95
105
  name: item.field || item.prop,
96
106
  value: value,
97
- data: scope.row
107
+ data: scope.row,
108
+ scope: scope
98
109
  });
99
110
  }
100
111
  "
@@ -112,12 +123,22 @@
112
123
  "
113
124
  @blur="
114
125
  event => {
115
- handleBlur({ item: item, event: event, data: scope.row });
126
+ handleBlur({
127
+ item: item,
128
+ event: event,
129
+ data: scope.row,
130
+ scope: scope
131
+ });
116
132
  }
117
133
  "
118
134
  @focus="
119
135
  event => {
120
- handleFocus({ item: item, event: event, data: scope.row });
136
+ handleFocus({
137
+ item: item,
138
+ event: event,
139
+ data: scope.row,
140
+ scope: scope
141
+ });
121
142
  }
122
143
  "
123
144
  @change="
@@ -126,7 +147,8 @@
126
147
  item: item,
127
148
  name: item.field || item.prop,
128
149
  value: value,
129
- data: scope.row
150
+ data: scope.row,
151
+ scope: scope
130
152
  });
131
153
  }
132
154
  "
@@ -251,12 +273,22 @@
251
273
  v-model="scope.row[item.field]"
252
274
  @blur="
253
275
  event => {
254
- handleBlur({ item: item, event: event, data: scope.row });
276
+ handleBlur({
277
+ item: item,
278
+ event: event,
279
+ data: scope.row,
280
+ scope: scope
281
+ });
255
282
  }
256
283
  "
257
284
  @focus="
258
285
  event => {
259
- handleFocus({ item: item, event: event, data: scope.row });
286
+ handleFocus({
287
+ item: item,
288
+ event: event,
289
+ data: scope.row,
290
+ scope: scope
291
+ });
260
292
  }
261
293
  "
262
294
  @change="
@@ -265,7 +297,8 @@
265
297
  item: item,
266
298
  name: item.field || item.prop,
267
299
  value: value,
268
- data: scope.row
300
+ data: scope.row,
301
+ scope: scope
269
302
  });
270
303
  }
271
304
  "
@@ -276,12 +309,22 @@
276
309
  v-model="scope.row[item.field]"
277
310
  @blur="
278
311
  event => {
279
- handleBlur({ item: item, event: event, data: scope.row });
312
+ handleBlur({
313
+ item: item,
314
+ event: event,
315
+ data: scope.row,
316
+ scope: scope
317
+ });
280
318
  }
281
319
  "
282
320
  @focus="
283
321
  event => {
284
- handleFocus({ item: item, event: event, data: scope.row });
322
+ handleFocus({
323
+ item: item,
324
+ event: event,
325
+ data: scope.row,
326
+ scope: scope
327
+ });
285
328
  }
286
329
  "
287
330
  @change="
@@ -290,7 +333,8 @@
290
333
  item: item,
291
334
  name: item.field || item.prop,
292
335
  value: value,
293
- data: scope.row
336
+ data: scope.row,
337
+ scope: scope
294
338
  });
295
339
  }
296
340
  "
@@ -321,7 +365,12 @@
321
365
  v-model.lazy="scope.row[item.field]"
322
366
  @blur="
323
367
  event => {
324
- handleBlur({ item: item, event: event, data: scope.row });
368
+ handleBlur({
369
+ item: item,
370
+ event: event,
371
+ data: scope.row,
372
+ scope: scope
373
+ });
325
374
  }
326
375
  "
327
376
  @focus="
@@ -329,7 +378,8 @@
329
378
  handleFocus({
330
379
  item: item,
331
380
  event: event,
332
- data: scope.row
381
+ data: scope.row,
382
+ scope: scope
333
383
  });
334
384
  }
335
385
  "
@@ -339,7 +389,8 @@
339
389
  item: item,
340
390
  name: item.field || item.prop,
341
391
  value: value,
342
- data: scope.row
392
+ data: scope.row,
393
+ scope: scope
343
394
  });
344
395
  }
345
396
  "
@@ -351,7 +402,12 @@
351
402
  v-model.lazy="scope.row[item.field]"
352
403
  @blur="
353
404
  event => {
354
- handleBlur({ item: item, event: event, data: scope.row });
405
+ handleBlur({
406
+ item: item,
407
+ event: event,
408
+ data: scope.row,
409
+ scope: scope
410
+ });
355
411
  }
356
412
  "
357
413
  @focus="
@@ -359,7 +415,8 @@
359
415
  handleFocus({
360
416
  item: item,
361
417
  event: event,
362
- data: scope.row
418
+ data: scope.row,
419
+ scope: scope
363
420
  });
364
421
  }
365
422
  "
@@ -369,7 +426,8 @@
369
426
  item: item,
370
427
  name: item.field || item.prop,
371
428
  value: value,
372
- data: scope.row
429
+ data: scope.row,
430
+ scope: scope
373
431
  });
374
432
  }
375
433
  "
@@ -381,12 +439,22 @@
381
439
  v-model="scope.row[item.field]"
382
440
  @blur="
383
441
  event => {
384
- handleBlur({ item: item, event: event, data: scope.row });
442
+ handleBlur({
443
+ item: item,
444
+ event: event,
445
+ data: scope.row,
446
+ scope: scope
447
+ });
385
448
  }
386
449
  "
387
450
  @focus="
388
451
  event => {
389
- handleFocus({ item: item, event: event, data: scope.row });
452
+ handleFocus({
453
+ item: item,
454
+ event: event,
455
+ data: scope.row,
456
+ scope: scope
457
+ });
390
458
  }
391
459
  "
392
460
  @change="
@@ -395,7 +463,8 @@
395
463
  item: item,
396
464
  name: item.field || item.prop,
397
465
  value: value,
398
- data: scope.row
466
+ data: scope.row,
467
+ scope: scope
399
468
  });
400
469
  }
401
470
  "
@@ -37,7 +37,7 @@
37
37
  ref="tableSelect"
38
38
  :style="style"
39
39
  :data="options[item.field || item.prop]"
40
- @hideMenu="selectShow = false"
40
+ @hide-menu="selectShow = false"
41
41
  @change="
42
42
  value => {
43
43
  handleChange('date', value);
@@ -507,7 +507,7 @@ export default {
507
507
  if (this.redirect_uri) {
508
508
  return this.redirect_uri;
509
509
  } else {
510
- return util.win.top.location.href || window.href;
510
+ return window.location.href || window.href;
511
511
  }
512
512
  },
513
513
  loginBackgroundUrl() {
@@ -550,6 +550,7 @@ export default {
550
550
  return types.length > 2
551
551
  ? {
552
552
  '0': { type: '0', icon: 'es-icon-shuru', name: '账号登录' },
553
+ '1': { type: '1', icon: 'es-icon-usb-key', name: '证书登录' },
553
554
  '3': { type: '3', icon: 'es-icon-saoma', name: '扫码登录' },
554
555
  '6': { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
555
556
  '7': { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
@@ -558,6 +559,7 @@ export default {
558
559
  }
559
560
  : {
560
561
  '0': { type: '0', icon: 'es-icon-jianpan', name: '账号登录' },
562
+ '1': { type: '1', icon: 'es-icon-ca', name: '证书登录' },
561
563
  '3': { type: '3', icon: 'es-icon-qrcode', name: '扫码登录' },
562
564
  '6': { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
563
565
  '7': { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
@@ -1009,15 +1011,19 @@ export default {
1009
1011
  }
1010
1012
  },
1011
1013
  handleUserLogin(data) {
1014
+ let extUserBindHandleId = sessionStorage.getItem('extUserBindHandleId');
1012
1015
  util
1013
1016
  .ajax({
1014
1017
  method: 'post',
1015
1018
  url: this.active == '0' ? this.actionUrl : this.doCodeLogin,
1016
- data: data
1019
+ data: extUserBindHandleId
1020
+ ? { ...data, extUserBindHandleId: extUserBindHandleId }
1021
+ : data
1017
1022
  })
1018
1023
  .then(res => {
1019
1024
  this.submit = false;
1020
1025
  if (res.rCode == 0) {
1026
+ sessionStorage.removeItem('extUserBindHandleId');
1021
1027
  this.handleRemember();
1022
1028
  const results = res.results;
1023
1029
  this.handleResults(results);
@@ -1108,12 +1114,12 @@ export default {
1108
1114
  duration: 1500,
1109
1115
  onClose: () => {
1110
1116
  if (this.toUrl) {
1111
- util.win.location.href = this.toUrl;
1117
+ window.location.href = this.toUrl;
1112
1118
  } else if (results.doorIndex && this.doorIndex) {
1113
- util.win.location.href = results.doorIndex;
1119
+ window.location.href = results.doorIndex;
1114
1120
  } else {
1115
- if (util.win.top.location.href.indexOf('login.html') > -1) {
1116
- util.win.top.location.href = './main.html';
1121
+ if (window.location.href.indexOf('login.html') > -1) {
1122
+ window.location.href = './main.html';
1117
1123
  } else {
1118
1124
  this.$router.push({ name: 'main' });
1119
1125
  }
@@ -1145,25 +1151,46 @@ export default {
1145
1151
  let url =
1146
1152
  results.doorIndex && this.doorIndex
1147
1153
  ? results.doorIndex
1148
- : util.win.top.location.href.indexOf('main.html') > -1
1154
+ : window.location.href.indexOf('main.html') > -1
1149
1155
  ? './login.html'
1150
- : util.win.location.hash
1151
- ? util.win.location.href.replace('login', 'main')
1152
- : util.win.location.href;
1156
+ : window.location.hash
1157
+ ? window.location.href.replace('login', 'main')
1158
+ : window.location.href;
1153
1159
  const href = results.authorizeUrl.replace(
1154
1160
  '{redirectUri}',
1155
1161
  encodeURIComponent(url)
1156
1162
  );
1157
- util.win.top.location.href = href;
1158
- // util.win.location.href =
1163
+ window.location.href = href;
1164
+ // window.location.href =
1159
1165
  // results.authorizeUrl.indexOf('?') > -1
1160
1166
  // ? results.authorizeUrl + '&token=' + results.token
1161
1167
  // : results.authorizeUrl + '?token=' + results.token;
1162
1168
  break;
1169
+ case 4:
1170
+ this.$alert(
1171
+ results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!',
1172
+ '提示',
1173
+ {
1174
+ confirmButtonText: '确定',
1175
+ type: 'error'
1176
+ }
1177
+ )
1178
+ .then(() => {
1179
+ sessionStorage.setItem(
1180
+ 'extUserBindHandleId',
1181
+ results.extUserBindHandleId
1182
+ );
1183
+ window.location.href = util.delUrlParam({ key: 'code' });
1184
+ if (window.location.hash) {
1185
+ location.reload();
1186
+ }
1187
+ })
1188
+ .catch(e => {});
1189
+ break;
1163
1190
  default:
1164
1191
  if (type !== 3) {
1165
1192
  this.$message({
1166
- message: results.msg || res.msg,
1193
+ message: results.msg,
1167
1194
  type: 'error',
1168
1195
  duration: 1500,
1169
1196
  onClose: () => {
@@ -1,6 +1,6 @@
1
- import EsRadio from './src/main';
1
+ import EsRadioGroup from './src/main';
2
2
 
3
3
  /* istanbul ignore next */
4
- EsRadio.install = function(Vue) {Vue.component(EsRadio.name, EsRadio);};
4
+ EsRadioGroup.install = function(Vue) {Vue.component(EsRadioGroup.name, EsRadioGroup);};
5
5
 
6
- export default EsRadio;
6
+ export default EsRadioGroup;
@@ -97,7 +97,10 @@ export default {
97
97
  },
98
98
  valueType: {
99
99
  type: String,
100
- default: 'string'
100
+ default: 'string',
101
+ validator: function(value) {
102
+ return ['string', 'object'].includes(value);
103
+ }
101
104
  },
102
105
  valueKey: {
103
106
  type: String,
@@ -33,7 +33,13 @@ export default {
33
33
  type: Boolean,
34
34
  default: false
35
35
  },
36
- valueType: String,
36
+ valueType: {
37
+ type: String,
38
+ default: 'string',
39
+ validator: function(value) {
40
+ return ['string', 'object'].includes(value);
41
+ }
42
+ },
37
43
  // 选择项的值字段
38
44
  valueKey: {
39
45
  type: String,
@@ -37,7 +37,10 @@ export default {
37
37
  },
38
38
  valueType: {
39
39
  type: String,
40
- default: 'object'
40
+ default: 'object',
41
+ validator: function(value) {
42
+ return ['string', 'object'].includes(value);
43
+ }
41
44
  },
42
45
  data: {
43
46
  type: Array,
@@ -248,7 +248,10 @@ export default {
248
248
  },
249
249
  valueType: {
250
250
  type: String,
251
- default: 'object'
251
+ default: 'object',
252
+ validator: function(value) {
253
+ return ['string', 'object'].includes(value);
254
+ }
252
255
  },
253
256
  size: String,
254
257
  id: String,
@@ -63,7 +63,10 @@ export default {
63
63
  },
64
64
  valueType: {
65
65
  type: String,
66
- default: 'object'
66
+ default: 'object',
67
+ validator: function(value) {
68
+ return ['string', 'object'].includes(value);
69
+ }
67
70
  },
68
71
  data: {
69
72
  type: Array,