eoss-ui 0.4.39 → 0.4.41

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 +415 -887
  9. package/lib/eoss-ui.common.js +11166 -10552
  10. package/lib/flow-group.js +37 -26
  11. package/lib/flow-list.js +35 -8
  12. package/lib/flow.js +163 -54
  13. package/lib/form.js +10081 -9075
  14. package/lib/handle-user.js +35 -8
  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 +43 -16
  31. package/lib/selector.js +40 -13
  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 +95 -52
  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 +1 -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 +20 -0
  52. package/packages/editor/src/minx.js +129 -19
  53. package/packages/editor/src/toolbar.vue +93 -324
  54. package/packages/flow/src/component/CommonOpinions.vue +29 -11
  55. package/packages/flow/src/component/CustomPreset.vue +5 -1
  56. package/packages/flow/src/component/Preset.vue +5 -1
  57. package/packages/flow/src/main.vue +21 -1
  58. package/packages/flow/src/processForm.vue +15 -8
  59. package/packages/flow/src/selectUser.vue +9 -2
  60. package/packages/flow-group/src/main.vue +0 -8
  61. package/packages/form/src/main.vue +1519 -1462
  62. package/packages/form/src/table.vue +8 -0
  63. package/packages/selector/src/main.vue +1 -1
  64. package/packages/selector-panel/src/main.vue +4 -4
  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 +23 -0
  69. package/packages/tree-group/src/main.vue +0 -2
  70. package/packages/upload/src/main.vue +31 -23
  71. package/src/index.js +1 -1
  72. package/src/utils/util.js +41 -8
@@ -5,10 +5,30 @@
5
5
  position: relative;
6
6
  display: flex;
7
7
  padding: 0 4px;
8
+ flex-wrap: wrap;
8
9
  border-bottom: $--border-base;
10
+ .es-editor-toolbar-item-box {
11
+ height: 40px;
12
+ display: inline-flex;
13
+ & + .es-editor-toolbar-item-box {
14
+ .es-editor-toolbar-item {
15
+ &:first-child {
16
+ border-left: $--border-base;
17
+ }
18
+ }
19
+ }
20
+ }
9
21
  .es-editor-toolbar-item {
10
22
  height: 40px;
11
23
  padding: 4px;
24
+ &.es-last {
25
+ border-right: $--border-base;
26
+ }
27
+ .es-icon-text {
28
+ & + .el-icon--right {
29
+ width: auto;
30
+ }
31
+ }
12
32
  }
13
33
  .el-button--default {
14
34
  border: 0;
@@ -17,6 +37,9 @@
17
37
  color: #333;
18
38
  background-color: #f1f1f1;
19
39
  }
40
+ &.es-icon-right {
41
+ padding-right: 3px;
42
+ }
20
43
  }
21
44
  }
22
45
  .es-editor-main {
@@ -67,7 +67,6 @@
67
67
  <es-form
68
68
  v-if="form"
69
69
  v-bind="form"
70
- :zoom="zoom"
71
70
  :ref="form.ref ? form.ref : 'esForm'"
72
71
  v-on="{ ...$listeners, ...form.events }"
73
72
  >
@@ -84,7 +83,6 @@
84
83
  size="mini"
85
84
  v-bind="{ close: true, ...table }"
86
85
  :param="param"
87
- :zoom="zoom"
88
86
  :ref="table.ref ? table.ref : 'esDataTable'"
89
87
  v-on="{ ...$listeners, ...table.events }"
90
88
  >
@@ -81,27 +81,31 @@
81
81
  ></i>
82
82
  </template>
83
83
  <template v-else>
84
- <i
85
- class="el-icon-plus es-uploader-icon"
86
- v-if="selectType === 'icon-plus'"
87
- ></i>
88
- <el-button
89
- v-else
90
- class="es-upload-button"
91
- :class="icon"
92
- :type="selectType"
93
- :size="btnSize"
94
- >{{ text ? text : autoUpload ? '点击上传' : '选择文件' }}</el-button
95
- >
96
- <el-button
97
- class="es-upload-button"
98
- v-if="!autoUpload"
99
- :type="uploadType"
100
- :size="btnSize"
101
- @click.stop="handleUpload"
102
- >
103
- 上传文件
104
- </el-button>
84
+ <template v-if="!isDisabled">
85
+ <i
86
+ class="el-icon-plus es-uploader-icon"
87
+ v-if="selectType === 'icon-plus'"
88
+ ></i>
89
+ <el-button
90
+ v-else
91
+ class="es-upload-button"
92
+ :class="icon"
93
+ :type="selectType"
94
+ :size="btnSize"
95
+ >{{
96
+ text ? text : autoUpload ? '点击上传' : '选择文件'
97
+ }}</el-button
98
+ >
99
+ <el-button
100
+ class="es-upload-button"
101
+ v-if="!autoUpload"
102
+ :type="uploadType"
103
+ :size="btnSize"
104
+ @click.stop="handleUpload"
105
+ >
106
+ 上传文件
107
+ </el-button>
108
+ </template>
105
109
  <el-button
106
110
  v-if="showFileList && isDownloads"
107
111
  slot="handle"
@@ -440,10 +444,12 @@ export default {
440
444
  };
441
445
  },
442
446
  isRequiredOwnId() {
447
+ if (this.requiredOwnId !== undefined) {
448
+ return this.requiredOwnId;
449
+ }
443
450
  if (!this.fileList || !this.fileList.length) {
444
451
  return true;
445
452
  }
446
- return this.requiredOwnId;
447
453
  },
448
454
  show() {
449
455
  if ((this.photo && typeof this.photo === 'string') || this.value) {
@@ -1062,7 +1068,9 @@ export default {
1062
1068
  this.$message.success(response.msg);
1063
1069
  }
1064
1070
  }
1065
- let se = this.filesTotalSize + Math.ceil((file.size / 1024) * 100) / 100;
1071
+ let se =
1072
+ this.filesTotalSize +
1073
+ (this.resultFile ? Math.ceil((file.size / 1024) * 100) / 100 : 0);
1066
1074
  this.filesTotalSize = se;
1067
1075
  this.onSuccess && this.onSuccess(response, file, fileList);
1068
1076
  this.$emit('success', response, file, fileList);
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.39',
120
+ version: '0.4.41',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -1364,7 +1364,7 @@ const isFunction = function (obj) {
1364
1364
  };
1365
1365
 
1366
1366
  /**
1367
- * isLogged
1367
+ * isLogined
1368
1368
  * @desc:是否登录(用于路由守卫中)
1369
1369
  * @author huangbo
1370
1370
  * @date 2022年5月7日
@@ -1377,7 +1377,7 @@ const isFunction = function (obj) {
1377
1377
  * @param {sting} [loginPage] - 第三方登录页面地址
1378
1378
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1379
1379
  **/
1380
- const isLogged = function ({
1380
+ const isLogined = function ({
1381
1381
  to,
1382
1382
  from,
1383
1383
  next,
@@ -1423,16 +1423,17 @@ const isLogged = function ({
1423
1423
  data: to.query
1424
1424
  }).then(res => {
1425
1425
  if (res.rCode === 0) {
1426
- switch (res.results.statusCode) {
1426
+ let { results } = res;
1427
+ switch (results.statusCode) {
1427
1428
  case 0:
1428
1429
  const storage = getStorage('storage');
1429
1430
  setStorage({
1430
1431
  type: storage,
1431
1432
  key: {
1432
- ssId: res.results.ssId,
1433
- token: res.results.token,
1434
- Authorization: res.results.token,
1435
- deviceUnique: res.results.deviceUnique
1433
+ ssId: results.ssId,
1434
+ token: results.token,
1435
+ Authorization: results.token,
1436
+ deviceUnique: results.deviceUnique
1436
1437
  }
1437
1438
  });
1438
1439
  next();
@@ -1442,7 +1443,7 @@ const isLogged = function ({
1442
1443
  case 2:
1443
1444
  break;
1444
1445
  case 3:
1445
- const href = res.results.authorizeUrl.replace(
1446
+ const href = results.authorizeUrl.replace(
1446
1447
  '{redirectUri}',
1447
1448
  encodeURIComponent(url)
1448
1449
  );
@@ -1469,6 +1470,34 @@ const isLogged = function ({
1469
1470
  }
1470
1471
  }
1471
1472
  break;
1473
+ case 4:
1474
+ this.$alert(
1475
+ results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!',
1476
+ '提示',
1477
+ {
1478
+ confirmButtonText: '确定',
1479
+ type: 'error'
1480
+ }
1481
+ )
1482
+ .then(() => {
1483
+ sessionStorage.setItem(
1484
+ 'extUserBindHandleId',
1485
+ results.extUserBindHandleId
1486
+ );
1487
+ window.location.href = delUrlParam({ key: 'code' });
1488
+ if (loginPage) {
1489
+ win.top.location.replace(loginPage);
1490
+ } else if (document.referrer) {
1491
+ win.top.location.replace(document.referrer);
1492
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1493
+ win.top.location.href = './login.html';
1494
+ } else {
1495
+ next('/login');
1496
+ }
1497
+ })
1498
+ .catch((e) => {});
1499
+ break;
1500
+ default:
1472
1501
  }
1473
1502
  } else {
1474
1503
  if (token) {
@@ -1504,6 +1533,9 @@ const isLogged = function ({
1504
1533
  }
1505
1534
  }
1506
1535
  };
1536
+ const isLogged = function (res) {
1537
+ isLogined(res);
1538
+ };
1507
1539
 
1508
1540
  /**
1509
1541
  * isObject
@@ -2137,6 +2169,7 @@ export default {
2137
2169
  indexOfObj,
2138
2170
  isFunction,
2139
2171
  isLogged,
2172
+ isLogined,
2140
2173
  isObject,
2141
2174
  jointUrl,
2142
2175
  loadJs,