eoss-ui 0.4.40 → 0.4.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 (72) hide show
  1. package/lib/button-group.js +40 -13
  2. package/lib/button.js +35 -8
  3. package/lib/checkbox-group.js +35 -8
  4. package/lib/data-table-form.js +35 -8
  5. package/lib/data-table.js +97 -34
  6. package/lib/date-picker.js +35 -8
  7. package/lib/dialog.js +52 -39
  8. package/lib/editor.js +659 -1353
  9. package/lib/eoss-ui.common.js +10828 -10451
  10. package/lib/flow-group.js +37 -26
  11. package/lib/flow-list.js +35 -8
  12. package/lib/flow.js +164 -56
  13. package/lib/form.js +10081 -9075
  14. package/lib/handle-user.js +39 -12
  15. package/lib/handler.js +35 -8
  16. package/lib/icons.js +2 -2
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +35 -8
  19. package/lib/input.js +35 -8
  20. package/lib/login.js +35 -8
  21. package/lib/main.js +35 -8
  22. package/lib/mainComp.js +35 -8
  23. package/lib/nav.js +35 -8
  24. package/lib/page.js +35 -8
  25. package/lib/player.js +37 -10
  26. package/lib/qr-code.js +35 -8
  27. package/lib/radio-group.js +35 -8
  28. package/lib/select-ganged.js +35 -8
  29. package/lib/select.js +35 -8
  30. package/lib/selector-panel.js +37 -10
  31. package/lib/selector.js +37 -10
  32. package/lib/sizer.js +35 -8
  33. package/lib/steps.js +35 -8
  34. package/lib/switch.js +35 -8
  35. package/lib/table-form.js +48 -13
  36. package/lib/tabs.js +40 -36
  37. package/lib/theme-chalk/editor.css +1 -1
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/tips.js +35 -8
  40. package/lib/tree-group.js +39 -21
  41. package/lib/tree.js +35 -8
  42. package/lib/upload.js +43 -14
  43. package/lib/utils/util.js +35 -8
  44. package/lib/wujie.js +35 -8
  45. package/lib/wxlogin.js +35 -8
  46. package/package.json +3 -1
  47. package/packages/button-group/src/main.vue +3 -3
  48. package/packages/data-table/src/column.vue +6 -0
  49. package/packages/data-table/src/main.vue +12 -0
  50. package/packages/dialog/src/main.vue +3 -11
  51. package/packages/editor/src/editor.vue +25 -0
  52. package/packages/editor/src/main.vue +6 -2
  53. package/packages/editor/src/minx.js +16 -8
  54. package/packages/editor/src/toolbar.vue +71 -349
  55. package/packages/flow/src/component/CommonOpinions.vue +29 -11
  56. package/packages/flow/src/component/CustomPreset.vue +5 -1
  57. package/packages/flow/src/component/Preset.vue +5 -1
  58. package/packages/flow/src/main.vue +21 -1
  59. package/packages/flow/src/processForm.vue +17 -10
  60. package/packages/flow/src/selectUser.vue +9 -2
  61. package/packages/flow-group/src/main.vue +0 -8
  62. package/packages/form/src/main.vue +1519 -1462
  63. package/packages/form/src/table.vue +8 -0
  64. package/packages/handle-user/src/main.vue +2 -2
  65. package/packages/tabs/src/main.vue +1 -10
  66. package/packages/theme-chalk/lib/editor.css +1 -1
  67. package/packages/theme-chalk/lib/index.css +1 -1
  68. package/packages/theme-chalk/src/editor.scss +30 -0
  69. package/packages/tree-group/src/main.vue +0 -2
  70. package/packages/upload/src/main.vue +3 -1
  71. package/src/index.js +1 -1
  72. package/src/utils/util.js +41 -8
package/lib/wxlogin.js CHANGED
@@ -1403,7 +1403,7 @@ var isFunction = function isFunction(obj) {
1403
1403
  };
1404
1404
 
1405
1405
  /**
1406
- * isLogged
1406
+ * isLogined
1407
1407
  * @desc:是否登录(用于路由守卫中)
1408
1408
  * @author huangbo
1409
1409
  * @date 2022年5月7日
@@ -1416,7 +1416,9 @@ var isFunction = function isFunction(obj) {
1416
1416
  * @param {sting} [loginPage] - 第三方登录页面地址
1417
1417
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1418
1418
  **/
1419
- var isLogged = function isLogged(_ref8) {
1419
+ var isLogined = function isLogined(_ref8) {
1420
+ var _this = this;
1421
+
1420
1422
  var to = _ref8.to,
1421
1423
  from = _ref8.from,
1422
1424
  next = _ref8.next,
@@ -1460,16 +1462,18 @@ var isLogged = function isLogged(_ref8) {
1460
1462
  data: to.query
1461
1463
  }).then(function (res) {
1462
1464
  if (res.rCode === 0) {
1463
- switch (res.results.statusCode) {
1465
+ var results = res.results;
1466
+
1467
+ switch (results.statusCode) {
1464
1468
  case 0:
1465
1469
  var storage = getStorage('storage');
1466
1470
  setStorage({
1467
1471
  type: storage,
1468
1472
  key: {
1469
- ssId: res.results.ssId,
1470
- token: res.results.token,
1471
- Authorization: res.results.token,
1472
- deviceUnique: res.results.deviceUnique
1473
+ ssId: results.ssId,
1474
+ token: results.token,
1475
+ Authorization: results.token,
1476
+ deviceUnique: results.deviceUnique
1473
1477
  }
1474
1478
  });
1475
1479
  next();
@@ -1479,7 +1483,7 @@ var isLogged = function isLogged(_ref8) {
1479
1483
  case 2:
1480
1484
  break;
1481
1485
  case 3:
1482
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1486
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1483
1487
  if (to.query.openType) {
1484
1488
  switch (to.query.openType) {
1485
1489
  case 'self':
@@ -1503,6 +1507,25 @@ var isLogged = function isLogged(_ref8) {
1503
1507
  }
1504
1508
  }
1505
1509
  break;
1510
+ case 4:
1511
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1512
+ confirmButtonText: '确定',
1513
+ type: 'error'
1514
+ }).then(function () {
1515
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1516
+ window.location.href = delUrlParam({ key: 'code' });
1517
+ if (loginPage) {
1518
+ win.top.location.replace(loginPage);
1519
+ } else if (document.referrer) {
1520
+ win.top.location.replace(document.referrer);
1521
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1522
+ win.top.location.href = './login.html';
1523
+ } else {
1524
+ next('/login');
1525
+ }
1526
+ }).catch(function (e) {});
1527
+ break;
1528
+ default:
1506
1529
  }
1507
1530
  } else {
1508
1531
  if (token) {
@@ -1531,6 +1554,9 @@ var isLogged = function isLogged(_ref8) {
1531
1554
  }
1532
1555
  }
1533
1556
  };
1557
+ var isLogged = function isLogged(res) {
1558
+ isLogined(res);
1559
+ };
1534
1560
 
1535
1561
  /**
1536
1562
  * isObject
@@ -2182,6 +2208,7 @@ var watermark = function watermark(option) {
2182
2208
  indexOfObj: indexOfObj,
2183
2209
  isFunction: isFunction,
2184
2210
  isLogged: isLogged,
2211
+ isLogined: isLogined,
2185
2212
  isObject: isObject,
2186
2213
  jointUrl: jointUrl,
2187
2214
  loadJs: loadJs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.40",
3
+ "version": "0.4.42",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -61,6 +61,8 @@
61
61
  "qrcode": "^1.5.1",
62
62
  "qs": "^6.11.2",
63
63
  "runtime-import": "^2.2.1",
64
+ "slate": "^0.100.0",
65
+ "slate-history": "^0.100.0",
64
66
  "sm-crypto": "^0.3.11",
65
67
  "sockjs-client": "^1.6.1",
66
68
  "stompjs": "^2.3.3",
@@ -2,7 +2,7 @@
2
2
  <el-button-group class="es-button-group">
3
3
  <template v-for="(item, index) in btns">
4
4
  <es-button
5
- v-if="item && !item.hide && index < length"
5
+ v-if="item && !item.hide"
6
6
  :stop="stop"
7
7
  v-bind="item"
8
8
  :key="index"
@@ -18,7 +18,7 @@
18
18
  :trigger="trigger"
19
19
  >
20
20
  <el-button :size="size">
21
- <i class="es-icon-more"></i>
21
+ <i class="es-icon-omit"></i>
22
22
  </el-button>
23
23
  <el-dropdown-menu slot="dropdown">
24
24
  <el-dropdown-item
@@ -63,7 +63,7 @@ export default {
63
63
  return this.getBtns();
64
64
  },
65
65
  other() {
66
- return this.btns.length > this.length
66
+ return this.length > 0 && this.btns.length > this.length
67
67
  ? this.btns.splice(this.length - 1, this.btns.length)
68
68
  : [];
69
69
  }
@@ -478,6 +478,12 @@
478
478
  <!-- 按钮区域 -->
479
479
  <es-button-group
480
480
  v-if="item.type === 'handle' && !scope.row.hideHandle"
481
+ v-bind="
482
+ exclAttribute({
483
+ data: item,
484
+ attrs: ['contents', 'events', 'type', 'width', 'template', 'title']
485
+ })
486
+ "
481
487
  stop
482
488
  :contents="item.contents || item.events"
483
489
  :data="scope.row"
@@ -218,6 +218,9 @@ export default {
218
218
  },
219
219
  injector: {
220
220
  default: ''
221
+ },
222
+ scale: {
223
+ default: ''
221
224
  }
222
225
  },
223
226
  props: {
@@ -502,6 +505,15 @@ export default {
502
505
  }
503
506
  },
504
507
  watch: {
508
+ scale: {
509
+ deep: true,
510
+ handler(val) {
511
+ console.log(val, 999);
512
+ if (this.tableHeight != 'auto' && this.display) {
513
+ this.resetHeight();
514
+ }
515
+ }
516
+ },
505
517
  zoom: {
506
518
  handler(val) {
507
519
  if (this.tableHeight != 'auto' && this.display) {
@@ -31,7 +31,6 @@
31
31
  attrs: ['events', 'visible', 'type', 'model']
32
32
  })
33
33
  "
34
- :zoom="zoom"
35
34
  :model.sync="item.model"
36
35
  v-on="{ ...item.events }"
37
36
  ></es-form>
@@ -44,7 +43,6 @@
44
43
  attrs: ['events', 'visible', 'type']
45
44
  })
46
45
  "
47
- :zoom="zoom"
48
46
  v-on="item.events"
49
47
  >
50
48
  <template v-if="item.dialog" slot="dialog">
@@ -88,7 +86,6 @@
88
86
  attrs: ['events', 'visible', 'type']
89
87
  })
90
88
  "
91
- :zoom="zoom"
92
89
  v-on="{ ...item.events }"
93
90
  ></es-tree-group>
94
91
  <es-flow-group
@@ -112,7 +109,6 @@
112
109
  attrs: ['events', 'visible', 'type']
113
110
  })
114
111
  "
115
- :zoom="zoom"
116
112
  v-on="{ ...item.events }"
117
113
  ></es-tabs>
118
114
  <es-dialog
@@ -163,7 +159,6 @@
163
159
  attrs: ['events', 'visible', 'type', 'model']
164
160
  })
165
161
  "
166
- :zoom="zoom"
167
162
  :model.sync="contents.model"
168
163
  v-on="{ ...contents.events }"
169
164
  ></es-form>
@@ -175,7 +170,6 @@
175
170
  attrs: ['events', 'visible', 'type']
176
171
  })
177
172
  "
178
- :zoom="zoom"
179
173
  v-on="contents.events"
180
174
  >
181
175
  <template v-if="contents.dialog" slot="dialog">
@@ -218,7 +212,6 @@
218
212
  attrs: ['events', 'visible', 'type']
219
213
  })
220
214
  "
221
- :zoom="zoom"
222
215
  v-on="{ ...contents.events }"
223
216
  ></es-tree-group>
224
217
  <es-flow-group
@@ -229,7 +222,6 @@
229
222
  attrs: ['events', 'visible', 'type']
230
223
  })
231
224
  "
232
- :zoom="zoom"
233
225
  v-on="{ ...contents.events }"
234
226
  ></es-flow-group>
235
227
  <es-tabs
@@ -241,7 +233,6 @@
241
233
  attrs: ['events', 'visible', 'type']
242
234
  })
243
235
  "
244
- :zoom="zoom"
245
236
  v-on="{ ...contents.events }"
246
237
  ></es-tabs>
247
238
  <iframe
@@ -281,7 +272,7 @@ export default {
281
272
  provide() {
282
273
  return {
283
274
  esDialog: this,
284
- scale: this.zoom
275
+ scale: this.scales
285
276
  };
286
277
  },
287
278
  inject: {
@@ -380,7 +371,7 @@ export default {
380
371
  wd: '',
381
372
  ht: '',
382
373
  zoom: 1,
383
- scale: {}
374
+ scales: { zoom: 1 }
384
375
  };
385
376
  },
386
377
  created() {
@@ -469,6 +460,7 @@ export default {
469
460
  },
470
461
  handleScale(res) {
471
462
  this.zoom = res;
463
+ this.$set(this.scales, 'zoom', res);
472
464
  this.$emit('scale', res);
473
465
  }
474
466
  }
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <el-scrollbar class="es-editor-main-box" :style="_style" ref="scrollbar">
3
+ <div class="es-editor-main es-editor-contents" v-html="value"></div>
4
+ </el-scrollbar>
5
+ </template>
6
+ <script>
7
+ export default {
8
+ name: 'Editors',
9
+ props: {
10
+ value: String,
11
+ height: [String, Number]
12
+ },
13
+ computed: {
14
+ _style() {
15
+ let height = this.height ? parseInt(this.height, 10) + 'px' : '500px';
16
+ return { height };
17
+ }
18
+ },
19
+ data() {
20
+ return {};
21
+ },
22
+ mounted() {},
23
+ methods: {}
24
+ };
25
+ </script>
@@ -7,7 +7,10 @@
7
7
  v-html="model"
8
8
  ></div>
9
9
  <template v-else>
10
- <Toolbars v-if="cs"></Toolbars>
10
+ <template v-if="cs">
11
+ <Toolbars></Toolbars>
12
+ <Editors v-model="model"></Editors>
13
+ </template>
11
14
  <template v-else>
12
15
  <Toolbar
13
16
  class="es-editor-toolbar"
@@ -30,10 +33,11 @@
30
33
  <script>
31
34
  import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
32
35
  import Toolbars from './toolbar.vue';
36
+ import Editors from './editor.vue';
33
37
  export default {
34
38
  name: 'EsEditor',
35
39
  inheritAttrs: false,
36
- components: { Editor, Toolbar, Toolbars },
40
+ components: { Editor, Toolbar, Toolbars, Editors },
37
41
  inject: {
38
42
  elForm: {
39
43
  default: ''
@@ -12,7 +12,7 @@ export default {
12
12
  [
13
13
  {
14
14
  tips: '粗体',
15
- path: ['M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z']
15
+ path: ['M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z']
16
16
  },
17
17
  {
18
18
  tips: '下划线',
@@ -28,7 +28,7 @@ export default {
28
28
  },
29
29
  {
30
30
  path: ['M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z', 'M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z', 'M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z'],
31
- type: 'tag',
31
+ type: 'tag2',
32
32
  dropdown: [
33
33
  {
34
34
  tips: '删除线',
@@ -58,20 +58,25 @@ export default {
58
58
  ]
59
59
  },
60
60
  {
61
- colors: true,
62
- tips: '文字颜色'
61
+ colors: {
62
+ tips: '文字颜色'
63
+ },
64
+ popover: true,
65
+ path: ['M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z']
63
66
  },
64
67
  {
65
- colors: true,
66
- tips: '背景颜色',
67
- title: '清除背景色',
68
+ colors: {
69
+ tips: '背景颜色',
70
+ title: '清除背景色'
71
+ },
72
+ popover: true,
68
73
  path: ['M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z']
69
74
  }
70
75
  ],
71
76
  [
72
77
  { tips: '字号', value: this.fontSize, trigger: 'click', dropdown: this._fontSizes, type: 'fontSize' },
73
78
  { tips: '字体', value: this.fontFamily, trigger: 'click', dropdown: this._fontFamilys, type: 'fontFamily' },
74
- { tips: '字体', value: this.lineHeight, trigger: 'click', dropdown: this._lineHeights, type: 'lineHeight' }
79
+ { tips: '行高', value: this.lineHeight, trigger: 'click', dropdown: this._lineHeights, type: 'lineHeight' }
75
80
  ],
76
81
  [
77
82
  {
@@ -127,6 +132,7 @@ export default {
127
132
  [
128
133
  {
129
134
  emojis: true,
135
+ popover: true,
130
136
  tips: '表情',
131
137
  path: ['M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z']
132
138
  },
@@ -166,10 +172,12 @@ export default {
166
172
  {
167
173
  table: true,
168
174
  tips: '插入表格',
175
+ popover: true,
169
176
  path: ['M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z']
170
177
  },
171
178
  {
172
179
  tips: '代码块',
180
+ viewBox: '0 0 1280 1024',
173
181
  path: ['M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z']
174
182
  },
175
183
  {