@lingshugroup/web-plus 1.0.3 → 1.0.5
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/README.md +5 -1
- package/lib/confirm/index.cjs +1 -1
- package/lib/confirm/index.js +8 -7
- package/lib/index/index.cjs +1 -1
- package/lib/index/index.js +55 -54
- package/lib/index/index.js.br +0 -0
- package/lib/index/index.js.gz +0 -0
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/confirm/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/confirm/Index.vue/index.js +83 -5
- package/lib/packages/ls-components/components/confirm/Index.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/confirm/Index.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/confirm/Index.vue/index3.cjs +1 -0
- package/lib/packages/ls-components/components/confirm/Index.vue/index3.js +5 -0
- package/lib/packages/ls-components/components/confirm/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/confirm/types/index.js +11 -5
- package/lib/packages/ls-components/components/confirm/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/confirm/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/descriptions/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/descriptions/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js +53 -44
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +3 -3
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +101 -78
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index.js +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +109 -101
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/types/index.js +6 -5
- package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index.js +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.js +13 -12
- package/lib/packages/ls-components/components/list/List.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js +30 -29
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/menu/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/menu/types/index.js +2 -1
- package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
- package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index2.js +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/table/Table.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +188 -183
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
- package/lib/packages/ls-components/components/confirm/Index.vue/index2.cjs +0 -1
- package/lib/packages/ls-components/components/confirm/Index.vue/index2.js +0 -89
- package/lib/packages/ls-components/components/confirm/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/confirm/Index.vue/index2.js.gz +0 -0
|
@@ -22,17 +22,17 @@ var S = (I, B) => ie(I, "name", { value: B, configurable: !0 });
|
|
|
22
22
|
/* empty css */
|
|
23
23
|
/* empty css */
|
|
24
24
|
/* empty css */
|
|
25
|
-
import { defineComponent as
|
|
26
|
-
import { isEmpty as
|
|
25
|
+
import { defineComponent as _, mergeModels as Y, useModel as pe, ref as M, computed as me, watch as O, resolveComponent as be, renderSlot as V, openBlock as t, createBlock as i, normalizeClass as D, createSlots as G, withCtx as m, createElementBlock as y, Fragment as h, toDisplayString as g, unref as k, createTextVNode as E, createCommentVNode as F, mergeProps as b, toHandlers as v, renderList as T, createVNode as N, createElementVNode as Z } from "vue";
|
|
26
|
+
import { isEmpty as f } from "../../_utils/utils/index.js";
|
|
27
27
|
import { lsFormItemProps as ve } from "../types/index.js";
|
|
28
28
|
import fe from "../../../../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min/index.js";
|
|
29
|
-
import
|
|
29
|
+
import $ from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get/index.js";
|
|
30
30
|
import ye from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqual/index.js";
|
|
31
|
-
import
|
|
32
|
-
import { ElIcon as
|
|
33
|
-
import { ElTooltip as
|
|
34
|
-
import { ElText as
|
|
35
|
-
import { ElInput as
|
|
31
|
+
import c from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set/index.js";
|
|
32
|
+
import { ElIcon as ke } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/icon/index/index.js";
|
|
33
|
+
import { ElTooltip as $e } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/tooltip/index/index.js";
|
|
34
|
+
import { ElText as Ve } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/text/index/index.js";
|
|
35
|
+
import { ElInput as ge } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/input/index/index.js";
|
|
36
36
|
import { ElInputNumber as he } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/input-number/index/index.js";
|
|
37
37
|
import { ElRadio as Ee, ElRadioButton as Ce, ElRadioGroup as Pe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/radio/index/index.js";
|
|
38
38
|
import { ElCheckbox as Ue, ElCheckboxGroup as Re } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/checkbox/index/index.js";
|
|
@@ -45,32 +45,32 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
45
45
|
key: 1,
|
|
46
46
|
class: "ls-read-text-container"
|
|
47
47
|
}, Te = { key: 0 }, Be = {
|
|
48
|
-
key:
|
|
48
|
+
key: 12,
|
|
49
49
|
class: "ls-input-range"
|
|
50
50
|
}, Le = {
|
|
51
|
-
key:
|
|
51
|
+
key: 13,
|
|
52
52
|
class: "ls-input-range"
|
|
53
|
-
}, je =
|
|
53
|
+
}, je = _({
|
|
54
54
|
name: "LSFormItem"
|
|
55
|
-
}), Sl = /* @__PURE__ */
|
|
55
|
+
}), Sl = /* @__PURE__ */ _({
|
|
56
56
|
...je,
|
|
57
|
-
props: /* @__PURE__ */
|
|
57
|
+
props: /* @__PURE__ */ Y(ve, {
|
|
58
58
|
modelValue: {},
|
|
59
59
|
modelModifiers: {}
|
|
60
60
|
}),
|
|
61
|
-
emits: /* @__PURE__ */
|
|
62
|
-
setup(I, { expose: B, emit:
|
|
63
|
-
const a = I, W =
|
|
61
|
+
emits: /* @__PURE__ */ Y(["update:value", "onChange"], ["update:modelValue"]),
|
|
62
|
+
setup(I, { expose: B, emit: x }) {
|
|
63
|
+
const a = I, W = x, r = pe(I, "modelValue"), q = M(), ee = me(() => {
|
|
64
64
|
var l;
|
|
65
65
|
let e = {};
|
|
66
66
|
return a.type === "multipleCascader" && (e = {
|
|
67
67
|
...(l = a.attrs) == null ? void 0 : l.props
|
|
68
68
|
}), { ...e, multiple: !0 };
|
|
69
69
|
}), w = M(!1), A = M(!1);
|
|
70
|
-
function
|
|
70
|
+
function le(e) {
|
|
71
71
|
A.value = !1, e && a.options && a.options.length ? r.value = a.options.map((l) => l.value) : r.value = [];
|
|
72
72
|
}
|
|
73
|
-
S(
|
|
73
|
+
S(le, "handleSelectCheckAll");
|
|
74
74
|
const C = M(), P = M();
|
|
75
75
|
O(
|
|
76
76
|
() => a.value,
|
|
@@ -84,7 +84,7 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
84
84
|
), O(
|
|
85
85
|
() => r,
|
|
86
86
|
(e) => {
|
|
87
|
-
["inputRange", "inputNumberRange"].includes(a.type || "") && (C.value =
|
|
87
|
+
["inputRange", "inputNumberRange"].includes(a.type || "") && (C.value = $(e.value, (a == null ? void 0 : a.rangeProps[0]) || "start"), P.value = $(e.value, (a == null ? void 0 : a.rangeProps[1]) || "end")), f(a.prop) || W("update:value", a.prop, e);
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
immediate: !0,
|
|
@@ -93,22 +93,22 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
93
93
|
), O(
|
|
94
94
|
[() => r, () => a.type, () => a.attrs, () => a.options],
|
|
95
95
|
([e, l, s, d]) => {
|
|
96
|
-
if (l === "select" && d && d.length && !
|
|
97
|
-
const u = d.map((
|
|
96
|
+
if (l === "select" && d && d.length && !f(d)) {
|
|
97
|
+
const u = d.map((p) => p.value);
|
|
98
98
|
if (s && s.multiple) {
|
|
99
|
-
if (!
|
|
100
|
-
const
|
|
99
|
+
if (!f(e.value)) {
|
|
100
|
+
const p = [];
|
|
101
101
|
e.value.forEach((n) => {
|
|
102
|
-
u.includes(n) &&
|
|
103
|
-
}), ye(
|
|
102
|
+
u.includes(n) && p.push(n);
|
|
103
|
+
}), ye(p, e.value) || (r.value = p);
|
|
104
104
|
}
|
|
105
|
-
if (
|
|
105
|
+
if (f(e.value))
|
|
106
106
|
w.value = !1, A.value = !1;
|
|
107
107
|
else {
|
|
108
|
-
const
|
|
109
|
-
w.value =
|
|
108
|
+
const p = e.value.length === d.length;
|
|
109
|
+
w.value = p, A.value = !p;
|
|
110
110
|
}
|
|
111
|
-
} else s && s.filterable && s["allow-create"] ? r.value = e.value : !
|
|
111
|
+
} else s && s.filterable && s["allow-create"] ? r.value = e.value : !f(u) && !f(e.value) && (u.includes(e.value) || (r.value = ""));
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
{
|
|
@@ -119,7 +119,7 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
119
119
|
[() => C.value, () => P.value],
|
|
120
120
|
([e, l]) => {
|
|
121
121
|
let s = {};
|
|
122
|
-
s =
|
|
122
|
+
s = c(s, (a == null ? void 0 : a.rangeProps[0]) || "start", e), s = c(s, (a == null ? void 0 : a.rangeProps[1]) || "end", l), r.value = s;
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
deep: !0
|
|
@@ -128,19 +128,19 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
128
128
|
function L(e, l, s) {
|
|
129
129
|
var u;
|
|
130
130
|
let d = a == null ? void 0 : a.labelEmpty;
|
|
131
|
-
return l && !
|
|
131
|
+
return l && !f(e) && (s && Array.isArray(e) ? d = e.map((p) => {
|
|
132
132
|
var n;
|
|
133
|
-
return (n = l.find((U) => U.value ===
|
|
134
|
-
}).join(",") : d = (u = l.find((
|
|
133
|
+
return (n = l.find((U) => U.value === p)) == null ? void 0 : n.label;
|
|
134
|
+
}).join(",") : d = (u = l.find((p) => p.value === e)) == null ? void 0 : u.label), d;
|
|
135
135
|
}
|
|
136
136
|
S(L, "getOptionsLabel");
|
|
137
137
|
function j(e, l, s = 0, d = "") {
|
|
138
138
|
let u = d;
|
|
139
|
-
if (!
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
142
|
-
const n = l.find((U) => U.value ===
|
|
143
|
-
a.attrs && a.attrs.hasOwnProperty("show-all-levels") && a.attrs["show-all-levels"] === !1 ? u = `${n == null ? void 0 : n.label}` : u = `${u ? `${u}/` : ""}${n == null ? void 0 : n.label}`,
|
|
139
|
+
if (!f(e) && !f(l)) {
|
|
140
|
+
const p = e[s];
|
|
141
|
+
if (!f(p)) {
|
|
142
|
+
const n = l.find((U) => U.value === p);
|
|
143
|
+
a.attrs && a.attrs.hasOwnProperty("show-all-levels") && a.attrs["show-all-levels"] === !1 ? u = `${n == null ? void 0 : n.label}` : u = `${u ? `${u}/` : ""}${n == null ? void 0 : n.label}`, f(n == null ? void 0 : n.children) || (u = j(e, n == null ? void 0 : n.children, s + 1, u));
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
return u;
|
|
@@ -148,7 +148,7 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
148
148
|
S(j, "seachCascaderOptions");
|
|
149
149
|
function z(e, l, s) {
|
|
150
150
|
let d = a == null ? void 0 : a.labelEmpty;
|
|
151
|
-
return l && !
|
|
151
|
+
return l && !f(e) && (s ? (d = "", e.forEach((u) => {
|
|
152
152
|
d = `${d ? `${d},` : ""}${j(u, l)}`;
|
|
153
153
|
})) : d = j(e, l)), d;
|
|
154
154
|
}
|
|
@@ -177,7 +177,7 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
177
177
|
case "inputNumberRange":
|
|
178
178
|
return `${C.value || (a == null ? void 0 : a.labelEmpty)} ${a.rangeSeparator} ${P.value || (a == null ? void 0 : a.labelEmpty)}`;
|
|
179
179
|
default:
|
|
180
|
-
return
|
|
180
|
+
return f(l) ? a == null ? void 0 : a.labelEmpty : l;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
S(H, "readValue");
|
|
@@ -187,8 +187,8 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
187
187
|
return S(J, "onChange"), B({
|
|
188
188
|
FormItemRef: q
|
|
189
189
|
}), (e, l) => {
|
|
190
|
-
const s = be("WarningFilled"), d =
|
|
191
|
-
return e.type === "slot" ?
|
|
190
|
+
const s = be("WarningFilled"), d = ke, u = $e, p = Ve, n = ge, U = he, ae = Ee, oe = Ce, re = Pe, K = Ue, te = Re, se = Se, de = Ne, Q = Me, X = Fe, ne = Ie, ue = we;
|
|
191
|
+
return e.type === "slot" ? V(e.$slots, e.prop, { key: 0 }, void 0, !0) : (t(), i(ue, {
|
|
192
192
|
key: 1,
|
|
193
193
|
ref_key: "FormItemRef",
|
|
194
194
|
ref: q,
|
|
@@ -198,29 +198,29 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
198
198
|
class: D(e.className)
|
|
199
199
|
}, G({
|
|
200
200
|
default: m(() => [
|
|
201
|
-
|
|
201
|
+
V(e.$slots, `${e.prop}-prepend`, {}, void 0, !0),
|
|
202
202
|
e.read ? (t(), y(h, { key: 0 }, [
|
|
203
|
-
e.$slots[`${e.prop}-read-slot`] ?
|
|
203
|
+
e.$slots[`${e.prop}-read-slot`] ? V(e.$slots, `${e.prop}-read-slot`, {
|
|
204
204
|
key: 0,
|
|
205
205
|
value: H(e.type)
|
|
206
|
-
}, void 0, !0) : (t(), y("div", Oe,
|
|
206
|
+
}, void 0, !0) : (t(), y("div", Oe, g(H(e.type)), 1))
|
|
207
207
|
], 64)) : (t(), y(h, { key: 1 }, [
|
|
208
208
|
e.type === "label" ? (t(), y("span", Te, [
|
|
209
|
-
|
|
210
|
-
E(
|
|
209
|
+
k(f)(r.value) ? (t(), y(h, { key: 0 }, [
|
|
210
|
+
E(g((a == null ? void 0 : a.labelEmpty) || "--"), 1)
|
|
211
211
|
], 64)) : F("", !0),
|
|
212
|
-
e.labelNumber ? (t(), p
|
|
212
|
+
e.labelNumber ? (t(), i(p, {
|
|
213
213
|
key: 1,
|
|
214
214
|
type: Number(r.value) < 0 ? "danger" : ""
|
|
215
215
|
}, {
|
|
216
216
|
default: m(() => [
|
|
217
|
-
E(
|
|
217
|
+
E(g(r.value), 1)
|
|
218
218
|
]),
|
|
219
219
|
_: 1
|
|
220
220
|
}, 8, ["type"])) : (t(), y(h, { key: 2 }, [
|
|
221
|
-
E(
|
|
221
|
+
E(g(r.value), 1)
|
|
222
222
|
], 64))
|
|
223
|
-
])) : e.type === "input" ? (t(),
|
|
223
|
+
])) : e.type === "input" ? (t(), i(n, b({
|
|
224
224
|
key: 1,
|
|
225
225
|
modelValue: r.value,
|
|
226
226
|
"onUpdate:modelValue": l[0] || (l[0] = (o) => r.value = o),
|
|
@@ -228,36 +228,36 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
228
228
|
clearable: !0,
|
|
229
229
|
placeholder: `请输入${e.label}`,
|
|
230
230
|
disabled: e.disabled
|
|
231
|
-
}, e.attrs,
|
|
231
|
+
}, e.attrs, v(e.listeners || {})), G({ _: 2 }, [
|
|
232
232
|
e.$slots[`${e.prop}-input-prefix`] ? {
|
|
233
233
|
name: "prefix",
|
|
234
234
|
fn: m(() => [
|
|
235
|
-
|
|
235
|
+
V(e.$slots, `${e.prop}-input-prefix`, {}, void 0, !0)
|
|
236
236
|
]),
|
|
237
237
|
key: "0"
|
|
238
238
|
} : void 0,
|
|
239
239
|
e.$slots[`${e.prop}-input-suffix`] ? {
|
|
240
240
|
name: "suffix",
|
|
241
241
|
fn: m(() => [
|
|
242
|
-
|
|
242
|
+
V(e.$slots, `${e.prop}-input-suffix`, {}, void 0, !0)
|
|
243
243
|
]),
|
|
244
244
|
key: "1"
|
|
245
245
|
} : void 0,
|
|
246
246
|
e.$slots[`${e.prop}-input-prepend`] ? {
|
|
247
247
|
name: "prepend",
|
|
248
248
|
fn: m(() => [
|
|
249
|
-
|
|
249
|
+
V(e.$slots, `${e.prop}-input-prepend`, {}, void 0, !0)
|
|
250
250
|
]),
|
|
251
251
|
key: "2"
|
|
252
252
|
} : void 0,
|
|
253
253
|
e.$slots[`${e.prop}-input-append`] ? {
|
|
254
254
|
name: "append",
|
|
255
255
|
fn: m(() => [
|
|
256
|
-
|
|
256
|
+
V(e.$slots, `${e.prop}-input-append`, {}, void 0, !0)
|
|
257
257
|
]),
|
|
258
258
|
key: "3"
|
|
259
259
|
} : void 0
|
|
260
|
-
]), 1040, ["modelValue", "placeholder", "disabled"])) : e.type === "textarea" ? (t(),
|
|
260
|
+
]), 1040, ["modelValue", "placeholder", "disabled"])) : e.type === "textarea" ? (t(), i(n, b({
|
|
261
261
|
key: 2,
|
|
262
262
|
modelValue: r.value,
|
|
263
263
|
"onUpdate:modelValue": l[1] || (l[1] = (o) => r.value = o),
|
|
@@ -268,7 +268,7 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
268
268
|
maxlength: "100",
|
|
269
269
|
placeholder: `请输入${e.label}`,
|
|
270
270
|
disabled: e.disabled
|
|
271
|
-
}, e.attrs,
|
|
271
|
+
}, e.attrs, v(e.listeners || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "number" ? (t(), i(U, b({
|
|
272
272
|
key: 3,
|
|
273
273
|
modelValue: r.value,
|
|
274
274
|
"onUpdate:modelValue": l[2] || (l[2] = (o) => r.value = o),
|
|
@@ -278,44 +278,44 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
278
278
|
min: 0,
|
|
279
279
|
controls: !1,
|
|
280
280
|
disabled: e.disabled
|
|
281
|
-
}, e.attrs,
|
|
281
|
+
}, e.attrs, v(e.listeners || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "radio" ? (t(), i(re, b({
|
|
282
282
|
key: 4,
|
|
283
283
|
modelValue: r.value,
|
|
284
284
|
"onUpdate:modelValue": l[3] || (l[3] = (o) => r.value = o),
|
|
285
285
|
disabled: e.disabled
|
|
286
|
-
}, e.attrs,
|
|
286
|
+
}, e.attrs, v(e.listeners || {}), {
|
|
287
287
|
onChange: l[4] || (l[4] = (o) => J(r.value, e.prop))
|
|
288
288
|
}), {
|
|
289
289
|
default: m(() => [
|
|
290
|
-
e.radioType ? e.radioType === "button" ? (t(!0), y(h, { key: 1 }, T(e.options, (o, R) => (t(),
|
|
290
|
+
e.radioType ? e.radioType === "button" ? (t(!0), y(h, { key: 1 }, T(e.options, (o, R) => (t(), i(oe, {
|
|
291
291
|
key: R,
|
|
292
292
|
value: o.value,
|
|
293
293
|
disabled: o.disabled
|
|
294
294
|
}, {
|
|
295
295
|
default: m(() => [
|
|
296
|
-
E(
|
|
296
|
+
E(g(o.label), 1)
|
|
297
297
|
]),
|
|
298
298
|
_: 2
|
|
299
|
-
}, 1032, ["value", "disabled"]))), 128)) : F("", !0) : (t(!0), y(h, { key: 0 }, T(e.options, (o, R) => (t(),
|
|
299
|
+
}, 1032, ["value", "disabled"]))), 128)) : F("", !0) : (t(!0), y(h, { key: 0 }, T(e.options, (o, R) => (t(), i(ae, {
|
|
300
300
|
key: R,
|
|
301
301
|
value: o.value,
|
|
302
302
|
disabled: o.disabled
|
|
303
303
|
}, {
|
|
304
304
|
default: m(() => [
|
|
305
|
-
E(
|
|
305
|
+
E(g(o.label), 1)
|
|
306
306
|
]),
|
|
307
307
|
_: 2
|
|
308
308
|
}, 1032, ["value", "disabled"]))), 128))
|
|
309
309
|
]),
|
|
310
310
|
_: 1
|
|
311
|
-
}, 16, ["modelValue", "disabled"])) : e.type === "checkbox" ? (t(),
|
|
311
|
+
}, 16, ["modelValue", "disabled"])) : e.type === "checkbox" ? (t(), i(te, b({
|
|
312
312
|
key: 5,
|
|
313
313
|
modelValue: r.value,
|
|
314
314
|
"onUpdate:modelValue": l[5] || (l[5] = (o) => r.value = o),
|
|
315
315
|
disabled: e.disabled
|
|
316
|
-
}, e.attrs,
|
|
316
|
+
}, e.attrs, v(e.listeners || {})), {
|
|
317
317
|
default: m(() => [
|
|
318
|
-
(t(!0), y(h, null, T(e.options, (o, R) => (t(),
|
|
318
|
+
(t(!0), y(h, null, T(e.options, (o, R) => (t(), i(K, {
|
|
319
319
|
key: R,
|
|
320
320
|
value: o.value,
|
|
321
321
|
label: o.label,
|
|
@@ -323,18 +323,18 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
323
323
|
}, null, 8, ["value", "label", "disabled"]))), 128))
|
|
324
324
|
]),
|
|
325
325
|
_: 1
|
|
326
|
-
}, 16, ["modelValue", "disabled"])) : e.type === "select" ? (t(),
|
|
326
|
+
}, 16, ["modelValue", "disabled"])) : e.type === "select" ? (t(), i(de, b({
|
|
327
327
|
key: 6,
|
|
328
328
|
modelValue: r.value,
|
|
329
329
|
"onUpdate:modelValue": l[7] || (l[7] = (o) => r.value = o),
|
|
330
330
|
clearable: !0,
|
|
331
331
|
placeholder: `请选择${e.label}`,
|
|
332
332
|
disabled: e.disabled
|
|
333
|
-
}, e.attrs,
|
|
333
|
+
}, e.attrs, v(e.listeners || {}), {
|
|
334
334
|
onChange: l[8] || (l[8] = (o) => J(r.value, e.prop))
|
|
335
335
|
}), G({
|
|
336
336
|
default: m(() => [
|
|
337
|
-
(t(!0), y(h, null, T(e.options, (o, R) => (t(),
|
|
337
|
+
(t(!0), y(h, null, T(e.options, (o, R) => (t(), i(se, {
|
|
338
338
|
key: `${R}-${o.value}`,
|
|
339
339
|
label: o.label,
|
|
340
340
|
value: o.value,
|
|
@@ -343,14 +343,14 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
343
343
|
]),
|
|
344
344
|
_: 2
|
|
345
345
|
}, [
|
|
346
|
-
e.attrs && e.attrs.multiple &&
|
|
346
|
+
e.attrs && e.attrs.multiple && !k(f)(e.options) ? {
|
|
347
347
|
name: "header",
|
|
348
348
|
fn: m(() => [
|
|
349
349
|
N(K, {
|
|
350
350
|
modelValue: w.value,
|
|
351
351
|
"onUpdate:modelValue": l[6] || (l[6] = (o) => w.value = o),
|
|
352
352
|
indeterminate: A.value,
|
|
353
|
-
onChange:
|
|
353
|
+
onChange: le
|
|
354
354
|
}, {
|
|
355
355
|
default: m(() => [
|
|
356
356
|
E(" 全部 ")
|
|
@@ -360,7 +360,7 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
360
360
|
]),
|
|
361
361
|
key: "0"
|
|
362
362
|
} : void 0
|
|
363
|
-
]), 1040, ["modelValue", "placeholder", "disabled"])) : e.type === "date" ? (t(),
|
|
363
|
+
]), 1040, ["modelValue", "placeholder", "disabled"])) : e.type === "date" ? (t(), i(Q, b({
|
|
364
364
|
key: 7,
|
|
365
365
|
modelValue: r.value,
|
|
366
366
|
"onUpdate:modelValue": l[9] || (l[9] = (o) => r.value = o),
|
|
@@ -368,77 +368,85 @@ const Ae = { class: "ls-form-item-label" }, Oe = {
|
|
|
368
368
|
clearable: !0,
|
|
369
369
|
placeholder: `请选择${e.label}`,
|
|
370
370
|
disabled: e.disabled
|
|
371
|
-
}, e.attrs,
|
|
371
|
+
}, e.attrs, v(e.listeners || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "datetimerange" ? (t(), i(Q, b({
|
|
372
372
|
key: 8,
|
|
373
373
|
modelValue: r.value,
|
|
374
374
|
"onUpdate:modelValue": l[10] || (l[10] = (o) => r.value = o),
|
|
375
|
+
type: "datetimerange",
|
|
375
376
|
clearable: !0,
|
|
376
|
-
placeholder:
|
|
377
|
-
|
|
378
|
-
}, e.attrs,
|
|
377
|
+
"start-placeholder": "开始时间",
|
|
378
|
+
"end-placeholder": "结束时间"
|
|
379
|
+
}, e.attrs, v(e.listeners || {})), null, 16, ["modelValue"])) : e.type === "cascader" ? (t(), i(X, b({
|
|
379
380
|
key: 9,
|
|
380
381
|
modelValue: r.value,
|
|
381
382
|
"onUpdate:modelValue": l[11] || (l[11] = (o) => r.value = o),
|
|
382
383
|
clearable: !0,
|
|
383
384
|
placeholder: `请选择${e.label}`,
|
|
384
385
|
options: e.options
|
|
385
|
-
}, e.attrs,
|
|
386
|
+
}, e.attrs, v(e.listeners || {})), null, 16, ["modelValue", "placeholder", "options"])) : e.type === "multipleCascader" ? (t(), i(X, b({
|
|
386
387
|
key: 10,
|
|
387
388
|
modelValue: r.value,
|
|
388
|
-
"onUpdate:modelValue": l[12] || (l[12] = (o) => r.value = o)
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
"onUpdate:modelValue": l[12] || (l[12] = (o) => r.value = o),
|
|
390
|
+
clearable: !0,
|
|
391
|
+
placeholder: `请选择${e.label}`,
|
|
392
|
+
options: e.options
|
|
393
|
+
}, e.attrs, { props: ee.value }, v(e.listeners || {})), null, 16, ["modelValue", "placeholder", "options", "props"])) : e.type === "switch" ? (t(), i(ne, b({
|
|
394
|
+
key: 11,
|
|
395
|
+
modelValue: r.value,
|
|
396
|
+
"onUpdate:modelValue": l[13] || (l[13] = (o) => r.value = o)
|
|
397
|
+
}, e.attrs, v(e.listeners || {})), null, 16, ["modelValue"])) : e.type === "inputRange" ? (t(), y("div", Be, [
|
|
398
|
+
N(n, b({
|
|
391
399
|
modelValue: C.value,
|
|
392
|
-
"onUpdate:modelValue": l[
|
|
400
|
+
"onUpdate:modelValue": l[14] || (l[14] = (o) => C.value = o),
|
|
393
401
|
modelModifiers: { trim: !0 },
|
|
394
402
|
clearable: !0,
|
|
395
403
|
placeholder: `请输入起始${e.label}`,
|
|
396
404
|
disabled: e.disabled
|
|
397
|
-
}, e.attrs && $
|
|
398
|
-
E(" " +
|
|
399
|
-
N(n,
|
|
405
|
+
}, e.attrs && k($)(e.attrs || {}, e.rangeProps[0] || "start"), v(e.listeners && k($)(e.listeners || {}, e.rangeProps[0] || "start") || {})), null, 16, ["modelValue", "placeholder", "disabled"]),
|
|
406
|
+
E(" " + g(e.rangeSeparator) + " ", 1),
|
|
407
|
+
N(n, b({
|
|
400
408
|
modelValue: P.value,
|
|
401
|
-
"onUpdate:modelValue": l[
|
|
409
|
+
"onUpdate:modelValue": l[15] || (l[15] = (o) => P.value = o),
|
|
402
410
|
modelModifiers: { trim: !0 },
|
|
403
411
|
clearable: !0,
|
|
404
412
|
placeholder: `请输入截止${e.label}`,
|
|
405
413
|
disabled: e.disabled
|
|
406
|
-
}, e.attrs && $
|
|
414
|
+
}, e.attrs && k($)(e.attrs || {}, e.rangeProps[1] || "end"), v(e.listeners && k($)(e.listeners || {}, e.rangeProps[1] || "end") || {})), null, 16, ["modelValue", "placeholder", "disabled"])
|
|
407
415
|
])) : e.type === "inputNumberRange" ? (t(), y("div", Le, [
|
|
408
|
-
N(U,
|
|
416
|
+
N(U, b({
|
|
409
417
|
modelValue: C.value,
|
|
410
|
-
"onUpdate:modelValue": l[
|
|
418
|
+
"onUpdate:modelValue": l[16] || (l[16] = (o) => C.value = o),
|
|
411
419
|
modelModifiers: { trim: !0 },
|
|
412
420
|
clearable: !0,
|
|
413
421
|
placeholder: `请输入起始${e.label}`,
|
|
414
422
|
disabled: e.disabled
|
|
415
|
-
}, e.attrs && $
|
|
416
|
-
E(" " +
|
|
417
|
-
N(U,
|
|
423
|
+
}, e.attrs && k($)(e.attrs || {}, e.rangeProps[0] || "start"), v(e.listeners && k($)(e.listeners || {}, e.rangeProps[0] || "start") || {})), null, 16, ["modelValue", "placeholder", "disabled"]),
|
|
424
|
+
E(" " + g(e.rangeSeparator) + " ", 1),
|
|
425
|
+
N(U, b({
|
|
418
426
|
modelValue: P.value,
|
|
419
|
-
"onUpdate:modelValue": l[
|
|
427
|
+
"onUpdate:modelValue": l[17] || (l[17] = (o) => P.value = o),
|
|
420
428
|
modelModifiers: { trim: !0 },
|
|
421
429
|
clearable: !0,
|
|
422
430
|
placeholder: `请输入截止${e.label}`,
|
|
423
431
|
disabled: e.disabled
|
|
424
|
-
}, e.attrs && $
|
|
425
|
-
])) : e.type === "itemSlot" ?
|
|
426
|
-
key:
|
|
432
|
+
}, e.attrs && k($)(e.attrs || {}, e.rangeProps[1] || "end"), v(e.listeners && k($)(e.listeners || {}, e.rangeProps[1] || "end") || {})), null, 16, ["modelValue", "placeholder", "disabled"])
|
|
433
|
+
])) : e.type === "itemSlot" ? V(e.$slots, `${e.prop}-slot`, {
|
|
434
|
+
key: 14,
|
|
427
435
|
row: { prop: e.prop }
|
|
428
436
|
}, void 0, !0) : F("", !0)
|
|
429
437
|
], 64)),
|
|
430
|
-
|
|
438
|
+
V(e.$slots, `${e.prop}-append`, {}, void 0, !0)
|
|
431
439
|
]),
|
|
432
440
|
_: 2
|
|
433
441
|
}, [
|
|
434
442
|
e.labelClass || e.tooltip ? {
|
|
435
443
|
name: "label",
|
|
436
444
|
fn: m(() => [
|
|
437
|
-
|
|
438
|
-
|
|
445
|
+
Z("div", Ae, [
|
|
446
|
+
Z("span", {
|
|
439
447
|
class: D(e.labelClass)
|
|
440
|
-
},
|
|
441
|
-
e.tooltip ? (t(),
|
|
448
|
+
}, g(e.label), 3),
|
|
449
|
+
e.tooltip ? (t(), i(u, {
|
|
442
450
|
key: 0,
|
|
443
451
|
effect: "dark",
|
|
444
452
|
placement: "top",
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var e=(a,l)=>r(a,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../_utils/runtime/index.cjs"),o=t.buildProps({formData:{type:Object,default:e(()=>({}),"default"),required:!0},formItems:{type:Array,default:e(()=>[],"default"),required:!0},column:{type:Number,default:1},loading:{type:Boolean,default:!1},showBtnLoading:{type:Boolean,default:!0},read:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showButtons:{type:Boolean,default:!0},buttonsClass:{type:String,default:""},showReset:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},confirmClassName:{type:String,default:""},colon:{type:Boolean,default:!
|
|
1
|
+
"use strict";var r=Object.defineProperty;var e=(a,l)=>r(a,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../_utils/runtime/index.cjs"),o=t.buildProps({formData:{type:Object,default:e(()=>({}),"default"),required:!0},formItems:{type:Array,default:e(()=>[],"default"),required:!0},column:{type:Number,default:1},loading:{type:Boolean,default:!1},showBtnLoading:{type:Boolean,default:!0},read:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showButtons:{type:Boolean,default:!0},buttonsClass:{type:String,default:""},showReset:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},confirmClassName:{type:String,default:""},colon:{type:Boolean,default:!1},labelWidth:{type:[String,Number],default:"auto"},labelEmpty:{type:String,default:"--"},hasDefReadStyle:{type:Boolean,default:!1}}),u=t.buildProps({isValue:{type:Boolean,default:!1},value:{type:[String,Number,Boolean,Object,Array]},type:{type:String,values:["label","input","textarea","number","radio","checkbox","select","date","datetimerange","cascader","multipleCascader","switch","inputRange","inputNumberRange","slot","itemSlot"]},label:{type:String,default:""},prop:{type:[String,Array],default:""},rules:{type:Object,default:e(()=>{},"default")},className:{type:String,default:""},labelClass:{type:String,default:""},tooltip:{type:String,default:""},options:{type:Array,default:e(()=>[],"default")},attrs:{type:Object,default:e(()=>{},"default")},listeners:{type:Object,default:e(()=>{},"default")},colon:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},read:{type:Boolean,default:!1},labelEmpty:{type:String,default:"--"},labelNumber:{type:Boolean,default:!1},dateFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},formatReadValue:{type:Function},rangeSeparator:{type:String,default:"~"},rangeProps:{type:Array,default:e(()=>["start","end"],"default")},radioType:{type:String,default:""}});exports.lsFormItemProps=u;exports.lsFormProps=o;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var r = Object.defineProperty;
|
|
2
2
|
var e = (a, l) => r(a, "name", { value: l, configurable: !0 });
|
|
3
3
|
import { buildProps as t } from "../../_utils/runtime/index.js";
|
|
4
|
-
const
|
|
4
|
+
const d = t({
|
|
5
5
|
formData: {
|
|
6
6
|
type: Object,
|
|
7
7
|
default: /* @__PURE__ */ e(() => ({}), "default"),
|
|
@@ -54,7 +54,7 @@ const p = t({
|
|
|
54
54
|
},
|
|
55
55
|
colon: {
|
|
56
56
|
type: Boolean,
|
|
57
|
-
default: !
|
|
57
|
+
default: !1
|
|
58
58
|
},
|
|
59
59
|
labelWidth: {
|
|
60
60
|
type: [String, Number],
|
|
@@ -68,7 +68,7 @@ const p = t({
|
|
|
68
68
|
type: Boolean,
|
|
69
69
|
default: !1
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
71
|
+
}), p = t({
|
|
72
72
|
isValue: {
|
|
73
73
|
type: Boolean,
|
|
74
74
|
default: !1
|
|
@@ -87,6 +87,7 @@ const p = t({
|
|
|
87
87
|
"checkbox",
|
|
88
88
|
"select",
|
|
89
89
|
"date",
|
|
90
|
+
"datetimerange",
|
|
90
91
|
"cascader",
|
|
91
92
|
"multipleCascader",
|
|
92
93
|
"switch",
|
|
@@ -176,6 +177,6 @@ const p = t({
|
|
|
176
177
|
}
|
|
177
178
|
});
|
|
178
179
|
export {
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
p as lsFormItemProps,
|
|
181
|
+
d as lsFormProps
|
|
181
182
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-2bab71b9"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2bab71b9"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Q=Object.defineProperty;var n=(m,h)=>Q(m,"name",{value:h,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),W=,/* empty css */i=require("element-plus"),X=,/* empty css */Y=,/* empty css */Z=,/* empty css */x=,/* empty css */_=,/* empty css */ee=,/* empty css */te=,/* empty css */ae={key:0,class:"animate_fadeIn transition-all-300 ls-list-wrap"},le={class:"flex items-center"},oe=e.defineComponent({name:"LSList"}),ne=e.defineComponent({...oe,props:X.lsListProps,emits:["submitForm"],setup(m,{expose:h,emit:S}){const{jumpRouteCom:p,currentRouter:k}=x.default(),t=m,B=S,{isFirst:C,loading:c,tableData:P,total:g,currentPage:D,handleCurrentPageChange:$,handleSizeChange:q,handleReset:v,loadData:b}=W.default(t.listApi,t.formData,{dealData:t==null?void 0:t.dealData,dealParams:t==null?void 0:t.dealParams});function V(a){B("submitForm",a),t!=null&&t.queryFn?t.queryFn(a):b()}n(V,"submitForm");function N(a){v()}n(N,"resetForm");const w=e.computed(()=>k?k.value.path:"");function R(){t!=null&&t.addFn?t.addFn():p({path:t!=null&&t.addRoutePath?t.addRoutePath:`${w.value}/add`},1)}n(R,"onAdd");function F(a,l){t!=null&&t.tableDetailFn?t.tableDetailFn(l):p({path:`${t!=null&&t.detailRoutePath?t.detailRoutePath:`${w.value}/detail`}/${a}`},1)}n(F,"onDetail");function A(a,l){t!=null&&t.tableEditFn?t.tableEditFn(l):p({path:`${t!=null&&t.editRoutePath?t.editRoutePath:`${w.value}/edit`}/${a}`},1)}n(A,"onEdit");const T=e.ref(void 0),u=e.ref(!1);function L(a,l){if(t.delApi){T.value=a,u.value=!0;let d=a;t!=null&&t.dealDelParams&&(d=t.dealDelParams(l)),t.delApi(d).then(()=>{i.ElMessage.success("删除成功"),b()}).catch(f=>{}).finally(()=>{u.value=!1})}}n(L,"onDel");const E=e.ref(),y=e.ref(!1);function K(a,l,d){E.value=a;const f=n((s,o)=>{if(t.switchApi){y.value=!0;let r=a;t!=null&&t.dealSwitchParams&&(r=t.dealSwitchParams(d)),t.switchApi(r).then(()=>{b(!1),s(!0)}).catch(()=>{o(new Error("Error"))}).finally(()=>{y.value=!1})}else o(new Error("Error"))},"onSwitch");return new Promise((s,o)=>{l?i.ElMessageBox.confirm('<strong class="text-14px">请问是否关闭?</strong>',{confirmButtonText:"确定",cancelButtonText:"取消",dangerouslyUseHTMLString:!0,customStyle:{width:"240px"}}).then(()=>{f(s,o)}).catch(()=>{o(new Error("Error"))}):f(s,o)})}n(K,"switchBeforeChange");function O(a){let l=!1;return t!=null&&t.disabledTableSwitch&&(typeof t.disabledTableSwitch=="boolean"?l=t.disabledTableSwitch:typeof t.disabledTableSwitch=="function"&&(l=t.disabledTableSwitch(a))),!!l}n(O,"disabledTableSwitch");function z(a){let l=!1;return t!=null&&t.showTableDetail&&(typeof t.showTableDetail=="boolean"?l=t.showTableDetail:typeof t.showTableDetail=="function"&&(l=t.showTableDetail(a))),!!l}n(z,"showTableDetail");function M(a){let l=!1;return t!=null&&t.disabledTableDetail&&(typeof t.disabledTableDetail=="boolean"?l=t.disabledTableDetail:typeof t.disabledTableDetail=="function"&&(l=t.disabledTableDetail(a))),!!l}n(M,"disabledTableDetail");function H(a){let l=!1;return t!=null&&t.showTableEdit&&(typeof t.showTableEdit=="boolean"?l=t.showTableEdit:typeof t.showTableEdit=="function"&&(l=t.showTableEdit(a))),!!l}n(H,"showTableEdit");function I(a){let l=!1;return t!=null&&t.disabledTableEdit&&(typeof t.disabledTableEdit=="boolean"?l=t.disabledTableEdit:typeof t.disabledTableEdit=="function"&&(l=t.disabledTableEdit(a))),!!l}n(I,"disabledTableEdit");function U(a){let l=!1;return t!=null&&t.showTableDel&&(typeof t.showTableDel=="boolean"?l=t.showTableDel:typeof t.showTableDel=="function"&&(l=t.showTableDel(a))),!!l}n(U,"showTableDel");function j(a){let l=!1;return t!=null&&t.disabledTableDel&&(typeof t.disabledTableDel=="boolean"?l=t.disabledTableDel:typeof t.disabledTableDel=="function"&&(l=t.disabledTableDel(a))),!!l}n(j,"disabledTableDel");const G=e.h(i.ElDivider,{direction:"vertical"});return h({loadData:b,handleReset:v,isFirst:C,loading:c,total:g,currentPage:D}),(a,l)=>{const d=_.ElTableColumn,f=ee.ElPopconfirm,s=te.ElSkeleton;return e.unref(C)?(e.openBlock(),e.createBlock(s,{key:1,rows:5,animated:""})):(e.openBlock(),e.createElementBlock("div",ae,[a.showForm?(e.openBlock(),e.createBlock(Y.default,e.mergeProps({key:0,class:["mb-6px ls-form-cpo",a.formClass],"label-position":"top","show-btn-loading":!1,colon:!1,inline:!0,"form-data":a.formData,"form-items":a.formItems,loading:e.unref(c),"confirm-text":"查询"},a.formAttrs,{onSubmit:V,onReset:N}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"form-append",{},void 0,!0)]),_:3},16,["class","form-data","form-items","loading"])):e.createCommentVNode("",!0),a.showOperate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.$slots.operate?e.renderSlot(a.$slots,"operate",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.showOperateDivider?(e.openBlock(),e.createBlock(e.unref(i.ElDivider),{key:0,"border-style":"dashed"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["mt-24px flex items-center justify-start",a.operateClass])},[e.renderSlot(a.$slots,"operate-prepend",{},void 0,!0),a.showAdd?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,type:"primary",disabled:e.unref(c),onClick:R},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.addBtnText),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"operate-append",{},void 0,!0)],2)],64))],64)):e.createCommentVNode("",!0),e.createVNode(Z.default,e.mergeProps({class:["ls-table-cpo",[a.showOperate?"mt-16px":"mt-24px"]],"show-overflow-tooltip":!0,loading:e.unref(c),total:e.unref(g),"table-data":e.unref(P),"table-column":a.tableColumn,"current-page":e.unref(D)},a.tableAttrs,e.toHandlers(a.tableListeners||{}),{onSizeChange:e.unref(q),onCurrentPageChange:e.unref($)}),e.createSlots({default:e.withCtx(()=>[a.showTableSwitch?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,prop:a.switchProp,label:"是否开启",width:"100"},a.tableSwitchColumn),{default:e.withCtx(({row:o})=>[e.createVNode(e.unref(i.ElSwitch),{"model-value":o[a.switchProp]?1:0,"active-value":1,"inactive-value":0,loading:e.unref(y)&&o[a.tableRowKey]===e.unref(E),"before-change":n(()=>K(o[a.tableRowKey],o[a.switchProp],o),"before-change"),disabled:O(o)},null,8,["model-value","loading","before-change","disabled"])]),_:1},16,["prop"])):e.createCommentVNode("",!0),a.showTableOperate?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1,fixed:"right",prop:"operate",label:"操作","show-overflow-tooltip":!1},a.tableOperateColumn),{default:e.withCtx(({row:o})=>[e.createElementVNode("div",le,[e.createVNode(e.unref(i.ElSpace),{size:0,spacer:e.unref(G)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"table-operate-prepend",{},void 0,!0),z(o)?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,disabled:M(o),link:"",type:"primary",onClick:n(r=>F(o[a.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(" 查看 ")]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),H(o)?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:1,disabled:I(o),link:"",type:"primary",onClick:n(r=>A(o[a.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 ")]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),U(o)?(e.openBlock(),e.createBlock(f,{key:2,"hide-icon":"",placement:"top",width:"180","confirm-button-text":"确认","cancel-button-text":"取消",title:"是否删除当前列数据?",onConfirm:n(r=>L(o[a.tableRowKey],o),"onConfirm")},{reference:e.withCtx(()=>[e.createVNode(e.unref(i.ElButton),{link:"",type:"danger",disabled:e.unref(u)||j(o),loading:e.unref(u)&&e.unref(T)===o[a.tableRowKey]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)&&e.unref(T)===o[a.tableRowKey]?"":"删除"),1)]),_:2},1032,["disabled","loading"])]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"table-operate-append",{},void 0,!0)]),_:2},1032,["spacer"])])]),_:3},16)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"table-append",{},void 0,!0)]),_:2},[e.renderList(a.$slots,(o,r)=>({name:r,fn:e.withCtx(({row:J})=>[["default","form-append","operate-prepend","operate-append","table-operate-prepend","table-operate-append","table-append"].includes(`${r}`)?e.createCommentVNode("",!0):e.renderSlot(a.$slots,r,{key:0,row:J},void 0,!0)])}))]),1040,["class","loading","total","table-data","table-column","current-page","onSizeChange","onCurrentPageChange"])]))}}});exports.default=ne;
|
|
1
|
+
"use strict";var Q=Object.defineProperty;var n=(m,h)=>Q(m,"name",{value:h,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),W=,/* empty css */i=require("element-plus"),X=,/* empty css */Y=,/* empty css */Z=,/* empty css */x=,/* empty css */_=,/* empty css */ee=,/* empty css */te=,/* empty css */ae={key:0,class:"animate_fadeIn transition-all-300 ls-list-wrap"},le={class:"flex items-center"},oe=e.defineComponent({name:"LSList"}),ne=e.defineComponent({...oe,props:X.lsListProps,emits:["submitForm"],setup(m,{expose:h,emit:S}){const{jumpRouteCom:p,currentRouter:k}=x.default(),t=m,B=S,{isFirst:C,loading:c,tableData:P,total:g,currentPage:D,handleCurrentPageChange:$,handleSizeChange:q,handleReset:v,loadData:b}=W.default(t.listApi,t.formData,{dealData:t==null?void 0:t.dealData,dealParams:t==null?void 0:t.dealParams});function V(a){B("submitForm",a),t!=null&&t.queryFn?t.queryFn(a):b()}n(V,"submitForm");function N(a){v()}n(N,"resetForm");const w=e.computed(()=>k?k.value.path:"");function R(){t!=null&&t.addFn?t.addFn():p({path:t!=null&&t.addRoutePath?t.addRoutePath:`${w.value}/add`},1)}n(R,"onAdd");function F(a,l){t!=null&&t.tableDetailFn?t.tableDetailFn(l):p({path:`${t!=null&&t.detailRoutePath?t.detailRoutePath:`${w.value}/detail`}/${a}`},1)}n(F,"onDetail");function A(a,l){t!=null&&t.tableEditFn?t.tableEditFn(l):p({path:`${t!=null&&t.editRoutePath?t.editRoutePath:`${w.value}/edit`}/${a}`},1)}n(A,"onEdit");const T=e.ref(void 0),u=e.ref(!1);function L(a,l){if(t.delApi){T.value=a,u.value=!0;let d=a;t!=null&&t.dealDelParams&&(d=t.dealDelParams(l)),t.delApi(d).then(()=>{i.ElMessage.success("删除成功"),b()}).catch(f=>{}).finally(()=>{u.value=!1})}}n(L,"onDel");const E=e.ref(),y=e.ref(!1);function K(a,l,d){E.value=a;const f=n((s,o)=>{if(t.switchApi){y.value=!0;let r=a;t!=null&&t.dealSwitchParams&&(r=t.dealSwitchParams(d)),t.switchApi(r).then(()=>{b(!1),s(!0)}).catch(()=>{o(new Error("Error"))}).finally(()=>{y.value=!1})}else o(new Error("Error"))},"onSwitch");return new Promise((s,o)=>{l?i.ElMessageBox.confirm('<strong class="text-14px">请问是否关闭?</strong>',{confirmButtonText:"确定",cancelButtonText:"取消",dangerouslyUseHTMLString:!0,customStyle:{width:"240px"}}).then(()=>{f(s,o)}).catch(()=>{o(new Error("Error"))}):f(s,o)})}n(K,"switchBeforeChange");function O(a){let l=!1;return t!=null&&t.disabledTableSwitch&&(typeof t.disabledTableSwitch=="boolean"?l=t.disabledTableSwitch:typeof t.disabledTableSwitch=="function"&&(l=t.disabledTableSwitch(a))),!!l}n(O,"disabledTableSwitch");function z(a){let l=!1;return t!=null&&t.showTableDetail&&(typeof t.showTableDetail=="boolean"?l=t.showTableDetail:typeof t.showTableDetail=="function"&&(l=t.showTableDetail(a))),!!l}n(z,"showTableDetail");function M(a){let l=!1;return t!=null&&t.disabledTableDetail&&(typeof t.disabledTableDetail=="boolean"?l=t.disabledTableDetail:typeof t.disabledTableDetail=="function"&&(l=t.disabledTableDetail(a))),!!l}n(M,"disabledTableDetail");function H(a){let l=!1;return t!=null&&t.showTableEdit&&(typeof t.showTableEdit=="boolean"?l=t.showTableEdit:typeof t.showTableEdit=="function"&&(l=t.showTableEdit(a))),!!l}n(H,"showTableEdit");function I(a){let l=!1;return t!=null&&t.disabledTableEdit&&(typeof t.disabledTableEdit=="boolean"?l=t.disabledTableEdit:typeof t.disabledTableEdit=="function"&&(l=t.disabledTableEdit(a))),!!l}n(I,"disabledTableEdit");function U(a){let l=!1;return t!=null&&t.showTableDel&&(typeof t.showTableDel=="boolean"?l=t.showTableDel:typeof t.showTableDel=="function"&&(l=t.showTableDel(a))),!!l}n(U,"showTableDel");function j(a){let l=!1;return t!=null&&t.disabledTableDel&&(typeof t.disabledTableDel=="boolean"?l=t.disabledTableDel:typeof t.disabledTableDel=="function"&&(l=t.disabledTableDel(a))),!!l}n(j,"disabledTableDel");const G=e.h(i.ElDivider,{direction:"vertical"});return h({loadData:b,handleReset:v,isFirst:C,loading:c,total:g,currentPage:D}),(a,l)=>{const d=_.ElTableColumn,f=ee.ElPopconfirm,s=te.ElSkeleton;return e.unref(C)?(e.openBlock(),e.createBlock(s,{key:1,rows:5,animated:""})):(e.openBlock(),e.createElementBlock("div",ae,[a.showForm?(e.openBlock(),e.createBlock(Y.default,e.mergeProps({key:0,class:["mb-6px ls-form-cpo",a.formClass],"label-position":"top","show-btn-loading":!1,colon:!1,inline:!0,"form-data":a.formData,"form-items":a.formItems,loading:e.unref(c),"confirm-text":"查询"},a.formAttrs,{onSubmit:V,onReset:N}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"form-append",{},void 0,!0)]),_:3},16,["class","form-data","form-items","loading"])):e.createCommentVNode("",!0),a.showOperate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.$slots.operate?e.renderSlot(a.$slots,"operate",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.showOperateDivider?(e.openBlock(),e.createBlock(e.unref(i.ElDivider),{key:0,"border-style":"dashed"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["mt-24px flex items-center justify-start",a.operateClass])},[e.renderSlot(a.$slots,"operate-prepend",{},void 0,!0),a.showAdd?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,type:"primary",disabled:e.unref(c),onClick:R},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.addBtnText),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"operate-append",{},void 0,!0)],2)],64))],64)):e.createCommentVNode("",!0),e.createVNode(Z.default,e.mergeProps({class:["ls-table-cpo",[a.showOperate?"mt-16px":"mt-24px"]],"show-overflow-tooltip":!0,loading:e.unref(c),total:e.unref(g),"table-data":e.unref(P),"table-column":a.tableColumn,"current-page":e.unref(D)},a.tableAttrs,e.toHandlers(a.tableListeners||{}),{onSizeChange:e.unref(q),onCurrentPageChange:e.unref($)}),e.createSlots({default:e.withCtx(()=>[a.showTableSwitch?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,prop:a.switchProp,label:"是否开启",width:"100"},a.tableSwitchColumn),{default:e.withCtx(({row:o})=>[e.createVNode(e.unref(i.ElSwitch),{class:"ls-list-table__switch","model-value":o[a.switchProp]?1:0,"active-value":1,"inactive-value":0,loading:e.unref(y)&&o[a.tableRowKey]===e.unref(E),"before-change":n(()=>K(o[a.tableRowKey],o[a.switchProp],o),"before-change"),disabled:O(o)},null,8,["model-value","loading","before-change","disabled"])]),_:1},16,["prop"])):e.createCommentVNode("",!0),a.showTableOperate?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1,fixed:"right",prop:"operate",label:"操作","show-overflow-tooltip":!1},a.tableOperateColumn),{default:e.withCtx(({row:o})=>[e.createElementVNode("div",le,[e.createVNode(e.unref(i.ElSpace),{size:0,spacer:e.unref(G)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"table-operate-prepend",{row:o},void 0,!0),z(o)?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,disabled:M(o),link:"",type:"primary",onClick:n(r=>F(o[a.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(" 查看 ")]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),H(o)?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:1,disabled:I(o),link:"",type:"primary",onClick:n(r=>A(o[a.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 ")]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),U(o)?(e.openBlock(),e.createBlock(f,{key:2,"hide-icon":"",placement:"top",width:"180","confirm-button-text":"确认","cancel-button-text":"取消",title:"是否删除当前列数据?",onConfirm:n(r=>L(o[a.tableRowKey],o),"onConfirm")},{reference:e.withCtx(()=>[e.createVNode(e.unref(i.ElButton),{link:"",type:"danger",disabled:e.unref(u)||j(o),loading:e.unref(u)&&e.unref(T)===o[a.tableRowKey]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)&&e.unref(T)===o[a.tableRowKey]?"":"删除"),1)]),_:2},1032,["disabled","loading"])]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"table-operate-append",{row:o},void 0,!0)]),_:2},1032,["spacer"])])]),_:3},16)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"table-append",{},void 0,!0)]),_:2},[e.renderList(a.$slots,(o,r)=>({name:r,fn:e.withCtx(({row:J})=>[["default","form-append","operate-prepend","operate-append","table-operate-prepend","table-operate-append","table-append"].includes(`${r}`)?e.createCommentVNode("",!0):e.renderSlot(a.$slots,r,{key:0,row:J},void 0,!0)])}))]),1040,["class","loading","total","table-data","table-column","current-page","onSizeChange","onCurrentPageChange"])]))}}});exports.default=ne;
|