@web-utils/component 4.0.0 → 4.0.2

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/awesome-button/index.mjs +25 -55
  2. package/base.css +1 -1
  3. package/card/style.css +1 -1
  4. package/carousel/style.css +1 -1
  5. package/chat/style.css +1 -1
  6. package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
  7. package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
  8. package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
  9. package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
  10. package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
  11. package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
  12. package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
  13. package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
  14. package/chunks/configComponents.BDhlZU8F.mjs +23 -0
  15. package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
  16. package/chunks/core.DJEgjQW6.mjs +54 -0
  17. package/chunks/dictionary.DqiP9x2m.mjs +25 -0
  18. package/chunks/dictionary.DsN-2ukC.mjs +70 -0
  19. package/chunks/form-input.B8z37eqj.mjs +31 -0
  20. package/chunks/form-item.D-H-wCPE.mjs +233 -0
  21. package/chunks/form-validate.CVarNHKX.mjs +12 -0
  22. package/chunks/helper.BiMLcEEk.mjs +41 -0
  23. package/chunks/index.9OxHjTIE.mjs +16 -0
  24. package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
  25. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  26. package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
  27. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  28. package/color-picker/index.mjs +19 -37
  29. package/comment/style.css +1 -1
  30. package/confirm-button/index.mjs +1 -1
  31. package/confirmable/index.mjs +1 -1
  32. package/context-menu/style.css +1 -1
  33. package/count-up/index.mjs +13 -24
  34. package/custom-scrollbar/index.mjs +1 -2
  35. package/data-operatext/style.css +1 -1
  36. package/data-panel/style.css +1 -1
  37. package/data-pay/style.css +1 -1
  38. package/data-price/style.css +1 -1
  39. package/data-rotate/style.css +1 -1
  40. package/data-table-picker/index.mjs +1 -1
  41. package/data-tabs/style.css +1 -1
  42. package/dialog-form/index.mjs +16 -28
  43. package/dynamic-table/style.css +1 -1
  44. package/easy-popup/index.mjs +22 -40
  45. package/easy-popup/style.css +1 -1
  46. package/editable-tree/index.mjs +203 -250
  47. package/editable-tree/style.css +1 -1
  48. package/element-dialog/index.mjs +30 -52
  49. package/element-dialog/style.css +1 -1
  50. package/flex-column/index.mjs +13 -25
  51. package/flex-item/index.mjs +15 -27
  52. package/flex-row/index.mjs +13 -25
  53. package/flow-designer/index.mjs +343 -374
  54. package/flow-designer/style.css +1 -1
  55. package/flow-viewer/index.mjs +64 -91
  56. package/form-block/index.mjs +33 -26
  57. package/form-card/index.mjs +25 -0
  58. package/form-cascader/index.mjs +70 -67
  59. package/form-checkbox/index.mjs +71 -0
  60. package/form-checkbox-group/index.mjs +33 -53
  61. package/form-date-picker/index.mjs +44 -73
  62. package/form-holder/index.mjs +54 -40
  63. package/form-holder/style.css +1 -0
  64. package/form-input/index.mjs +62 -40
  65. package/form-input-cron-expression/index.mjs +77 -0
  66. package/form-input-cron-expression/style.css +1 -0
  67. package/form-input-email/index.mjs +21 -33
  68. package/form-input-id-card/index.mjs +25 -38
  69. package/form-input-number/index.mjs +39 -42
  70. package/form-input-number/style.css +1 -1
  71. package/form-input-phone-number/index.mjs +26 -37
  72. package/form-input-tag/index.mjs +32 -34
  73. package/form-input-time/index.mjs +22 -37
  74. package/form-item/index.mjs +109 -101
  75. package/form-item/style.css +1 -1
  76. package/form-item-config-provider/index.mjs +18 -10
  77. package/form-item-group/index.mjs +73 -69
  78. package/form-item-group/style.css +1 -1
  79. package/form-radio-group/index.mjs +41 -36
  80. package/form-radio-group/style.css +1 -1
  81. package/form-select/index.mjs +142 -75
  82. package/form-select/style.css +1 -0
  83. package/form-switch/index.mjs +29 -34
  84. package/form-table/index.mjs +85 -0
  85. package/form-table-plus/index.mjs +109 -0
  86. package/form-textarea/index.mjs +23 -35
  87. package/form-tree-select/index.mjs +72 -0
  88. package/form-tree-select/style.css +1 -0
  89. package/form-tree-select-multiple/index.mjs +78 -0
  90. package/form-view/index.mjs +37 -69
  91. package/form-view/style.css +1 -1
  92. package/fy-curd/index.mjs +131 -140
  93. package/fy-curd/style.css +1 -1
  94. package/fy-draggable/index.mjs +16 -26
  95. package/fy-draggable/style.css +1 -1
  96. package/fy-dynamic/index.mjs +48 -57
  97. package/fy-empty/style.css +1 -1
  98. package/fy-form/style.css +1 -1
  99. package/fy-form-design/index.mjs +314 -339
  100. package/fy-form-design/style.css +1 -1
  101. package/fy-input-map/index.mjs +40 -50
  102. package/fy-input-map/style.css +1 -1
  103. package/fy-input-table/index.mjs +31 -41
  104. package/fy-u-editor/index.mjs +77 -103
  105. package/fy-upload/style.css +1 -1
  106. package/highlight-j-s/style.css +1 -1
  107. package/image-cropper/index.mjs +14 -65
  108. package/image-preview/index.mjs +17 -45
  109. package/image-preview/style.css +1 -1
  110. package/image-viewer/style.css +1 -1
  111. package/index.mjs +666 -496
  112. package/input-number/index.mjs +64 -9
  113. package/keyboard/style.css +1 -1
  114. package/monaco-editor/index.mjs +43 -71
  115. package/name-avatar/style.css +1 -1
  116. package/package.json +5 -4
  117. package/page-index/index.mjs +30 -54
  118. package/page-index-top/index.mjs +25 -47
  119. package/pageable-table/index.mjs +385 -218
  120. package/pageable-table/style.css +1 -1
  121. package/pageable-view/index.mjs +56 -95
  122. package/photo-swipe/index.mjs +51 -74
  123. package/picker-table-view/index.mjs +117 -0
  124. package/present-view/index.mjs +43 -77
  125. package/present-view/style.css +1 -1
  126. package/resize-observer/index.mjs +1 -1
  127. package/resize-observer/style.css +1 -1
  128. package/search/style.css +1 -1
  129. package/search-popover/index.mjs +28 -48
  130. package/search-popover/style.css +1 -1
  131. package/sign/index.mjs +1 -1
  132. package/sign-panel/style.css +1 -1
  133. package/skeleton-panel/index.mjs +38 -0
  134. package/skeleton-panel/style.css +1 -0
  135. package/split-pane/index.mjs +31 -49
  136. package/split-pane/style.css +1 -1
  137. package/sub-table/index.mjs +206 -0
  138. package/sub-table/style.css +1 -0
  139. package/sub-table-plus/index.mjs +231 -0
  140. package/sub-table-plus/style.css +1 -0
  141. package/swiper/index.mjs +18 -38
  142. package/swiper/style.css +1 -1
  143. package/tab/index.mjs +1 -1
  144. package/tab/style.css +1 -1
  145. package/tab-item/index.mjs +2 -2
  146. package/table-column/index.mjs +166 -37
  147. package/table-column/style.css +1 -0
  148. package/table-view/index.mjs +177 -132
  149. package/table-view/style.css +1 -1
  150. package/tabs-view/index.mjs +104 -0
  151. package/tabs-view/style.css +1 -0
  152. package/tag-render/index.mjs +13 -24
  153. package/toolbar/index.mjs +115 -58
  154. package/toolbar/style.css +1 -1
  155. package/toolbar-button/index.mjs +92 -48
  156. package/vue-cron/index.mjs +47 -65
  157. package/vue-qr-code/index.mjs +14 -32
  158. package/vue-quill-editor/index.mjs +13 -24
  159. package/vue-tags-input/index.mjs +10 -21
  160. package/vue-tree-select/index.mjs +352 -393
  161. package/vue-tree-select/style.css +1 -1
  162. package/vue-video-player/index.mjs +34 -63
  163. package/watermark/index.mjs +21 -31
  164. package/web-types.json +9240 -3840
  165. package/x-input-tag/index.mjs +29 -61
  166. package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
  167. package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
  168. package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
  169. package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
  170. package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
  171. package/toolbar-button/style.css +0 -1
  172. /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
@@ -1 +1 @@
1
- .egd-split-wrapper{width:100%;height:100%;position:relative}.egd-split-pane{position:absolute}.egd-split-pane.left-pane,.egd-split-pane.right-pane{top:0;bottom:0}.egd-split-pane.left-pane{left:0}.egd-split-pane.right-pane{right:0}.egd-split-pane.top-pane,.egd-split-pane.bottom-pane{left:0;right:0}.egd-split-pane.top-pane{top:0}.egd-split-pane.bottom-pane{bottom:0}.egd-split-trigger-con{z-index:10;position:absolute;transform:translate(-50%,-50%)}.egd-split-trigger-bar-con{position:absolute;overflow:hidden}.egd-split-trigger-bar-con.vertical{height:32px;top:50%;left:1px;transform:translateY(-50%)}.egd-split-trigger-bar-con.horizontal{width:32px;top:1px;left:50%;transform:translate(-50%)}.egd-split-trigger-vertical{cursor:ew-resize;background:#f8f8f9;width:6px;height:100%;box-shadow:0 0 4px rgba(28,36,56,.4)}.egd-split-trigger-vertical .egd-split-trigger-bar{float:left;background:rgba(23,35,61,.25);width:4px;height:1px;margin-top:3px}.egd-split-trigger-horizontal{cursor:ns-resize;background:#f8f8f9;width:100%;height:6px;box-shadow:0 0 4px rgba(28,36,56,.4)}.egd-split-trigger-horizontal .egd-split-trigger-bar{float:left;background:rgba(23,35,61,.25);width:1px;height:4px;margin-right:3px}.egd-split-horizontal .egd-split-trigger-con{border-right:1px solid #d7dae0;height:100%;top:50%}.egd-split-vertical .egd-split-trigger-con{border-bottom:1px solid #d7dae0;width:100%;left:50%}.egd-split-trigger-vertical-line,.egd-split-trigger-horizontal-line{box-shadow:none;background-color:transparent}.egd-split .no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
1
+ .egd-split-wrapper{width:100%;height:100%;position:relative}.egd-split-pane{position:absolute}.egd-split-pane.left-pane,.egd-split-pane.right-pane{top:0;bottom:0}.egd-split-pane.left-pane{left:0}.egd-split-pane.right-pane{right:0}.egd-split-pane.top-pane,.egd-split-pane.bottom-pane{left:0;right:0}.egd-split-pane.top-pane{top:0}.egd-split-pane.bottom-pane{bottom:0}.egd-split-trigger-con{z-index:10;position:absolute;transform:translate(-50%,-50%)}.egd-split-trigger-bar-con{position:absolute;overflow:hidden}.egd-split-trigger-bar-con.vertical{height:32px;top:50%;left:1px;transform:translateY(-50%)}.egd-split-trigger-bar-con.horizontal{width:32px;top:1px;left:50%;transform:translate(-50%)}.egd-split-trigger-vertical{cursor:ew-resize;background:#f8f8f9;width:6px;height:100%;box-shadow:0 0 4px #1c243866}.egd-split-trigger-vertical .egd-split-trigger-bar{float:left;background:#17233d40;width:4px;height:1px;margin-top:3px}.egd-split-trigger-horizontal{cursor:ns-resize;background:#f8f8f9;width:100%;height:6px;box-shadow:0 0 4px #1c243866}.egd-split-trigger-horizontal .egd-split-trigger-bar{float:left;background:#17233d40;width:1px;height:4px;margin-right:3px}.egd-split-horizontal .egd-split-trigger-con{border-right:1px solid #d7dae0;height:100%;top:50%}.egd-split-vertical .egd-split-trigger-con{border-bottom:1px solid #d7dae0;width:100%;left:50%}.egd-split-trigger-vertical-line,.egd-split-trigger-horizontal-line{box-shadow:none;background-color:#0000}.egd-split .no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
@@ -0,0 +1,206 @@
1
+ import { findTreeChildren as u, isFunction as d } from "@web-utils/core";
2
+ import { cloneDeep as i } from "@web-utils/integrations/lodash";
3
+ import { n as b } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
+ const c = {
5
+ name: "SubTable",
6
+ emits: ["add-row"],
7
+ inject: {
8
+ elForm: {
9
+ default: ""
10
+ },
11
+ elFormItem: {
12
+ default: ""
13
+ }
14
+ },
15
+ props: {
16
+ value: Array,
17
+ prop: String,
18
+ columns: Array,
19
+ limit: {
20
+ type: Number,
21
+ default: 1 / 0
22
+ },
23
+ maxLimit: {
24
+ type: Number,
25
+ default: 1 / 0
26
+ },
27
+ disabled: Boolean,
28
+ showSummary: Boolean,
29
+ selectionWidth: String,
30
+ allowEmpty: Boolean,
31
+ handleColumn: {
32
+ type: Boolean,
33
+ default: !0
34
+ },
35
+ editable: Boolean,
36
+ fetchApi: Function,
37
+ delApi: Function,
38
+ showHandleColumnAddButton: {
39
+ type: Boolean,
40
+ default: !0
41
+ },
42
+ showEmptyAddButton: {
43
+ type: Boolean,
44
+ default: !0
45
+ }
46
+ },
47
+ data() {
48
+ return {
49
+ rows: [],
50
+ selectedRows: []
51
+ };
52
+ },
53
+ computed: {
54
+ available() {
55
+ return this.editable && this.enabled;
56
+ },
57
+ enabled() {
58
+ return !this.disabled;
59
+ },
60
+ rowProps() {
61
+ const n = {};
62
+ return this.columns && this.columns.map((e) => e.prop).forEach((e) => {
63
+ n[e] = null;
64
+ }), n;
65
+ },
66
+ inputDisabled() {
67
+ return this.disabled || (this.elForm || {}).disabled;
68
+ }
69
+ },
70
+ watch: {
71
+ value: {
72
+ deep: !0,
73
+ immediate: !0,
74
+ handler(n) {
75
+ this.rows = n || [];
76
+ }
77
+ },
78
+ rows: {
79
+ deep: !0,
80
+ immediate: !0,
81
+ handler(n) {
82
+ this.$emit("input", n);
83
+ }
84
+ }
85
+ },
86
+ methods: {
87
+ getCellType(n, e) {
88
+ return d(e.getType) ? e.getType(n, e) : e.type;
89
+ },
90
+ getInputAttr(n, e) {
91
+ return { ...e.attrs, ...e.getAttrs ? e.getAttrs(n) : {} };
92
+ },
93
+ isInputDisabled(n, e) {
94
+ return e.isDisabled && e.isDisabled(n);
95
+ },
96
+ onInput(n, e, a) {
97
+ a.setValue ? a.setValue(n, e, a, this.rows) : n[a.prop] = e;
98
+ },
99
+ onSelectionChange(n) {
100
+ this.selectedRows = n;
101
+ },
102
+ remove(n, e) {
103
+ try {
104
+ this.rows.splice(e, 1);
105
+ } catch {
106
+ }
107
+ },
108
+ add(n, e) {
109
+ const a = i(this.rowProps);
110
+ this.rows.splice(e + 1, 0, a);
111
+ },
112
+ addRow() {
113
+ this.$emit("add-row");
114
+ },
115
+ async delRow() {
116
+ if (!this.selectedRows.length) {
117
+ this.$message.warning("请选择要删除的记录!");
118
+ return;
119
+ }
120
+ try {
121
+ if (this.delApi)
122
+ try {
123
+ await this.delApi(this.selectedRows.map((n) => n.id).join(",")), this.refresh();
124
+ } catch {
125
+ this.$message.error("删除失败!");
126
+ }
127
+ else
128
+ this.$emit(
129
+ "input",
130
+ this.rows.filter((n) => !this.selectedRows.includes(n))
131
+ );
132
+ this.$message.success("删除成功!");
133
+ } catch {
134
+ }
135
+ },
136
+ refresh() {
137
+ this.$refs.table.getPage();
138
+ },
139
+ getVal(n, e, a) {
140
+ var t, r;
141
+ if (a.type === "select" && ((t = a.attrs) != null && t.options)) {
142
+ const s = a.attrs.options.find((p) => p.code === n[e.property]);
143
+ if (s)
144
+ return s.name;
145
+ }
146
+ if (a.type === "cascader" && ((r = a.attrs) != null && r.options)) {
147
+ const [s] = u(a.attrs.options, (p) => p[a.attrs.valueKey || "value"] === n[e.property]);
148
+ if (s)
149
+ return s[a.attrs.valueKey || "label"];
150
+ }
151
+ return n[e.property];
152
+ }
153
+ }
154
+ };
155
+ var h = function() {
156
+ var e = this, a = e._self._c;
157
+ return a("PageableTable", e._g(e._b({ ref: "table", staticClass: "sub-table", attrs: { "auto-height": "", data: e.rows, api: e.fetchApi, "show-summary": e.showSummary, "selection-width": e.selectionWidth, "hide-on-single-page": "", selection: e.enabled }, on: { "selection-change": e.onSelectionChange }, scopedSlots: e._u([e.editable ? null : { key: "toolbar", fn: function() {
158
+ return [e.enabled || e.fetchApi ? a("div", { staticClass: "table-header" }, [e._t("toolbar", function() {
159
+ return [e.enabled ? [a("ElButton", { staticClass: "table-header-button add", attrs: { size: "mini", icon: "el-icon-circle-plus", type: "text" }, on: { click: e.addRow } }, [e._v("添加")]), a("ConfirmButton", { staticClass: "table-header-button remove", attrs: { size: "mini", message: "您确定要删除选中的记录吗?", icon: "el-icon-error", type: "text" }, on: { click: e.delRow } }, [e._v(" 删除 ")])] : e._e(), e.fetchApi ? a("ElButton", { staticClass: "table-header-button refresh", attrs: { size: "mini", icon: "el-icon-refresh-left", type: "text", disabled: !1 }, on: { click: e.refresh } }, [e._v(" 刷新 ")]) : e._e()];
160
+ }, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2) : e._e()];
161
+ }, proxy: !0 }, e.allowEmpty && !e.inputDisabled && e.showEmptyAddButton ? { key: "empty", fn: function() {
162
+ return [a("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
163
+ return t.stopPropagation(), e.add(null, 0);
164
+ } } })];
165
+ }, proxy: !0 } : null], null, !0) }, "PageableTable", e.$attrs, !1), e.$listeners), [e._t("columns", function() {
166
+ return [e._l(e.columns, function(t) {
167
+ return [t.label && !t.hide && !t.slot ? a("TableColumn", { key: `${t.prop}-${e.enabled}-${t.type}`, attrs: { label: t.label, width: t.width, align: t.align, prop: t.prop, options: t.options, "show-overflow-tooltip": !e.available && t.showOverflowTooltip }, scopedSlots: e._u([{ key: "header", fn: function() {
168
+ return [!e.inputDisabled && t.required ? a("span", { staticStyle: { color: "#f56c6c" } }, [e._v("*")]) : e._e(), e._v(" " + e._s(t.label) + " ")];
169
+ }, proxy: !0 }, { key: "default", fn: function({ row: r, column: s, $index: p }) {
170
+ return [e._t("tag", null, { row: r, column: s, index: p }), e._t(t.prop, function() {
171
+ var o;
172
+ return [e.available && e.getCellType(r, t) === "input" ? [a("FormInput", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInput", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "inputPhoneNumber" ? [a("FormInputPhoneNumber", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputPhoneNumber", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "user" ? [t.single ? a("FormInputUser", e._b({ attrs: { name: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { "update:name": function(l) {
173
+ return e.$set(r, s.property, l);
174
+ }, input: (l) => e.onInput(r, l, t) } }, "FormInputUser", e.getInputAttr(r, t), !1)) : a("FormInputUser", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputUser", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "department" ? [t.single ? a("FormInputDepartment", e._b({ attrs: { "ou-type": t.ouType, name: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { "update:name": function(l) {
175
+ return e.$set(r, s.property, l);
176
+ }, input: (l) => e.onInput(r, l, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1)) : a("FormInputDepartment", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "select" ? [a("FormSelect", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, options: t.options, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormSelect", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "datePicker" ? [a("FormDatePicker", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required, start: r[t.start], end: r[t.end] }, on: { "update:start": function(l) {
177
+ return e.$set(r, t.start, l);
178
+ }, "update:end": function(l) {
179
+ return e.$set(r, t.end, l);
180
+ }, input: (l) => e.onInput(r, l, t) } }, "FormDatePicker", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "cascader" ? [a("FormCascader", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required, "label-key": t.labelKey, "value-key": t.valueKey }, on: { input: (l) => e.onInput(r, l, t) } }, "FormCascader", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "checkbox" ? [a("FormCheckboxGroup", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormCheckboxGroup", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "number" ? [a("FormInputNumber", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputNumber", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "textarea" ? [a("FormTextarea", e._b({ attrs: { rows: t.rows || "3", value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormTextarea", e.getInputAttr(r, t), !1))] : t.dicType || (o = t.options) != null && o.length ? [a("DictRender", { attrs: { "dict-type": t.dicType, "id-as-value": t.idAsValue, "label-as-value": t.labelAsValue, column: s, row: r, options: t.options } })] : [e._v(e._s(e.getVal(r, s, t)))]];
181
+ }, { row: r, column: s, index: p })];
182
+ } }], null, !0) }) : t.slot ? e._t("default") : e._e()];
183
+ })];
184
+ }, { columns: e.columns }), e._t("handle", null, { add: e.add, remove: e.remove }), (!e.value || e.value.length < e.limit) && !e.inputDisabled && e.enabled && e.editable && e.handleColumn ? a("TableColumn", { attrs: { label: "操作", fixed: "right", width: "80", align: "center", prop: "menu" }, scopedSlots: e._u([{ key: "header", fn: function({ column: t, $index: r }) {
185
+ return [e._t("handle-column-header", function() {
186
+ return [e._v(" " + e._s(t.label) + " ")];
187
+ }, { column: t, index: r })];
188
+ } }, { key: "default", fn: function({ row: t, $index: r }) {
189
+ return [e.showHandleColumnAddButton && e.value.length < e.maxLimit ? a("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "margin-right": "5px", "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(s) {
190
+ return s.stopPropagation(), e.add(t, r);
191
+ } } }) : e._e(), e.value && e.value.length > 1 || e.allowEmpty ? a("Confirmable", { staticClass: "el-icon-error sub-table-handle-button table-button-remove", attrs: { title: "删除", message: "您确定要删除该行吗?" }, on: { click: function(s) {
192
+ return s.stopPropagation(), e.remove(t, r);
193
+ } } }) : e._e()];
194
+ } }], null, !0) }) : e._e()], 2);
195
+ }, f = [], y = /* @__PURE__ */ b(
196
+ c,
197
+ h,
198
+ f,
199
+ !1,
200
+ null,
201
+ null
202
+ );
203
+ const I = y.exports;
204
+ export {
205
+ I as default
206
+ };
@@ -0,0 +1 @@
1
+ .sub-table.pageable-table.auto-height .el-table{min-height:0}.sub-table .el-form-item{width:100%;margin-bottom:0}.sub-table .el-col{width:100%}.sub-table .table-header{background-color:#f3f5fb;border:1px solid #dfe6ec;border-bottom:none;padding:2px 10px}.sub-table .table-header-button:hover,.sub-table .table-header-button:focus{color:#595959}.sub-table .table-header-button i+span{margin-left:0}.sub-table .table-header-button i{font-size:15px}.sub-table .table-header-button.add i{color:#4886ec}.sub-table .table-header-button.remove i{color:#e34e55}.sub-table .table-header-button.refresh i{color:#1eb91e}.sub-table .table-button-add{color:#5add7a;opacity:.8}.sub-table .table-button-add:hover{opacity:1}.sub-table .table-button-remove{color:#ddd}.sub-table .table-button-remove:hover{color:#ef6666}.sub-table .el-table__header-wrapper .el-table__header th{background-color:#f3f5fb;padding:5px 0}.sub-table .el-table{border-top-color:#dde1e5}.sub-table .el-table td{border-color:#dfe6ec}.sub-table .el-col{padding:0!important}.sub-table .row-indicator{border:6px solid #0000;border-bottom-color:#f5690c;width:0;height:0;display:inline-block;position:absolute;top:-6px;right:-6px;transform:rotate(45deg)}.sub-table .sub-table-handle-button{cursor:pointer;font-size:20px}.sub-table .sub-table-handle-button+.sub-table-handle-button{margin-left:5px}.sub-table .el-table .el-table__header th{line-height:inherit;padding:5px 0;background:#f3f5fb!important}
@@ -0,0 +1,231 @@
1
+ import { findTreeChildren as i, isFunction as c } from "@web-utils/core";
2
+ import { cloneDeep as b } from "@web-utils/integrations/lodash";
3
+ import { S as h } from "../chunks/sub-table-plus-props.BVsD71hT.mjs";
4
+ import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const y = {
6
+ name: "SubTablePlus",
7
+ mixins: [h],
8
+ inject: {
9
+ elForm: {
10
+ default: ""
11
+ },
12
+ elFormItem: {
13
+ default: ""
14
+ }
15
+ },
16
+ props: {
17
+ onRowDbClick: Function,
18
+ showMessage: Boolean,
19
+ pageSize: Number
20
+ },
21
+ data() {
22
+ return {
23
+ rows: [],
24
+ selectedRows: []
25
+ };
26
+ },
27
+ computed: {
28
+ enabled() {
29
+ return !this.inputDisabled;
30
+ },
31
+ hasToolBarMenu() {
32
+ var s;
33
+ return (s = this.toolbarMenus) == null ? void 0 : s.length;
34
+ },
35
+ hasHandleMenus() {
36
+ var s;
37
+ return (s = this.handleMenus) == null ? void 0 : s.length;
38
+ },
39
+ rowProps() {
40
+ const s = {};
41
+ return this.columns && this.columns.map((e) => e.prop).forEach((e) => {
42
+ s[e] = null;
43
+ }), s;
44
+ },
45
+ inputDisabled() {
46
+ return this.disabled || (this.elForm || {}).disabled;
47
+ }
48
+ },
49
+ watch: {
50
+ value: {
51
+ deep: !0,
52
+ immediate: !0,
53
+ handler(s) {
54
+ this.rows = s || [];
55
+ }
56
+ },
57
+ rows: {
58
+ deep: !0,
59
+ immediate: !0,
60
+ handler(s) {
61
+ this.$emit("input", s);
62
+ }
63
+ }
64
+ },
65
+ methods: {
66
+ getCellType(s, e) {
67
+ return c(e.getType) ? e.getType(s, e) : e.type;
68
+ },
69
+ getInputAttr(s, e) {
70
+ return e.attrs && e.getAttrs ? { ...e.attrs, ...e.getAttrs(s) } : e.attrs ? e.attrs : e.getAttrs ? e.getAttrs(s) : {};
71
+ },
72
+ isInputDisabled(s, e) {
73
+ var l;
74
+ return (l = e.isDisabled) == null ? void 0 : l.call(e, s);
75
+ },
76
+ onInput(s, e, l) {
77
+ l.setValue ? l.setValue(s, e, l, this.rows) : l.setVal !== !1 && (s[l.prop] = e);
78
+ },
79
+ onBlur(s, e) {
80
+ e.onBlur && e.onBlur(s, e, this.rows);
81
+ },
82
+ onSelectionChange(s) {
83
+ this.selectedRows = s;
84
+ },
85
+ async remove(s, e) {
86
+ try {
87
+ if (this.delApi)
88
+ try {
89
+ await this.delApi([s.id]), this.$message.success("删除成功!"), this.refresh();
90
+ } catch {
91
+ this.$message.error("删除失败!");
92
+ }
93
+ else
94
+ this.rows.splice(e, 1);
95
+ } catch {
96
+ }
97
+ },
98
+ async add(s, e) {
99
+ var l;
100
+ if (this.fetchApi)
101
+ this.addRow();
102
+ else {
103
+ const o = b(this.rowProps), u = await ((l = this.initRow) == null ? void 0 : l.call(this, o, e));
104
+ e === -1 ? this.rows.push(u || o) : this.rows.splice(e + 1, 0, u || o);
105
+ }
106
+ },
107
+ addRow() {
108
+ this.$emit("add-row");
109
+ },
110
+ async delRow() {
111
+ if (!this.selectedRows.length) {
112
+ this.$message.warning("请选择要删除的记录!");
113
+ return;
114
+ }
115
+ try {
116
+ if (this.delApi)
117
+ try {
118
+ await this.delApi(this.selectedRows.map((s) => s.id)), this.$message.success("删除成功!"), this.refresh();
119
+ } catch {
120
+ this.$message.error("删除失败!");
121
+ }
122
+ else
123
+ this.$emit(
124
+ "input",
125
+ this.rows.filter((s) => !this.selectedRows.includes(s))
126
+ );
127
+ } catch {
128
+ }
129
+ },
130
+ refresh() {
131
+ this.$refs.table.getPage();
132
+ },
133
+ getVal(s, e, l) {
134
+ var o, u;
135
+ if (l.type === "select" && ((o = l.attrs) != null && o.options)) {
136
+ const t = l.attrs.options.find((r) => r.value === s[e.property] || r.code === s[e.property]);
137
+ if (t)
138
+ return t.label || t.name;
139
+ }
140
+ if (l.type === "checkbox1")
141
+ return s[e.property] === !0 || s[e.property] === "1" || s[e.property] === "Y" ? "是" : "否";
142
+ if (l.type === "cascader" && ((u = l.attrs) != null && u.options)) {
143
+ const [t] = i(l.attrs.options, (r) => r[l.attrs.valueKey || "value"] === s[e.property]);
144
+ if (t)
145
+ return t[l.attrs.valueKey || "label"];
146
+ }
147
+ return s[e.property];
148
+ },
149
+ reloadTable() {
150
+ var s;
151
+ (s = this.$refs.table) == null || s.reload();
152
+ },
153
+ async refreshTable() {
154
+ var s;
155
+ await ((s = this.$refs.table) == null ? void 0 : s.getPage());
156
+ },
157
+ removeSelectedRows() {
158
+ this.$emit(
159
+ "input",
160
+ this.value.filter((s) => !this.selectedRows.includes(s))
161
+ );
162
+ },
163
+ rowDbClick(...s) {
164
+ var e;
165
+ (e = this.onRowDbClick) == null || e.call(this, ...s);
166
+ }
167
+ }
168
+ };
169
+ var g = function() {
170
+ var o, u;
171
+ var e = this, l = e._self._c;
172
+ return l("div", { class: ["sub-table-plus", { "hide-message": !e.showMessage }] }, [l("PageableTable", e._g(e._b({ ref: "table", attrs: { "auto-height": "", data: e.fetchApi ? !1 : e.rows, api: e.fetchApi, "payload-style": "body", "show-summary": e.showSummary, descs: e.descs, ascs: e.ascs, "page-size": e.pageSize, "selection-width": e.selectionWidth, "hide-on-single-page": "", selection: e.selection, index: e.index }, on: { "selection-change": e.onSelectionChange }, scopedSlots: e._u([!e.inputDisabled || e.hasToolBarMenu ? { key: "toolbar", fn: function() {
173
+ return [l("div", { staticClass: "table-header flex-row" }, [e._t("toolbar", function() {
174
+ return [l("div", { staticClass: "flex-item" }, [e._t("toolbar-left", function() {
175
+ var t, r, n;
176
+ return [(t = e.toolbarMenus) != null && t.includes("add") ? l("ElButton", { staticClass: "table-header-button add", attrs: { size: "mini", icon: "el-icon-circle-plus", type: "text" }, on: { click: e.addRow } }, [e._v(" 添加 ")]) : e._e(), (r = e.toolbarMenus) != null && r.includes("delete") ? l("ConfirmButton", { staticClass: "table-header-button remove", attrs: { size: "mini", disabled: e.selectedRows.length <= 0, message: "您确定要删除选中的记录吗?", icon: "el-icon-error", type: "text" }, on: { click: e.delRow } }, [e._v(" 删除 ")]) : e._e(), (n = e.toolbarMenus) != null && n.includes("refresh") ? l("ElButton", { staticClass: "table-header-button refresh", attrs: { size: "mini", icon: "el-icon-refresh-left", type: "text", disabled: !1 }, on: { click: e.refresh } }, [e._v(" 刷新 ")]) : e._e()];
177
+ }, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh }), e._t("toolbar-left-append", null, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2), l("div", { staticClass: "flex-not-shrink" }, [e._t("toolbar-right", null, { removeSelectedRows: e.removeSelectedRows, selectedRows: e.selectedRows })], 2)];
178
+ }, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2)];
179
+ }, proxy: !0 } : null, e.bottomAddButton ? { key: "empty", fn: function() {
180
+ return [l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
181
+ var r;
182
+ return t.stopPropagation(), e.add(null, ((r = e.value) == null ? void 0 : r.length) ?? 0);
183
+ } } })];
184
+ }, proxy: !0 } : null], null, !0) }, "PageableTable", e.$attrs, !1), e.$listeners), [e._t("columns", function() {
185
+ return [e._l(e.columns, function(t) {
186
+ return [t.label && !t.hide && !t.slot ? l("TableColumn", { key: `${t.prop}-${e.enabled}${t.type ? `-${t.type}` : ""}${t.required ? `-${t.required}` : ""}`, attrs: { label: t.label, width: t.width, "dict-type": t.dictType, clickable: t.clickable, align: t.align, prop: t.prop, options: t.options, "show-overflow-tooltip": !t.editable && t.showOverflowTooltip }, scopedSlots: e._u([{ key: "header", fn: function() {
187
+ return [!e.inputDisabled && t.required ? l("span", { staticStyle: { color: "#f56c6c" } }, [e._v("*")]) : e._e(), l("span", { attrs: { title: t.label } }, [e._v(e._s(t.label))])];
188
+ }, proxy: !0 }, { key: "default", fn: function({ row: r, column: n, $index: p }) {
189
+ return [e._t("tag", null, { row: r, column: n, index: p }), e._t(t.prop, function() {
190
+ var d;
191
+ return [e.enabled && t.editable === !0 ? [e.getCellType(r, t) === "input" ? [l("FormInput", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { blur: () => e.onBlur(r, t), input: (a) => e.onInput(r, a, t) } }, "FormInput", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "checkbox1" ? [l("FormCheckbox", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCheckbox", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "inputPhoneNumber" ? [l("FormInputPhoneNumber", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputPhoneNumber", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "user" ? [t.single ? l("FormInputUser", e._b({ attrs: { id: r[n.idProp || `${n.property}Id`], "wrap-col": !1, name: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { "update:id": function(a) {
192
+ return e.$set(r, n.idProp || `${n.property}Id`, a);
193
+ }, "update:name": function(a) {
194
+ return e.$set(r, n.property, a);
195
+ }, input: (a) => e.onInput(r, a, t) } }, "FormInputUser", e.getInputAttr(r, t), !1)) : l("FormInputUser", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputUser", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "department" ? [t.single ? l("FormInputDepartment", e._b({ attrs: { "wrap-col": !1, "ou-type": t.ouType, name: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { "update:name": function(a) {
196
+ return e.$set(r, n.property, a);
197
+ }, input: (a) => e.onInput(r, a, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1)) : l("FormInputDepartment", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "select" ? [l("FormSelect", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormSelect", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "datePicker" ? [l("FormDatePicker", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required, start: r[t.start], end: r[t.end] }, on: { "update:start": function(a) {
198
+ return e.$set(r, t.start, a);
199
+ }, "update:end": function(a) {
200
+ return e.$set(r, t.end, a);
201
+ }, input: (a) => e.onInput(r, a, t) } }, "FormDatePicker", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "cascader" ? [l("FormCascader", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required, "label-key": t.labelKey, "value-key": t.valueKey }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCascader", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "checkbox" ? [l("FormCheckboxGroup", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCheckboxGroup", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "number" ? [l("FormInputNumber", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputNumber", e.getInputAttr(r, t), !1))] : e._e()] : t.dictType || (d = t.options) != null && d.length ? [l("DictRender", { attrs: { "dict-type": t.dictType, "id-as-value": t.idAsValue, "label-as-value": t.labelAsValue, column: n, row: r, options: t.options } })] : [e._v(e._s(e.getVal(r, n, t)))]];
202
+ }, { row: r, column: n, wrapCol: !1, index: p, prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required, editable: t.editable })];
203
+ } }], null, !0) }) : t.slot ? e._t(t.slot) : e._e()];
204
+ })];
205
+ }, { columns: e.columns }), e._t("handle", null, { add: e.add, remove: e.remove }), !e.inputDisabled && e.hasHandleMenus ? l("TableColumn", { attrs: { label: "操作", width: "80", align: "center", prop: "menu" }, scopedSlots: e._u([{ key: "header", fn: function({ column: t, $index: r }) {
206
+ return [e._t("handle-column-header", function() {
207
+ return [e._v(" " + e._s(t.label) + " ")];
208
+ }, { column: t, index: r })];
209
+ } }, { key: "default", fn: function({ row: t, $index: r }) {
210
+ var n, p, d;
211
+ return [(n = e.handleMenus) != null && n.includes("add") && ((p = e.value) == null ? void 0 : p.length) < e.limit ? l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "margin-right": "5px", "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(a) {
212
+ return a.stopPropagation(), e.add(t, r);
213
+ } } }) : e._e(), (d = e.handleMenus) != null && d.includes("delete") ? l("Confirmable", { staticClass: "el-icon-error sub-table-handle-button table-button-remove", attrs: { title: "删除", message: "您确定要删除该行吗?" }, on: { click: function(a) {
214
+ return a.stopPropagation(), e.remove(t, r);
215
+ } } }) : e._e()];
216
+ } }], null, !0) }) : e._e()], 2), !e.inputDisabled && e.bottomAddButton && ((o = e.value) == null ? void 0 : o.length) < e.limit && ((u = e.value) == null ? void 0 : u.length) > 0 ? l("div", { staticClass: "flex-row vertical-center horizon-center", staticStyle: { padding: "10px", border: "1px solid #ebeef5", "border-top": "none" } }, [l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
217
+ var r;
218
+ return t.stopPropagation(), e.add(null, ((r = e.value) == null ? void 0 : r.length) ?? 0);
219
+ } } })]) : e._e()], 1);
220
+ }, _ = [], I = /* @__PURE__ */ f(
221
+ y,
222
+ g,
223
+ _,
224
+ !1,
225
+ null,
226
+ null
227
+ );
228
+ const k = I.exports;
229
+ export {
230
+ k as default
231
+ };
@@ -0,0 +1 @@
1
+ .sub-table-plus.hide-message .el-form-item__error{display:none}.sub-table-plus .pageable-table.auto-height .el-table{min-height:0}.sub-table-plus .el-form-item{width:100%;margin-bottom:0}.sub-table-plus .el-col{width:100%}.sub-table-plus .table-header{background-color:#f3f5fb;border:1px solid #dfe6ec;border-bottom:none;padding:2px 10px}.sub-table-plus .table-header-button:hover,.sub-table-plus .table-header-button:focus{color:#595959}.sub-table-plus .table-header-button i+span{margin-left:0}.sub-table-plus .table-header-button i{font-size:15px}.sub-table-plus .table-header-button.add i{color:#4886ec}.sub-table-plus .table-header-button.remove i{color:#e34e55}.sub-table-plus .table-header-button.refresh i{color:#1eb91e}.sub-table-plus .table-button-add{color:#5add7a;opacity:.8}.sub-table-plus .table-button-add:hover{opacity:1}.sub-table-plus .table-button-remove{color:#ddd}.sub-table-plus .table-button-remove:hover{color:#ef6666}.sub-table-plus .el-table__header-wrapper .el-table__header th{background-color:#f3f5fb;padding:5px 0}.sub-table-plus .el-table{border-top-color:#dde1e5}.sub-table-plus .el-table td{border-color:#dfe6ec}.sub-table-plus .el-col{padding:0!important}.sub-table-plus .row-indicator{border:6px solid #0000;border-bottom-color:#f5690c;width:0;height:0;display:inline-block;position:absolute;top:-6px;right:-6px;transform:rotate(45deg)}.sub-table-plus .sub-table-handle-button{cursor:pointer;font-size:20px}.sub-table-plus .sub-table-handle-button+.sub-table-handle-button{margin-left:5px}.sub-table-plus .el-table .el-table__header th{line-height:inherit;padding:5px 0;background:#f3f5fb!important}.sub-table-plus .form-item{padding-top:4px;padding-bottom:4px}
package/swiper/index.mjs CHANGED
@@ -1,27 +1,11 @@
1
- var h = (e, t, s) => new Promise((i, r) => {
2
- var l = (n) => {
3
- try {
4
- a(s.next(n));
5
- } catch (o) {
6
- r(o);
7
- }
8
- }, d = (n) => {
9
- try {
10
- a(s.throw(n));
11
- } catch (o) {
12
- r(o);
13
- }
14
- }, a = (n) => n.done ? i(n.value) : Promise.resolve(n.value).then(l, d);
15
- a((s = s.apply(e, t)).next());
16
- });
17
- import { getEleWidth as c } from "@web-utils/core";
18
- import p from "../resize-observer/index.mjs";
1
+ import { getEleWidth as r } from "@web-utils/core";
2
+ import a from "../resize-observer/index.mjs";
19
3
  import "../resize-observer/style.css";
20
- import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
21
- const f = {
4
+ import { n as o } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const h = {
22
6
  name: "Swiper",
23
7
  components: {
24
- ResizeObserver: p
8
+ ResizeObserver: a
25
9
  },
26
10
  data() {
27
11
  return {
@@ -38,19 +22,15 @@ const f = {
38
22
  }
39
23
  };
40
24
  },
41
- mounted() {
42
- return h(this, null, function* () {
43
- yield this.layout();
44
- });
25
+ async mounted() {
26
+ await this.layout();
45
27
  },
46
28
  updated() {
47
29
  this.computeContentWidth();
48
30
  },
49
31
  methods: {
50
- layout() {
51
- return h(this, null, function* () {
52
- yield this.$nextTick(), this.computeContentWidth(), this.resize();
53
- });
32
+ async layout() {
33
+ await this.$nextTick(), this.computeContentWidth(), this.resize();
54
34
  },
55
35
  resize() {
56
36
  this.swiperBoxWith = this.$refs.swiperBox.offsetWidth;
@@ -59,8 +39,8 @@ const f = {
59
39
  let e = 0;
60
40
  const t = [], { children: s } = this.$refs.swiperContent;
61
41
  Array.prototype.forEach.call(s, (i) => {
62
- const r = c(i);
63
- e += r, t.push(r);
42
+ const n = r(i);
43
+ e += n, t.push(n);
64
44
  }), this.childrenWidth = t, this.swiperContentWidth = e;
65
45
  },
66
46
  updateDuration(e) {
@@ -121,20 +101,20 @@ const f = {
121
101
  }
122
102
  }
123
103
  };
124
- var w = function() {
104
+ var l = function() {
125
105
  var t = this, s = t._self._c;
126
106
  return s("div", { staticClass: "egd-swiper" }, [s("ElButton", { staticClass: "el-carousel__arrow el-carousel__arrow--left", attrs: { disabled: t.reachedLeft, icon: "el-icon-arrow-left" }, on: { click: t.clickLeft } }), s("div", { ref: "swiperBox", staticClass: "egd-swiper-box", on: { wheel: function(i) {
127
107
  return i.stopPropagation(), i.preventDefault(), t.onMouseWheel.apply(null, arguments);
128
108
  } } }, [s("div", { ref: "swiperContent", staticClass: "egd-swiper-content", style: t.swiperContentStyle }, [t._t("default")], 2)]), s("ElButton", { staticClass: "el-carousel__arrow el-carousel__arrow--right", attrs: { disabled: t.reachedRight, icon: "el-icon-arrow-right" }, on: { click: t.clickRight } }), s("ResizeObserver", { on: { notify: t.resize } })], 1);
129
- }, m = [], X = /* @__PURE__ */ u(
130
- f,
131
- w,
132
- m,
109
+ }, d = [], c = /* @__PURE__ */ o(
110
+ h,
111
+ l,
112
+ d,
133
113
  !1,
134
114
  null,
135
115
  null
136
116
  );
137
- const x = X.exports;
117
+ const m = c.exports;
138
118
  export {
139
- x as default
119
+ m as default
140
120
  };
package/swiper/style.css CHANGED
@@ -1 +1 @@
1
- .egd-swiper{height:100%;padding:0 60px;position:relative}.egd-swiper .el-button.el-carousel__arrow{color:#fff;background-color:rgba(31,45,61,.11);border-color:rgba(31,45,61,.01);border-radius:50%;padding:0;font-size:12px}.egd-swiper .el-button.el-carousel__arrow i{cursor:unset}.egd-swiper .el-button.el-carousel__arrow.is-disabled{color:#fff;background-color:rgba(31,45,61,.11);border-color:rgba(31,45,61,.01)}.egd-swiper .egd-swiper-box{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:100%;overflow:hidden}.egd-swiper .egd-swiper-box .egd-swiper-content{flex-flow:row;width:100%;height:100%;padding-top:14px;transition-property:transform;display:flex;overflow:visible;transform:translate(0,0)}
1
+ .egd-swiper{height:100%;padding:0 60px;position:relative}.egd-swiper .el-button.el-carousel__arrow{color:#fff;background-color:#1f2d3d1c;border-color:#1f2d3d03;border-radius:50%;padding:0;font-size:12px}.egd-swiper .el-button.el-carousel__arrow i{cursor:unset}.egd-swiper .el-button.el-carousel__arrow.is-disabled{color:#fff;background-color:#1f2d3d1c;border-color:#1f2d3d03}.egd-swiper .egd-swiper-box{-webkit-user-select:none;user-select:none;height:100%;overflow:hidden}.egd-swiper .egd-swiper-box .egd-swiper-content{flex-flow:row;width:100%;height:100%;padding-top:14px;transition-property:transform;display:flex;overflow:visible;transform:translate(0,0)}
package/tab/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "../chunks/tab-mixin.CVr9bZtn.mjs";
1
+ import { p as n } from "../chunks/tab-mixin.BNK6dxLN.mjs";
2
2
  import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
3
  const s = {
4
4
  name: "Tab",
package/tab/style.css CHANGED
@@ -1 +1 @@
1
- .vux-tab-ink-bar{text-align:center;background-color:#1989fa;height:2px;position:absolute;bottom:0;left:0}.vux-tab-ink-bar-transition-forward{transition:right .3s cubic-bezier(.35,0,.25,1),left .3s cubic-bezier(.35,0,.25,1) 90ms}.vux-tab-ink-bar-transition-backward{transition:right .3s cubic-bezier(.35,0,.25,1) 90ms,left .3s cubic-bezier(.35,0,.25,1)}.vux-tab-bar-top .vux-tab-ink-bar{top:0}.vux-tab{background-color:#fff;height:36px;display:flex;position:relative}.vux-tab button{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:0 0;border:0;outline:0;padding:0}.vux-tab .vux-tab-item{box-sizing:border-box;color:#666;text-align:center;cursor:pointer;flex:auto;width:100%;height:100%;font-size:14px;line-height:36px;display:block}.vux-tab .vux-tab-item.vux-tab-selected{color:#1989fa;border-bottom:3px solid #1989fa}.vux-tab-bar-top .vux-tab .vux-tab-item.vux-tab-selected{border-top:3px solid #1989fa;border-bottom:none}.vux-tab .vux-tab-item.vux-tab-disabled{color:#ddd}.vux-tab.vux-tab-no-animate .vux-tab-item.vux-tab-selected{background:0 0}.vux-tab-bar-inner{background-color:#1989fa;height:100%;margin:auto;transition:width .3s cubic-bezier(.35,0,.25,1);display:block}.vux-tab-item-badge{box-sizing:border-box;vertical-align:middle;background-clip:padding-box;border-radius:30px;min-width:18px;height:18px;margin:auto 0 auto 4px;padding:0 4px;font-size:11px;line-height:18px;display:inline-block;position:absolute;top:0;bottom:0}.vux-tab-wrap{padding-top:36px;position:relative}.vux-tab-container{height:36px;position:absolute;top:0;left:0;right:0;overflow:hidden}.scrollable{box-sizing:content-box;-webkit-overflow-scrolling:touch;padding-bottom:17px;overflow-x:auto;overflow-y:hidden}.scrollable::-webkit-scrollbar{display:none}.scrollable .vux-tab-ink-bar{position:absolute;bottom:17px}.scrollable .vux-tab-item{flex:0 0 22%}
1
+ .vux-tab-ink-bar{text-align:center;background-color:#1989fa;height:2px;position:absolute;bottom:0;left:0}.vux-tab-ink-bar-transition-forward{transition:right .3s cubic-bezier(.35,0,.25,1),left .3s cubic-bezier(.35,0,.25,1) 90ms}.vux-tab-ink-bar-transition-backward{transition:right .3s cubic-bezier(.35,0,.25,1) 90ms,left .3s cubic-bezier(.35,0,.25,1)}.vux-tab-bar-top .vux-tab-ink-bar{top:0}.vux-tab{background-color:#fff;height:36px;display:flex;position:relative}.vux-tab button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;outline:0;padding:0}.vux-tab .vux-tab-item{box-sizing:border-box;color:#666;text-align:center;cursor:pointer;flex:auto;width:100%;height:100%;font-size:14px;line-height:36px;display:block}.vux-tab .vux-tab-item.vux-tab-selected{color:#1989fa;border-bottom:3px solid #1989fa}.vux-tab-bar-top .vux-tab .vux-tab-item.vux-tab-selected{border-top:3px solid #1989fa;border-bottom:none}.vux-tab .vux-tab-item.vux-tab-disabled{color:#ddd}.vux-tab.vux-tab-no-animate .vux-tab-item.vux-tab-selected{background:0 0}.vux-tab-bar-inner{background-color:#1989fa;height:100%;margin:auto;transition:width .3s cubic-bezier(.35,0,.25,1);display:block}.vux-tab-item-badge{box-sizing:border-box;vertical-align:middle;background-clip:padding-box;border-radius:30px;min-width:18px;height:18px;margin:auto 0 auto 4px;padding:0 4px;font-size:11px;line-height:18px;display:inline-block;position:absolute;top:0;bottom:0}.vux-tab-wrap{padding-top:36px;position:relative}.vux-tab-container{height:36px;position:absolute;top:0;left:0;right:0;overflow:hidden}.scrollable{box-sizing:content-box;-webkit-overflow-scrolling:touch;padding-bottom:17px;overflow:auto hidden}.scrollable::-webkit-scrollbar{display:none}.scrollable .vux-tab-ink-bar{position:absolute;bottom:17px}.scrollable .vux-tab-item{flex:0 0 22%}
@@ -1,4 +1,4 @@
1
- import { c as a } from "../chunks/tab-mixin.CVr9bZtn.mjs";
1
+ import { c as a } from "../chunks/tab-mixin.BNK6dxLN.mjs";
2
2
  import { n as r } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
3
  const l = {
4
4
  name: "TabItem",
@@ -39,7 +39,7 @@ var n = function() {
39
39
  "vux-tab-selected": e.currentSelected,
40
40
  "vux-tab-disabled": e.disabled
41
41
  }
42
- ], style: e.style, on: { click: e.onItemClick } }, [e._t("default"), typeof e.badgeLabel != "undefined" && e.badgeLabel !== "" ? t("span", { staticClass: "vux-tab-item-badge", style: {
42
+ ], style: e.style, on: { click: e.onItemClick } }, [e._t("default"), typeof e.badgeLabel < "u" && e.badgeLabel !== "" ? t("span", { staticClass: "vux-tab-item-badge", style: {
43
43
  background: e.badgeBackground,
44
44
  color: e.badgeColor
45
45
  } }, [e._v(" " + e._s(e.badgeLabel) + " ")]) : e._e()], 2);