@web-utils/component 4.0.15 → 4.0.16
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.
- package/address-input/index.mjs +13 -15
- package/card/index.mjs +18 -20
- package/carousel/index.mjs +10 -12
- package/chat/index.mjs +45 -56
- package/chunk-file-uploader/index.mjs +36 -378
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
- package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
- package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
- package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
- package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
- package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
- package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
- package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
- package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
- package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
- package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
- package/chunks/core.0Exl13Mz.mjs +54 -0
- package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
- package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
- package/chunks/dictionary.DGt59Ir7.mjs +68 -0
- package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
- package/chunks/form-item.LWjePsPa.mjs +233 -0
- package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
- package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
- package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/chunks/utils.DRcxC1Fb.mjs +60 -0
- package/color-picker/index.mjs +22 -101
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-box/index.mjs +12 -15
- package/data-card/index.mjs +10 -12
- package/data-card-text/index.mjs +10 -12
- package/data-display/index.mjs +15 -17
- package/data-icons/index.mjs +13 -16
- package/data-imgtext/index.mjs +15 -18
- package/data-operatext/index.mjs +14 -16
- package/data-panel/index.mjs +13 -16
- package/data-pay/index.mjs +16 -20
- package/data-price/index.mjs +14 -16
- package/data-progress/index.mjs +13 -17
- package/data-rotate/index.mjs +12 -15
- package/data-table-picker/index.mjs +15 -18
- package/data-tabs/index.mjs +12 -15
- package/dialog-form/index.mjs +16 -18
- package/dynamic-table/index.mjs +25 -30
- package/editable-progress/index.mjs +9 -11
- package/editable-tree/index.mjs +52 -56
- package/egd-collapse-item/index.mjs +9 -9
- package/element-dialog/index.mjs +22 -23
- package/element-listeners/style.css +1 -0
- package/element-multi-instance/style.css +1 -0
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +10 -11
- package/flow-designer/index.mjs +699 -1973
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +9 -9
- package/form-block/index.mjs +32 -34
- package/form-cascader/index.mjs +23 -24
- package/form-checkbox/index.mjs +16 -17
- package/form-checkbox-group/index.mjs +20 -23
- package/form-date-picker/index.mjs +18 -20
- package/form-holder/index.mjs +13 -14
- package/form-input/index.mjs +14 -15
- package/form-input-cron-expression/index.mjs +19 -22
- package/form-input-email/index.mjs +15 -16
- package/form-input-id-card/index.mjs +12 -13
- package/form-input-number/index.mjs +16 -17
- package/form-input-phone-number/index.mjs +21 -22
- package/form-input-tag/index.mjs +14 -15
- package/form-input-time/index.mjs +14 -15
- package/form-item/index.mjs +140 -3
- package/form-item-group/index.mjs +28 -31
- package/form-radio-group/index.mjs +27 -28
- package/form-select/index.mjs +21 -23
- package/form-switch/index.mjs +16 -17
- package/form-table/index.mjs +16 -17
- package/form-table-plus/index.mjs +21 -22
- package/form-textarea/index.mjs +15 -16
- package/form-tree-select/index.mjs +14 -15
- package/form-tree-select-multiple/index.mjs +14 -15
- package/form-view/index.mjs +35 -39
- package/fy-array/index.mjs +33 -37
- package/fy-cascader/index.mjs +16 -17
- package/fy-checkbox/index.mjs +11 -13
- package/fy-code/index.mjs +10 -10
- package/fy-curd/index.mjs +1128 -1152
- package/fy-date/index.mjs +10 -11
- package/fy-draggable/index.mjs +9 -10
- package/fy-dynamic/index.mjs +22 -25
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +638 -15
- package/fy-form-design/index.mjs +1307 -1345
- package/fy-from/crud/zh.d.ts +6 -6
- package/fy-input/index.mjs +12 -14
- package/fy-input-color/index.mjs +13 -15
- package/fy-input-icon/index.mjs +20 -23
- package/fy-input-map/index.mjs +28 -31
- package/fy-input-number/index.mjs +9 -10
- package/fy-input-table/index.mjs +18 -22
- package/fy-input-tree/index.mjs +33 -37
- package/fy-progress/index.mjs +9 -10
- package/fy-radio/index.mjs +15 -16
- package/fy-rate/index.mjs +10 -11
- package/fy-select/index.mjs +25 -29
- package/fy-slider/index.mjs +11 -12
- package/fy-switch/index.mjs +9 -10
- package/fy-tabs/index.mjs +15 -17
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +18 -24
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +74 -76
- package/guide-steps/index.mjs +11 -13
- package/iframe-window/index.mjs +9 -10
- package/image-cropper/index.mjs +28 -30
- package/image-preview/index.mjs +12 -14
- package/index.mjs +72 -72
- package/input-number/index.mjs +13 -14
- package/input-number-range/index.mjs +11 -12
- package/license/index.mjs +1 -1
- package/login/index.mjs +21 -26
- package/nav-bar/index.mjs +9 -10
- package/notice/index.mjs +9 -10
- package/package.json +1 -1
- package/page-index/index.mjs +12 -13
- package/page-index-top/index.mjs +23 -28
- package/page-skeleton/index.mjs +14 -14
- package/page-skeleton-new/index.mjs +8 -9
- package/pageable-table/index.mjs +172 -182
- package/pageable-view/index.mjs +15 -16
- package/picker-table-view/index.mjs +49 -58
- package/present-view/index.mjs +35 -39
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +20 -22
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/skeleton-panel/index.mjs +9 -10
- package/split-pane/index.mjs +36 -37
- package/static-pageable-table/index.mjs +11 -13
- package/sub-table/index.mjs +36 -49
- package/sub-table-plus/index.mjs +229 -18
- package/swiper/index.mjs +11 -12
- package/table-column/index.mjs +223 -3
- package/table-view/index.mjs +52 -60
- package/tabs-view/index.mjs +17 -19
- package/tag-render/index.mjs +16 -18
- package/text-ellipsis/index.mjs +9 -10
- package/toolbar/index.mjs +13 -14
- package/toolbar-button/index.mjs +13 -14
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +259 -267
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +21 -24
- package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
- package/chunks/FyForm.DriwCJ7b.mjs +0 -765
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
- package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
- package/chunks/TableColumn.BzivvXMF.mjs +0 -337
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import r from "
|
|
2
|
-
import s from "
|
|
3
|
-
import { chunk as o } from "@web-utils/integrations/lodash";
|
|
4
|
-
import { n } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
1
|
+
import { chunk as r } from "@web-utils/integrations/lodash";
|
|
2
|
+
import { n as s } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
3
|
const i = {
|
|
6
4
|
name: "StaticPageableTable",
|
|
7
5
|
props: {
|
|
@@ -41,26 +39,26 @@ const i = {
|
|
|
41
39
|
},
|
|
42
40
|
methods: {
|
|
43
41
|
fetchData() {
|
|
44
|
-
this.records =
|
|
42
|
+
this.records = r(this.rows, this.page.limit)[this.page.page - 1];
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
45
|
};
|
|
48
|
-
var
|
|
46
|
+
var n = function() {
|
|
49
47
|
var e = this, t = e._self._c;
|
|
50
|
-
return t("div", { staticClass: "static-pageable-table" }, [t(
|
|
48
|
+
return t("div", { staticClass: "static-pageable-table" }, [t("ElTable", e._g(e._b({ attrs: { size: "mini", data: e.records } }, "ElTable", e.$attrs, !1), e.$listeners), [e._t("default", function() {
|
|
51
49
|
return [e._v("请添加表格列")];
|
|
52
|
-
})], 2), t(
|
|
50
|
+
})], 2), t("ElPagination", { attrs: { "current-page": e.page.page, "hide-on-single-page": !0, "page-size": e.page.limit, total: e.page.total, background: "", layout: "total, prev, pager, next" }, on: { "current-change": (a) => {
|
|
53
51
|
e.page.page = a;
|
|
54
52
|
} } })], 1);
|
|
55
|
-
},
|
|
53
|
+
}, o = [], l = /* @__PURE__ */ s(
|
|
56
54
|
i,
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
n,
|
|
56
|
+
o,
|
|
59
57
|
!1,
|
|
60
58
|
null,
|
|
61
59
|
null
|
|
62
60
|
);
|
|
63
|
-
const
|
|
61
|
+
const h = l.exports;
|
|
64
62
|
export {
|
|
65
|
-
|
|
63
|
+
h as default
|
|
66
64
|
};
|
package/sub-table/index.mjs
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import d from "
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import h from "../form-checkbox-group/index.mjs";
|
|
6
|
-
import y from "../form-cascader/index.mjs";
|
|
7
|
-
import g from "../form-date-picker/index.mjs";
|
|
8
|
-
import _ from "../form-select/index.mjs";
|
|
9
|
-
import v from "../form-input-phone-number/index.mjs";
|
|
10
|
-
import I from "../form-input/index.mjs";
|
|
11
|
-
import i from "element-ui/lib/button";
|
|
12
|
-
import $ from "../confirm-button/index.mjs";
|
|
13
|
-
import C from "../pageable-table/index.mjs";
|
|
14
|
-
import { findTreeChildren as F, isFunction as A } from "@web-utils/core";
|
|
15
|
-
import { cloneDeep as D } from "@web-utils/integrations/lodash";
|
|
16
|
-
import { n as T } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
17
|
-
const q = {
|
|
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 = {
|
|
18
5
|
name: "SubTable",
|
|
19
6
|
emits: ["add-row"],
|
|
20
7
|
inject: {
|
|
@@ -98,7 +85,7 @@ const q = {
|
|
|
98
85
|
},
|
|
99
86
|
methods: {
|
|
100
87
|
getCellType(n, e) {
|
|
101
|
-
return
|
|
88
|
+
return d(e.getType) ? e.getType(n, e) : e.type;
|
|
102
89
|
},
|
|
103
90
|
getInputAttr(n, e) {
|
|
104
91
|
return { ...e.attrs, ...e.getAttrs ? e.getAttrs(n) : {} };
|
|
@@ -119,7 +106,7 @@ const q = {
|
|
|
119
106
|
}
|
|
120
107
|
},
|
|
121
108
|
add(n, e) {
|
|
122
|
-
const a =
|
|
109
|
+
const a = i(this.rowProps);
|
|
123
110
|
this.rows.splice(e + 1, 0, a);
|
|
124
111
|
},
|
|
125
112
|
addRow() {
|
|
@@ -152,24 +139,24 @@ const q = {
|
|
|
152
139
|
getVal(n, e, a) {
|
|
153
140
|
var t, r;
|
|
154
141
|
if (a.type === "select" && ((t = a.attrs) != null && t.options)) {
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
return
|
|
142
|
+
const s = a.attrs.options.find((p) => p.code === n[e.property]);
|
|
143
|
+
if (s)
|
|
144
|
+
return s.name;
|
|
158
145
|
}
|
|
159
146
|
if (a.type === "cascader" && ((r = a.attrs) != null && r.options)) {
|
|
160
|
-
const [
|
|
161
|
-
if (
|
|
162
|
-
return
|
|
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"];
|
|
163
150
|
}
|
|
164
151
|
return n[e.property];
|
|
165
152
|
}
|
|
166
153
|
}
|
|
167
154
|
};
|
|
168
|
-
var
|
|
155
|
+
var h = function() {
|
|
169
156
|
var e = this, a = e._self._c;
|
|
170
|
-
return a(
|
|
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() {
|
|
171
158
|
return [e.enabled || e.fetchApi ? a("div", { staticClass: "table-header" }, [e._t("toolbar", function() {
|
|
172
|
-
return [e.enabled ? [a(
|
|
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()];
|
|
173
160
|
}, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2) : e._e()];
|
|
174
161
|
}, proxy: !0 }, e.allowEmpty && !e.inputDisabled && e.showEmptyAddButton ? { key: "empty", fn: function() {
|
|
175
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) {
|
|
@@ -177,43 +164,43 @@ var k = function() {
|
|
|
177
164
|
} } })];
|
|
178
165
|
}, proxy: !0 } : null], null, !0) }, "PageableTable", e.$attrs, !1), e.$listeners), [e._t("columns", function() {
|
|
179
166
|
return [e._l(e.columns, function(t) {
|
|
180
|
-
return [t.label && !t.hide && !t.slot ? a(
|
|
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() {
|
|
181
168
|
return [!e.inputDisabled && t.required ? a("span", { staticStyle: { color: "#f56c6c" } }, [e._v("*")]) : e._e(), e._v(" " + e._s(t.label) + " ")];
|
|
182
|
-
}, proxy: !0 }, { key: "default", fn: function({ row: r, column:
|
|
183
|
-
return [e._t("tag", null, { row: r, column:
|
|
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() {
|
|
184
171
|
var o;
|
|
185
|
-
return [e.available && e.getCellType(r, t) === "input" ? [a(
|
|
186
|
-
return e.$set(r,
|
|
187
|
-
}, input: (l) => e.onInput(r, l, t) } }, "FormInputUser", e.getInputAttr(r, t), !1)) : a("FormInputUser", e._b({ attrs: { value: r[
|
|
188
|
-
return e.$set(r,
|
|
189
|
-
}, input: (l) => e.onInput(r, l, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1)) : a("FormInputDepartment", e._b({ attrs: { value: r[
|
|
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) {
|
|
190
177
|
return e.$set(r, t.start, l);
|
|
191
178
|
}, "update:end": function(l) {
|
|
192
179
|
return e.$set(r, t.end, l);
|
|
193
|
-
}, input: (l) => e.onInput(r, l, t) } }, "FormDatePicker", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "cascader" ? [a(
|
|
194
|
-
}, { row: r, column:
|
|
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 })];
|
|
195
182
|
} }], null, !0) }) : t.slot ? e._t("default") : e._e()];
|
|
196
183
|
})];
|
|
197
|
-
}, { 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(
|
|
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 }) {
|
|
198
185
|
return [e._t("handle-column-header", function() {
|
|
199
186
|
return [e._v(" " + e._s(t.label) + " ")];
|
|
200
187
|
}, { column: t, index: r })];
|
|
201
188
|
} }, { key: "default", fn: function({ row: t, $index: r }) {
|
|
202
|
-
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(
|
|
203
|
-
return
|
|
204
|
-
} } }) : e._e(), e.value && e.value.length > 1 || e.allowEmpty ? a(
|
|
205
|
-
return
|
|
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);
|
|
206
193
|
} } }) : e._e()];
|
|
207
194
|
} }], null, !0) }) : e._e()], 2);
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
195
|
+
}, f = [], y = /* @__PURE__ */ b(
|
|
196
|
+
c,
|
|
197
|
+
h,
|
|
198
|
+
f,
|
|
212
199
|
!1,
|
|
213
200
|
null,
|
|
214
201
|
null
|
|
215
202
|
);
|
|
216
|
-
const
|
|
203
|
+
const I = y.exports;
|
|
217
204
|
export {
|
|
218
|
-
|
|
205
|
+
I as default
|
|
219
206
|
};
|
package/sub-table-plus/index.mjs
CHANGED
|
@@ -1,20 +1,231 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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;
|
|
18
229
|
export {
|
|
19
|
-
|
|
230
|
+
k as default
|
|
20
231
|
};
|
package/swiper/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { getEleWidth as r } from "@web-utils/core";
|
|
1
2
|
import a from "../resize-observer/index.mjs";
|
|
2
|
-
import r from "element-ui/lib/button";
|
|
3
|
-
import { getEleWidth as o } from "@web-utils/core";
|
|
4
3
|
import "../resize-observer/style.css";
|
|
5
|
-
import { n as
|
|
6
|
-
const
|
|
4
|
+
import { n as o } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const h = {
|
|
7
6
|
name: "Swiper",
|
|
8
7
|
components: {
|
|
9
8
|
ResizeObserver: a
|
|
@@ -40,7 +39,7 @@ const l = {
|
|
|
40
39
|
let e = 0;
|
|
41
40
|
const t = [], { children: s } = this.$refs.swiperContent;
|
|
42
41
|
Array.prototype.forEach.call(s, (i) => {
|
|
43
|
-
const n =
|
|
42
|
+
const n = r(i);
|
|
44
43
|
e += n, t.push(n);
|
|
45
44
|
}), this.childrenWidth = t, this.swiperContentWidth = e;
|
|
46
45
|
},
|
|
@@ -102,20 +101,20 @@ const l = {
|
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
};
|
|
105
|
-
var
|
|
104
|
+
var l = function() {
|
|
106
105
|
var t = this, s = t._self._c;
|
|
107
|
-
return s("div", { staticClass: "egd-swiper" }, [s(
|
|
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) {
|
|
108
107
|
return i.stopPropagation(), i.preventDefault(), t.onMouseWheel.apply(null, arguments);
|
|
109
|
-
} } }, [s("div", { ref: "swiperContent", staticClass: "egd-swiper-content", style: t.swiperContentStyle }, [t._t("default")], 2)]), s(
|
|
110
|
-
},
|
|
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);
|
|
109
|
+
}, d = [], c = /* @__PURE__ */ o(
|
|
110
|
+
h,
|
|
111
111
|
l,
|
|
112
112
|
d,
|
|
113
|
-
c,
|
|
114
113
|
!1,
|
|
115
114
|
null,
|
|
116
115
|
null
|
|
117
116
|
);
|
|
118
|
-
const
|
|
117
|
+
const m = c.exports;
|
|
119
118
|
export {
|
|
120
|
-
|
|
119
|
+
m as default
|
|
121
120
|
};
|