@web-utils/component 2.0.10 → 2.0.11

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 (172) hide show
  1. package/dist/chunks/3d28cc08.js +57 -0
  2. package/dist/chunks/{41a066be.js → 44b78389.js} +8 -8
  3. package/dist/chunks/5d33812d.js +147 -0
  4. package/dist/chunks/{61ad06b2.js → 822300f3.js} +3 -3
  5. package/dist/chunks/9d848bf6.js +99 -0
  6. package/dist/chunks/a0bb327b.js +96 -0
  7. package/dist/chunks/a8891d2c.js +30 -0
  8. package/dist/chunks/c69d5628.js +248 -0
  9. package/dist/chunks/de9fe802.js +24 -0
  10. package/dist/chunks/{5a78e0db.js → e1939731.js} +6 -5
  11. package/dist/components/address-input/index.js +56 -43
  12. package/dist/components/address-input/style.css +15 -1
  13. package/dist/components/aside-menu/index.js +36 -30
  14. package/dist/components/aside-menu/style.css +9 -1
  15. package/dist/components/awesome-button/index.js +35 -32
  16. package/dist/components/base.css +66 -1
  17. package/dist/components/capsule-tab/index.js +33 -27
  18. package/dist/components/capsule-tab/style.css +32 -1
  19. package/dist/components/chunk-file-uploader/index.js +88 -54
  20. package/dist/components/chunk-file-uploader/style.css +4 -1
  21. package/dist/components/chunk-file-uploader-button/index.js +31 -25
  22. package/dist/components/chunk-file-uploader-button/style.css +17 -1
  23. package/dist/components/chunk-file-uploader-drop/index.js +42 -28
  24. package/dist/components/chunk-file-uploader-drop/style.css +12 -1
  25. package/dist/components/chunk-file-uploader-file/index.js +212 -134
  26. package/dist/components/chunk-file-uploader-file/style.css +125 -1
  27. package/dist/components/chunk-file-uploader-files/index.js +34 -28
  28. package/dist/components/chunk-file-uploader-files/style.css +9 -1
  29. package/dist/components/chunk-file-uploader-list/index.js +35 -29
  30. package/dist/components/chunk-file-uploader-list/style.css +9 -1
  31. package/dist/components/chunk-file-uploader-un-support/index.js +38 -30
  32. package/dist/components/chunk-file-uploader-un-support/style.css +6 -1
  33. package/dist/components/code-mirror-editor/index.js +181 -153
  34. package/dist/components/code-mirror-editor/style.css +17 -1
  35. package/dist/components/color-picker/index.js +68 -49
  36. package/dist/components/confirm-button/index.js +21 -19
  37. package/dist/components/confirmable/index.js +19 -18
  38. package/dist/components/context-menu/index.js +130 -108
  39. package/dist/components/context-menu/style.css +88 -1
  40. package/dist/components/custom-scrollbar/index.js +67 -49
  41. package/dist/components/data-table-picker/index.js +81 -62
  42. package/dist/components/dynamic-table/index.js +113 -89
  43. package/dist/components/dynamic-table/style.css +30 -1
  44. package/dist/components/e-charts/index.js +201 -120
  45. package/dist/components/e-charts/style.css +10 -1
  46. package/dist/components/editable-progress/index.js +93 -60
  47. package/dist/components/editable-progress/style.css +37 -1
  48. package/dist/components/editable-tree/index.js +638 -423
  49. package/dist/components/editable-tree/style.css +82 -1
  50. package/dist/components/egd-collapse/index.js +46 -33
  51. package/dist/components/egd-collapse-item/index.js +76 -60
  52. package/dist/components/element-dialog/index.js +147 -95
  53. package/dist/components/element-dialog/style.css +102 -1
  54. package/dist/components/empty-view/index.js +34 -28
  55. package/dist/components/empty-view/style.css +17 -1
  56. package/dist/components/error-view/index.js +32 -26
  57. package/dist/components/error-view/style.css +17 -1
  58. package/dist/components/flex-column/index.js +40 -25
  59. package/dist/components/flex-item/index.js +57 -29
  60. package/dist/components/flex-row/index.js +40 -25
  61. package/dist/components/flex-scroller/index.js +32 -26
  62. package/dist/components/flex-scroller/style.css +20 -1
  63. package/dist/components/form-button/index.js +38 -34
  64. package/dist/components/form-cascader/index.js +81 -71
  65. package/dist/components/form-checkbox-group/index.js +113 -88
  66. package/dist/components/form-checkbox-group/style.css +51 -1
  67. package/dist/components/form-date-picker/index.js +132 -70
  68. package/dist/components/form-holder/index.js +39 -32
  69. package/dist/components/form-input/index.js +62 -56
  70. package/dist/components/form-input-email/index.js +60 -48
  71. package/dist/components/form-input-id-card/index.js +59 -53
  72. package/dist/components/form-input-number/index.js +68 -61
  73. package/dist/components/form-input-number/style.css +12 -1
  74. package/dist/components/form-input-phone-number/index.js +55 -49
  75. package/dist/components/form-input-time/index.js +59 -53
  76. package/dist/components/form-item/index.js +123 -80
  77. package/dist/components/form-item/style.css +11 -1
  78. package/dist/components/form-item-config-provider/index.js +26 -25
  79. package/dist/components/form-item-group/index.js +111 -85
  80. package/dist/components/form-item-group/style.css +30 -1
  81. package/dist/components/form-radio-group/index.js +104 -85
  82. package/dist/components/form-radio-group/style.css +53 -1
  83. package/dist/components/form-select/index.js +91 -76
  84. package/dist/components/form-switch/index.js +57 -51
  85. package/dist/components/form-textarea/index.js +57 -51
  86. package/dist/components/form-view/index.js +232 -165
  87. package/dist/components/form-view/style.css +158 -1
  88. package/dist/components/guide-steps/index.js +58 -44
  89. package/dist/components/guide-steps/style.css +34 -1
  90. package/dist/components/icon-card/index.js +35 -29
  91. package/dist/components/icon-card/style.css +56 -1
  92. package/dist/components/iframe-window/index.js +35 -29
  93. package/dist/components/iframe-window/style.css +20 -1
  94. package/dist/components/image-viewer/index.js +66 -48
  95. package/dist/components/image-viewer/style.css +21 -1
  96. package/dist/components/input-number/index.js +193 -127
  97. package/dist/components/input-number/style.css +15 -1
  98. package/dist/components/input-number-range/index.js +57 -45
  99. package/dist/components/input-number-range/style.css +12 -1
  100. package/dist/components/j-s-x-component/index.js +4 -4
  101. package/dist/components/keep-view-alive/index.js +120 -73
  102. package/dist/components/loading-view/index.js +32 -26
  103. package/dist/components/loading-view/style.css +17 -1
  104. package/dist/components/nav-bar/index.js +37 -27
  105. package/dist/components/nav-bar/style.css +17 -1
  106. package/dist/components/not-implement/index.js +31 -23
  107. package/dist/components/not-implement/style.css +15 -1
  108. package/dist/components/page/index.js +28 -22
  109. package/dist/components/page/style.css +12 -1
  110. package/dist/components/page-header/index.js +36 -30
  111. package/dist/components/page-header/style.css +14 -1
  112. package/dist/components/page-index/index.js +83 -62
  113. package/dist/components/page-index/style.css +23 -1
  114. package/dist/components/page-index-top/index.js +68 -53
  115. package/dist/components/page-skeleton/index.js +37 -31
  116. package/dist/components/page-skeleton/style.css +23 -1
  117. package/dist/components/page-skeleton-new/index.js +48 -42
  118. package/dist/components/page-skeleton-new/style.css +42 -1
  119. package/dist/components/pageable-table/index.js +253 -186
  120. package/dist/components/pageable-table/style.css +72 -1
  121. package/dist/components/pageable-view/index.js +199 -129
  122. package/dist/components/pageable-view/style.css +69 -1
  123. package/dist/components/photo-swipe/index.js +151 -110
  124. package/dist/components/photo-swipe/style.css +20 -1
  125. package/dist/components/resize-observer/index.js +68 -34
  126. package/dist/components/resize-observer/style.css +31 -1
  127. package/dist/components/search-popover/index.js +211 -153
  128. package/dist/components/search-popover/style.css +93 -1
  129. package/dist/components/sign-panel/index.js +142 -92
  130. package/dist/components/sign-panel/style.css +97 -1
  131. package/dist/components/split-pane/index.js +162 -101
  132. package/dist/components/split-pane/style.css +100 -1
  133. package/dist/components/stateful/index.js +34 -31
  134. package/dist/components/stateful/style.css +33 -1
  135. package/dist/components/static-pageable-table/index.js +44 -37
  136. package/dist/components/static-pageable-table/style.css +9 -1
  137. package/dist/components/swiper/index.js +150 -85
  138. package/dist/components/swiper/style.css +43 -1
  139. package/dist/components/tab/index.js +72 -54
  140. package/dist/components/tab/style.css +122 -1
  141. package/dist/components/tab-item/index.js +35 -30
  142. package/dist/components/table-column/index.js +32 -30
  143. package/dist/components/table-view/index.js +227 -156
  144. package/dist/components/table-view/style.css +95 -1
  145. package/dist/components/tag-render/index.js +58 -44
  146. package/dist/components/tag-render/style.css +33 -1
  147. package/dist/components/tinymce-editor/index.js +95 -79
  148. package/dist/components/tinymce-editor/style.css +43 -1
  149. package/dist/components/tinymce-wrapper/index.js +121 -92
  150. package/dist/components/tinymce-wrapper/style.css +36 -1
  151. package/dist/components/toolbar/index.js +84 -63
  152. package/dist/components/toolbar/style.css +39 -1
  153. package/dist/components/toolbar-button/index.js +48 -41
  154. package/dist/components/toolbar-button/style.css +21 -1
  155. package/dist/components/trigger/index.js +36 -29
  156. package/dist/components/vue-tags-input/index.js +308 -188
  157. package/dist/components/vue-tags-input/style.css +682 -1
  158. package/dist/components/watermark/index.js +37 -25
  159. package/dist/components/watermark/style.css +11 -1
  160. package/dist/components/x-dialog/index.js +93 -67
  161. package/dist/components/x-dialog/style.css +15 -1
  162. package/dist/index.css +1105 -193
  163. package/dist/index.es.js +7242 -4789
  164. package/package.json +1 -1
  165. package/web-types.json +1 -1
  166. package/dist/chunks/3a79781b.js +0 -75
  167. package/dist/chunks/5d4282fb.js +0 -30
  168. package/dist/chunks/76680a03.js +0 -24
  169. package/dist/chunks/8c0142e0.js +0 -81
  170. package/dist/chunks/97652d86.js +0 -26
  171. package/dist/chunks/b4acd3a6.js +0 -126
  172. package/dist/chunks/f71045fc.js +0 -184
@@ -1,102 +1,108 @@
1
- import { fastClone as u, validateNumber as d, validateIdCard as c, validatePhoneNum as m } from "@web-utils/core";
2
- import { n as f } from "../../chunks/5d4282fb.js";
3
- var h = function() {
4
- var e = this, i = e.$createElement, t = e._self._c || i;
5
- return t("div", {
1
+ import { fastClone, validateNumber, validateIdCard, validatePhoneNum } from "@web-utils/core";
2
+ import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
3
+ var render = function() {
4
+ var _vm = this;
5
+ var _h = _vm.$createElement;
6
+ var _c = _vm._self._c || _h;
7
+ return _c("div", {
6
8
  staticClass: "dynamic-table"
7
- }, [t("ElTable", {
8
- key: e.key,
9
+ }, [_c("ElTable", {
10
+ key: _vm.key,
9
11
  staticStyle: {
10
- width: "100%"
12
+ "width": "100%"
11
13
  },
12
14
  attrs: {
13
- data: e.value
15
+ "data": _vm.value
14
16
  }
15
- }, [e._l(e.columns, function(a) {
16
- return t("ElTableColumn", {
17
- key: a.prop,
17
+ }, [_vm._l(_vm.columns, function(column) {
18
+ return _c("ElTableColumn", {
19
+ key: column.prop,
18
20
  attrs: {
19
- prop: a.prop,
20
- label: a.label,
21
+ "prop": column.prop,
22
+ "label": column.label,
21
23
  "min-width": "150"
22
24
  },
23
- scopedSlots: e._u([{
25
+ scopedSlots: _vm._u([{
24
26
  key: "default",
25
- fn: function(l) {
26
- var n = l.row, r = l.$index;
27
- return [t("ElFormItem", {
27
+ fn: function(_ref) {
28
+ var row = _ref.row, $index = _ref.$index;
29
+ return [_c("ElFormItem", {
28
30
  style: {
29
- marginBottom: e.inputDisabled ? "0px" : "16px"
31
+ marginBottom: _vm.inputDisabled ? "0px" : "16px"
30
32
  },
31
33
  attrs: {
32
- prop: `${e.prop}.${r}.${a.prop}`,
33
- size: "mini",
34
- rules: e.getRules(a)
34
+ "prop": `${_vm.prop}.${$index}.${column.prop}`,
35
+ "size": "mini",
36
+ "rules": _vm.getRules(column)
35
37
  }
36
- }, [t("ElInput", {
38
+ }, [_c("ElInput", {
37
39
  attrs: {
38
- "prefix-icon": e.getIcon(a),
39
- disabled: e.inputDisabled,
40
- placeholder: e.inputDisabled ? "" : `请输入${a.label}!`
40
+ "prefix-icon": _vm.getIcon(column),
41
+ "disabled": _vm.inputDisabled,
42
+ "placeholder": _vm.inputDisabled ? "" : `请输入${column.label}!`
41
43
  },
42
44
  model: {
43
- value: n[a.prop],
44
- callback: function(s) {
45
- e.$set(n, a.prop, s);
45
+ value: row[column.prop],
46
+ callback: function($$v) {
47
+ _vm.$set(row, column.prop, $$v);
46
48
  },
47
49
  expression: "row[column.prop]"
48
50
  }
49
51
  })], 1)];
50
52
  }
51
- }], null, !0)
53
+ }], null, true)
52
54
  });
53
- }), e.inputDisabled ? e._e() : t("ElTableColumn", {
55
+ }), !_vm.inputDisabled ? _c("ElTableColumn", {
54
56
  attrs: {
55
- label: "操作",
56
- width: "60",
57
- fixed: "right"
57
+ "label": "操作",
58
+ "width": "60",
59
+ "fixed": "right"
58
60
  },
59
- scopedSlots: e._u([{
61
+ scopedSlots: _vm._u([{
60
62
  key: "default",
61
- fn: function(a) {
62
- var l = a.row, n = a.column, r = a.$index;
63
- return [t("i", {
63
+ fn: function(_ref2) {
64
+ var row = _ref2.row, column = _ref2.column, $index = _ref2.$index;
65
+ return [_c("i", {
64
66
  staticClass: "el-icon-minus dynamic-table-action-icon",
65
67
  staticStyle: {
66
- position: "relative",
67
- top: "-8px",
68
- color: "#f00"
68
+ "position": "relative",
69
+ "top": "-8px",
70
+ "color": "#f00"
69
71
  },
70
72
  attrs: {
71
- title: "删除"
73
+ "title": "删除"
72
74
  },
73
75
  on: {
74
- click: function(s) {
75
- return s.stopPropagation(), e.removeRow(l, r, n);
76
+ "click": function($event) {
77
+ $event.stopPropagation();
78
+ return _vm.removeRow(row, $index, column);
76
79
  }
77
80
  }
78
81
  })];
79
82
  }
80
- }], null, !1, 410881950)
81
- })], 2), e.inputDisabled ? e._e() : t("ElButton", {
83
+ }], null, false, 410881950)
84
+ }) : _vm._e()], 2), !_vm.inputDisabled ? _c("ElButton", {
82
85
  staticStyle: {
83
- color: "#08c108"
86
+ "color": "#08c108"
84
87
  },
85
88
  attrs: {
86
- type: "text",
87
- icon: "el-icon-plus"
89
+ "type": "text",
90
+ "icon": "el-icon-plus"
88
91
  },
89
92
  on: {
90
- click: e.addRow
93
+ "click": _vm.addRow
91
94
  }
92
- }, [e._v(" 添加 ")])], 1);
93
- }, y = [];
94
- const o = {
95
+ }, [_vm._v(" 添加 ")]) : _vm._e()], 1);
96
+ };
97
+ var staticRenderFns = [];
98
+ const DynamicTable_vue_vue_type_style_index_0_lang = "";
99
+ const icons = {
95
100
  number: "fa fa-superscript",
96
101
  email: "el-icon-lx-mail",
97
102
  phone: "fa fa-phone",
98
103
  idCard: "el-icon-lx-news"
99
- }, v = {
104
+ };
105
+ const __vue2_script = {
100
106
  name: "DynamicTable",
101
107
  inject: {
102
108
  elForm: {
@@ -133,63 +139,81 @@ const o = {
133
139
  },
134
140
  watch: {
135
141
  value: {
136
- deep: !0,
137
- handler(e) {
138
- this.$emit("input", e);
142
+ deep: true,
143
+ handler(newVal) {
144
+ this.$emit("input", newVal);
139
145
  }
140
146
  },
141
147
  columns: {
142
- deep: !0,
148
+ deep: true,
143
149
  handler() {
144
150
  this.key++;
145
151
  }
146
152
  }
147
153
  },
148
154
  methods: {
149
- getIcon(e) {
150
- return o[e.type] ? o[e.type] : "";
155
+ getIcon(column) {
156
+ return icons[column.type] ? icons[column.type] : "";
151
157
  },
152
158
  addRow() {
153
- const e = this.value;
154
- e.push(this.newRow()), this.$emit("input", e);
159
+ const value = this.value;
160
+ value.push(this.newRow());
161
+ this.$emit("input", value);
155
162
  },
156
- removeRow(e, i) {
157
- const t = this.value;
158
- t.splice(i, 1), this.$emit("input", t);
163
+ removeRow(row, index) {
164
+ const value = this.value;
165
+ value.splice(index, 1);
166
+ this.$emit("input", value);
159
167
  },
160
168
  newRow() {
161
- const e = {};
162
- return this.columns.forEach((i) => {
163
- e[i.prop] = void 0;
164
- }), e;
169
+ const row = {};
170
+ this.columns.forEach((value) => {
171
+ row[value.prop] = void 0;
172
+ });
173
+ return row;
165
174
  },
166
- getRules(e) {
167
- const i = e.rules;
168
- if (["email", "idCard", "phone", "number"].includes(e.type)) {
169
- const t = u(i || []);
170
- return e.type === "number" && t.push({ validator: d, message: "请输入数字!" }), e.type === "email" && t.push({ type: "email", message: "请输入正确的邮箱地址!" }), e.type === "idCard" && t.push({ validator: c, message: "请输入正确的身份证号码!" }), e.type === "phone" && t.push({ validator: m, message: "请输入正确的手机号码!" }), t;
171
- } else
172
- return i;
175
+ getRules(column) {
176
+ const userRules = column.rules;
177
+ if (["email", "idCard", "phone", "number"].includes(column.type)) {
178
+ const rules = fastClone(userRules || []);
179
+ if (column.type === "number") {
180
+ rules.push({ validator: validateNumber, message: "请输入数字!" });
181
+ }
182
+ if (column.type === "email") {
183
+ rules.push({ type: "email", message: "请输入正确的邮箱地址!" });
184
+ }
185
+ if (column.type === "idCard") {
186
+ rules.push({ validator: validateIdCard, message: "请输入正确的身份证号码!" });
187
+ }
188
+ if (column.type === "phone") {
189
+ rules.push({ validator: validatePhoneNum, message: "请输入正确的手机号码!" });
190
+ }
191
+ return rules;
192
+ } else {
193
+ return userRules;
194
+ }
173
195
  }
174
196
  }
175
- }, p = {};
176
- var b = /* @__PURE__ */ f(
177
- v,
178
- h,
179
- y,
180
- !1,
181
- _,
197
+ };
198
+ const __cssModules = {};
199
+ var __component__ = /* @__PURE__ */ normalizeComponent(
200
+ __vue2_script,
201
+ render,
202
+ staticRenderFns,
203
+ false,
204
+ __vue2_injectStyles,
182
205
  null,
183
206
  null,
184
207
  null
185
208
  );
186
- function _(e) {
187
- for (let i in p)
188
- this[i] = p[i];
209
+ function __vue2_injectStyles(context) {
210
+ for (let o in __cssModules) {
211
+ this[o] = __cssModules[o];
212
+ }
189
213
  }
190
- const g = /* @__PURE__ */ function() {
191
- return b.exports;
214
+ const DynamicTable = /* @__PURE__ */ function() {
215
+ return __component__.exports;
192
216
  }();
193
217
  export {
194
- g as default
218
+ DynamicTable as default
195
219
  };
@@ -1 +1,30 @@
1
- .dynamic-table{display:flex;flex-direction:column;align-items:center;width:100%}.dynamic-table .dynamic-table-action-icon{margin-left:10px;font-weight:700;cursor:pointer}.dynamic-table .el-form-item{margin-bottom:0}.dynamic-table .el-table{flex:1 1 auto}.dynamic-table .el-table td{padding:2px 0}.dynamic-table .el-input.is-disabled .el-input__inner{background-color:transparent;border:none}
1
+ /* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
2
+ /* 应用头部高度 */
3
+ /* 页面宽度 */
4
+ /* 侧栏宽度 */
5
+ /* 标签高度 */
6
+ /* 页面头部工具条高度 */
7
+ .dynamic-table {
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: center;
11
+ width: 100%;
12
+ }
13
+ .dynamic-table .dynamic-table-action-icon {
14
+ margin-left: 10px;
15
+ font-weight: bold;
16
+ cursor: pointer;
17
+ }
18
+ .dynamic-table .el-form-item {
19
+ margin-bottom: 0;
20
+ }
21
+ .dynamic-table .el-table {
22
+ flex: 1 1 auto;
23
+ }
24
+ .dynamic-table .el-table td {
25
+ padding: 2px 0;
26
+ }
27
+ .dynamic-table .el-input.is-disabled .el-input__inner {
28
+ background-color: transparent;
29
+ border: none;
30
+ }