@lingshugroup/web-plus 1.0.8 → 1.0.10
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/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.4.38_typescript@5.5.4_/node_modules/@vueuse/core/index/index.js +9 -9
- package/lib/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.4.38_typescript@5.5.4_/node_modules/@vueuse/core/index/index.js.br +0 -0
- package/lib/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.4.38_typescript@5.5.4_/node_modules/@vueuse/core/index/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.4.38_typescript@5.5.4_/node_modules/@vueuse/shared/index/index.js +6 -6
- package/lib/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.4.38_typescript@5.5.4_/node_modules/@vueuse/shared/index/index.js.br +0 -0
- package/lib/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.4.38_typescript@5.5.4_/node_modules/@vueuse/shared/index/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/utils/dom/style/index.js +3 -3
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/utils/dom/style/index.js.br +0 -0
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/utils/dom/style/index.js.gz +0 -0
- package/lib/packages/ls-components/components/_directives/auth/index.cjs +1 -1
- package/lib/packages/ls-components/components/_directives/auth/index.js +25 -19
- package/lib/packages/ls-components/components/_directives/auth/index.js.br +0 -0
- package/lib/packages/ls-components/components/_directives/auth/index.js.gz +0 -0
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.cjs +1 -1
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js +31 -26
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.br +0 -0
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.gz +0 -0
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.cjs +1 -1
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js +42 -40
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.br +0 -0
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.gz +0 -0
- package/lib/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index.js +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index2.js +26 -24
- package/lib/packages/ls-components/components/button/Button.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/button/Button.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js +43 -38
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/dialog/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/types/index.js +8 -4
- package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +53 -51
- 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 +2 -2
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +218 -180
- 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/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 +184 -178
- 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/list/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/types/index.js +5 -0
- package/lib/packages/ls-components/components/list/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/list/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js +58 -55
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js.gz +0 -0
- 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 +139 -132
- 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/tree/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/tree/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js +15 -17
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/tree/Index.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 +99 -97
- 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
|
@@ -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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-95b402e2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var q=Object.defineProperty;var s=(t,r)=>q(t,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),B=,/* empty css */g=,/* empty css */n=,/* empty css */w=,/* empty css */y=,/* empty css */N=,/* empty css */P={class:"dialog-footer"},_=e.defineComponent({name:"LSDialog",inheritAttrs:!1,__name:"Index",props:e.mergeModels(g.lsDialogProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(g.lsEmitNames,["update:modelValue"]),setup(t,{emit:r}){const a=t,i=r,C=e.useSlots(),l=e.useModel(t,"modelValue"),v=B.useNamespace("dialog").b(),d=e.ref({width:"50%",closeOnClickModal:!1,closeOnPressEscape:!1,zIndex:2e3,maxHeight:"600px"}),u=e.computed(()=>n.default({txt:"取消"},a.btnCancelConfig)),c=e.computed(()=>n.default({type:"primary",txt:"确定"},a.btnConfirmConfig));function m(){l.value=!1,i("onCancel")}s(m,"handleClose");function h(){i("onConfirm")}return s(h,"handleConfirm"),(o,f)=>{const S=w.ElScrollbar,p=e.resolveComponent("LSButton"),V=y.ElDialog,b=N.vLoading;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(v))},[e.createVNode(V,e.mergeProps({modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=k=>l.value=k)},e.unref(n.default)(e.unref(d),o.$attrs),{"show-close":!o.loading,onClose:m}),e.createSlots({header:e.withCtx(()=>[e.renderSlot(o.$slots,"header",{},void 0,!0)]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(S,e.normalizeProps(e.guardReactiveProps(e.unref(n.default)(e.unref(d),o.$attrs))),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3},16)),[[b,o.contentLoading]])]),_:2},[o.hasFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",P,[e.unref(C).footer?e.renderSlot(o.$slots,"footer",{key:0},void 0,!0):e.createCommentVNode("",!0),o.hasCancelBtn?(e.openBlock(),e.createBlock(p,e.mergeProps({key:1},e.unref(u),{disabled:o.loading,onClick:m}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u).txt),1)]),_:1},16,["disabled"])):e.createCommentVNode("",!0),e.createVNode(p,e.mergeProps(e.unref(c),{loading:o.loading,disabled:o.loading,onClick:h}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).txt),1)]),_:1},16,["loading","disabled"])])]),key:"0"}:void 0]),1040,["modelValue","show-close"])],2)}}});exports.default=_;
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var a = (n, r) => M(n, "name", { value: r, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
|
+
/* empty css */
|
|
4
5
|
/* empty css */
|
|
5
6
|
/* empty css */
|
|
6
7
|
/* empty css */
|
|
7
|
-
import { defineComponent as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import { lsDialogProp as
|
|
10
|
-
import
|
|
11
|
-
import { ElScrollbar as
|
|
12
|
-
import { ElDialog as
|
|
13
|
-
|
|
8
|
+
import { defineComponent as z, mergeModels as b, useSlots as A, useModel as I, ref as O, computed as V, resolveComponent as F, openBlock as i, createElementBlock as H, normalizeClass as R, unref as o, createVNode as k, mergeProps as d, createSlots as T, withCtx as t, renderSlot as m, withDirectives as U, createBlock as B, normalizeProps as j, guardReactiveProps as q, createElementVNode as x, createCommentVNode as S, createTextVNode as y, toDisplayString as E } from "vue";
|
|
9
|
+
import { useNamespace as G } from "../../_hooks/useNamespace/index.js";
|
|
10
|
+
import { lsDialogProp as J, lsEmitNames as K } from "../types/index.js";
|
|
11
|
+
import l from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
12
|
+
import { ElScrollbar as Q } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/scrollbar/index/index.js";
|
|
13
|
+
import { ElDialog as W } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/dialog/index/index.js";
|
|
14
|
+
import { vLoading as X } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/loading/src/directive/index.js";
|
|
15
|
+
const Y = { class: "dialog-footer" }, ue = /* @__PURE__ */ z({
|
|
14
16
|
name: "LSDialog",
|
|
15
17
|
inheritAttrs: !1,
|
|
16
18
|
__name: "Index",
|
|
17
|
-
props: /* @__PURE__ */
|
|
19
|
+
props: /* @__PURE__ */ b(J, {
|
|
18
20
|
modelValue: {
|
|
19
21
|
type: Boolean
|
|
20
22
|
},
|
|
21
23
|
modelModifiers: {}
|
|
22
24
|
}),
|
|
23
|
-
emits: /* @__PURE__ */
|
|
24
|
-
setup(
|
|
25
|
-
const c =
|
|
25
|
+
emits: /* @__PURE__ */ b(K, ["update:modelValue"]),
|
|
26
|
+
setup(n, { emit: r }) {
|
|
27
|
+
const c = n, f = r, N = A(), s = I(n, "modelValue"), _ = G("dialog").b(), u = O({
|
|
26
28
|
width: "50%",
|
|
27
29
|
closeOnClickModal: !1,
|
|
28
30
|
closeOnPressEscape: !1,
|
|
29
|
-
zIndex: 2e3
|
|
30
|
-
|
|
31
|
+
zIndex: 2e3,
|
|
32
|
+
maxHeight: "600px"
|
|
33
|
+
}), p = V(() => l(
|
|
31
34
|
{
|
|
32
35
|
txt: "取消"
|
|
33
36
|
},
|
|
34
37
|
c.btnCancelConfig
|
|
35
|
-
)),
|
|
38
|
+
)), g = V(() => l(
|
|
36
39
|
{
|
|
37
40
|
type: "primary",
|
|
38
41
|
txt: "确定"
|
|
@@ -43,55 +46,57 @@ const K = { class: "dialog-footer" }, ae = /* @__PURE__ */ L({
|
|
|
43
46
|
s.value = !1, f("onCancel");
|
|
44
47
|
}
|
|
45
48
|
a(C, "handleClose");
|
|
46
|
-
function
|
|
49
|
+
function w() {
|
|
47
50
|
f("onConfirm");
|
|
48
51
|
}
|
|
49
|
-
return a(
|
|
50
|
-
const
|
|
51
|
-
return
|
|
52
|
-
class:
|
|
52
|
+
return a(w, "handleConfirm"), (e, v) => {
|
|
53
|
+
const D = Q, h = F("LSButton"), L = W, P = X;
|
|
54
|
+
return i(), H("div", {
|
|
55
|
+
class: R(o(_))
|
|
53
56
|
}, [
|
|
54
|
-
|
|
57
|
+
k(L, d({
|
|
55
58
|
modelValue: s.value,
|
|
56
|
-
"onUpdate:modelValue":
|
|
57
|
-
}, o(
|
|
59
|
+
"onUpdate:modelValue": v[0] || (v[0] = ($) => s.value = $)
|
|
60
|
+
}, o(l)(o(u), e.$attrs), {
|
|
58
61
|
"show-close": !e.loading,
|
|
59
62
|
onClose: C
|
|
60
|
-
}),
|
|
63
|
+
}), T({
|
|
61
64
|
header: t(() => [
|
|
62
|
-
|
|
65
|
+
m(e.$slots, "header", {}, void 0, !0)
|
|
63
66
|
]),
|
|
64
67
|
default: t(() => [
|
|
65
|
-
|
|
68
|
+
U((i(), B(D, j(q(o(l)(o(u), e.$attrs))), {
|
|
66
69
|
default: t(() => [
|
|
67
|
-
|
|
70
|
+
m(e.$slots, "default", {}, void 0, !0)
|
|
68
71
|
]),
|
|
69
72
|
_: 3
|
|
70
|
-
})
|
|
73
|
+
}, 16)), [
|
|
74
|
+
[P, e.contentLoading]
|
|
75
|
+
])
|
|
71
76
|
]),
|
|
72
77
|
_: 2
|
|
73
78
|
}, [
|
|
74
79
|
e.hasFooter ? {
|
|
75
80
|
name: "footer",
|
|
76
81
|
fn: t(() => [
|
|
77
|
-
|
|
78
|
-
o(
|
|
79
|
-
e.hasCancelBtn ? (
|
|
82
|
+
x("div", Y, [
|
|
83
|
+
o(N).footer ? m(e.$slots, "footer", { key: 0 }, void 0, !0) : S("", !0),
|
|
84
|
+
e.hasCancelBtn ? (i(), B(h, d({ key: 1 }, o(p), {
|
|
80
85
|
disabled: e.loading,
|
|
81
86
|
onClick: C
|
|
82
87
|
}), {
|
|
83
88
|
default: t(() => [
|
|
84
|
-
|
|
89
|
+
y(E(o(p).txt), 1)
|
|
85
90
|
]),
|
|
86
91
|
_: 1
|
|
87
|
-
}, 16, ["disabled"])) :
|
|
88
|
-
|
|
92
|
+
}, 16, ["disabled"])) : S("", !0),
|
|
93
|
+
k(h, d(o(g), {
|
|
89
94
|
loading: e.loading,
|
|
90
95
|
disabled: e.loading,
|
|
91
|
-
onClick:
|
|
96
|
+
onClick: w
|
|
92
97
|
}), {
|
|
93
98
|
default: t(() => [
|
|
94
|
-
|
|
99
|
+
y(E(o(g).txt), 1)
|
|
95
100
|
]),
|
|
96
101
|
_: 1
|
|
97
102
|
}, 16, ["loading", "disabled"])
|
|
@@ -105,5 +110,5 @@ const K = { class: "dialog-footer" }, ae = /* @__PURE__ */ L({
|
|
|
105
110
|
}
|
|
106
111
|
});
|
|
107
112
|
export {
|
|
108
|
-
|
|
113
|
+
ue as default
|
|
109
114
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var e=(t,o)=>l(t,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../_utils/runtime/index.cjs"),a=n.buildProps({hasFooter:{type:Boolean,default:!0},hasCancelBtn:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},btnCancelConfig:{type:Object,default:e(()=>({}),"default")},btnConfirmConfig:{type:Object,default:e(()=>({}),"default")}}),i=["onCancel","onConfirm"];exports.lsDialogProp=a;exports.lsEmitNames=i;
|
|
1
|
+
"use strict";var l=Object.defineProperty;var e=(t,o)=>l(t,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../_utils/runtime/index.cjs"),a=n.buildProps({hasFooter:{type:Boolean,default:!0},hasCancelBtn:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},btnCancelConfig:{type:Object,default:e(()=>({}),"default")},btnConfirmConfig:{type:Object,default:e(()=>({}),"default")},contentLoading:{type:Boolean,default:!1}}),i=["onCancel","onConfirm"];exports.lsDialogProp=a;exports.lsEmitNames=i;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var n = Object.defineProperty;
|
|
2
2
|
var e = (o, t) => n(o, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { buildProps as a } from "../../_utils/runtime/index.js";
|
|
4
|
-
const
|
|
4
|
+
const i = a({
|
|
5
5
|
hasFooter: {
|
|
6
6
|
type: Boolean,
|
|
7
7
|
default: !0
|
|
@@ -21,9 +21,13 @@ const r = a({
|
|
|
21
21
|
btnConfirmConfig: {
|
|
22
22
|
type: Object,
|
|
23
23
|
default: /* @__PURE__ */ e(() => ({}), "default")
|
|
24
|
+
},
|
|
25
|
+
contentLoading: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
24
28
|
}
|
|
25
|
-
}),
|
|
29
|
+
}), p = ["onCancel", "onConfirm"];
|
|
26
30
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
i as lsDialogProp,
|
|
32
|
+
p as lsEmitNames
|
|
29
33
|
};
|
|
@@ -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 */r=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 */r=t.default(e.default,[["__scopeId","data-v-f6175fe0"]]);exports.default=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f6175fe0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var N=Object.defineProperty;var
|
|
1
|
+
"use strict";var N=Object.defineProperty;var a=(p,c)=>N(p,"name",{value:c,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 */const e=require("vue"),w=,/* empty css */V=,/* empty css */L=,/* empty css */C=,/* empty css */T=,/* empty css */I=,/* empty css */D=,/* empty css */O=,/* empty css */h=,/* empty css */M=,/* empty css */z={class:"ls-form"},A=e.defineComponent({name:"LSForm"}),U=e.defineComponent({...A,props:V.lsFormProps,emits:["submit","reset","update:form-data","onChange"],setup(p,{expose:c,emit:B}){const q=p,f=B,n=e.useAttrs(),S=e.computed(()=>n&&n.hasOwnProperty("inline")?typeof n.inline=="boolean"&&n.inline===!1?{}:n&&n["label-position"]==="top"?{class:"form-item-buttons "}:{}:n&&n["label-position"]==="top"?{"label-position":"top"}:{label:" "}),s=e.ref(),k=["label","input","textarea","number","radio","checkbox","select","date","datetimerange","cascader","multipleCascader","switch","inputRange","inputNumberRange","slot","itemSlot"];let l=e.reactive({});function $(o){o&&(o.resetFields(),f("reset",l))}a($,"resetForm");async function y(o){o&&await o.validate((t,u)=>{t?f("submit",l):console.warn("error submit!",u)})}a(y,"submitForm");function F(){return new Promise((o,t)=>{if(!s.value)return o(!1);s.value.validate((u,d)=>{u?o(l):(console.warn("error submit!",d),t(d))})})}a(F,"validate");function b(o,t){T.default(l,o,t)}a(b,"updateFormData"),e.watch(()=>q.formData,o=>{l=o||{}},{deep:!0,immediate:!0});function v(o,t){f("onChange",o,t)}return a(v,"onChange"),c({FormRef:s,validate:F,submitForm:y}),(o,t)=>{const u=I.ElCol,d=D.ElRow,g=O.ElButton,E=h.ElFormItem,P=h.ElForm,R=M.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",z,[e.createVNode(R,{locale:e.unref(L.default),"value-on-clear":void 0,"empty-values":[void 0,null]},{default:e.withCtx(()=>[e.createVNode(P,e.mergeProps({ref_key:"FormRef",ref:s,"label-position":"left","require-asterisk-position":"right","label-width":o.labelWidth,"hide-required-asterisk":!!o.read},o.$attrs,{model:e.unref(l),disabled:o.loading||o.disabled,class:[o.read&&o.hasDefReadStyle?"show-label":""]}),{default:e.withCtx(()=>[o.column>1?(e.openBlock(),e.createBlock(d,{key:0,gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formItems,r=>(e.openBlock(),e.createBlock(u,{key:r.prop,span:r.isRow?24:24/o.column},{default:e.withCtx(()=>[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r}},void 0,!0):k.includes(r.type)?(e.openBlock(),e.createBlock(w.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(C.default)(e.unref(l),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,ref_for:!0},r,{"onUpdate:value":b,onOnChange:v}),e.createSlots({_:2},[e.renderList(o.$slots,(_,i)=>({name:i,fn:e.withCtx(m=>[e.renderSlot(o.$slots,i,e.mergeProps({ref_for:!0},m),void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r}},void 0,!0)]),_:2},1032,["span"]))),128))]),_:3})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.formItems,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r}},void 0,!0):k.includes(r.type)?(e.openBlock(),e.createBlock(w.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(C.default)(e.unref(l),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,ref_for:!0},r,{"onUpdate:value":b,onOnChange:v}),e.createSlots({_:2},[e.renderList(o.$slots,(_,i)=>({name:i,fn:e.withCtx(m=>[e.renderSlot(o.$slots,i,e.mergeProps({ref_for:!0},m),void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r}},void 0,!0)],64))),128)),e.renderSlot(o.$slots,"default",{},void 0,!0),o.showButtons?(e.openBlock(),e.createBlock(E,e.mergeProps({key:2},e.unref(S),{class:o.buttonsClass}),{default:e.withCtx(()=>[e.createVNode(g,{type:"primary",class:e.normalizeClass(o.confirmClassName),loading:o.loading&&o.showBtnLoading,onClick:t[0]||(t[0]=r=>y(s.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmText),1)]),_:1},8,["class","loading"]),o.showReset?(e.openBlock(),e.createBlock(g,{key:0,onClick:t[1]||(t[1]=r=>$(s.value))},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})):e.createCommentVNode("",!0)]),_:1},16,["class"])):e.createCommentVNode("",!0)]),_:3},16,["label-width","hide-required-asterisk","model","disabled","class"])]),_:3},8,["locale"])])}}});exports.default=U;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var Y = Object.defineProperty;
|
|
2
|
-
var p = (
|
|
2
|
+
var p = (k, g) => Y(k, "name", { value: g, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -7,7 +7,7 @@ var p = (b, k) => Y(b, "name", { value: k, configurable: !0 });
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { defineComponent as T, useAttrs as j, computed as G, ref as H, reactive as J, watch as K, openBlock as r, createElementBlock as
|
|
10
|
+
import { defineComponent as T, useAttrs as j, computed as G, ref as H, reactive as J, watch as K, openBlock as r, createElementBlock as b, createVNode as C, unref as a, withCtx as l, mergeProps as m, createBlock as d, Fragment as F, renderList as v, renderSlot as i, createSlots as B, normalizeClass as Q, createTextVNode as P, toDisplayString as X, createCommentVNode as I } from "vue";
|
|
11
11
|
import D from "../FormItem.vue/index.js";
|
|
12
12
|
import { lsFormProps as Z } from "../types/index.js";
|
|
13
13
|
import x from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/dist/locale/zh-cn/index.js";
|
|
@@ -17,21 +17,21 @@ import { ElCol as oe } from "../../../../../node_modules/.pnpm/element-plus@2.8.
|
|
|
17
17
|
import { ElRow as te } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/row/index/index.js";
|
|
18
18
|
import { ElButton 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/button/index/index.js";
|
|
19
19
|
import { ElFormItem as le, ElForm as ne } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/form/index/index.js";
|
|
20
|
-
import { ElConfigProvider as
|
|
21
|
-
const
|
|
20
|
+
import { ElConfigProvider as se } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/config-provider/index/index.js";
|
|
21
|
+
const ae = { class: "ls-form" }, ie = T({
|
|
22
22
|
name: "LSForm"
|
|
23
23
|
}), Se = /* @__PURE__ */ T({
|
|
24
24
|
...ie,
|
|
25
25
|
props: Z,
|
|
26
26
|
emits: ["submit", "reset", "update:form-data", "onChange"],
|
|
27
|
-
setup(
|
|
28
|
-
const N =
|
|
27
|
+
setup(k, { expose: g, emit: q }) {
|
|
28
|
+
const N = k, w = q, n = j(), O = G(() => n && n.hasOwnProperty("inline") ? typeof n.inline == "boolean" && n.inline === !1 ? {} : n && n["label-position"] === "top" ? {
|
|
29
29
|
class: "form-item-buttons "
|
|
30
30
|
} : {} : n && n["label-position"] === "top" ? {
|
|
31
31
|
"label-position": "top"
|
|
32
32
|
} : {
|
|
33
33
|
label: " "
|
|
34
|
-
}), u = H(),
|
|
34
|
+
}), u = H(), R = [
|
|
35
35
|
"label",
|
|
36
36
|
"input",
|
|
37
37
|
"textarea",
|
|
@@ -49,56 +49,56 @@ const se = { class: "ls-form" }, ie = T({
|
|
|
49
49
|
"slot",
|
|
50
50
|
"itemSlot"
|
|
51
51
|
];
|
|
52
|
-
let
|
|
52
|
+
let s = J({});
|
|
53
53
|
function V(e) {
|
|
54
|
-
e && (e.resetFields(),
|
|
54
|
+
e && (e.resetFields(), w("reset", s));
|
|
55
55
|
}
|
|
56
56
|
p(V, "resetForm");
|
|
57
|
-
async function
|
|
57
|
+
async function $(e) {
|
|
58
58
|
e && await e.validate((t, f) => {
|
|
59
|
-
t
|
|
59
|
+
t ? w("submit", s) : console.warn("error submit!", f);
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
p(
|
|
62
|
+
p($, "submitForm");
|
|
63
63
|
function z() {
|
|
64
64
|
return new Promise((e, t) => {
|
|
65
65
|
if (!u.value) return e(!1);
|
|
66
|
-
u.value.validate((f,
|
|
67
|
-
f ? e(
|
|
66
|
+
u.value.validate((f, y) => {
|
|
67
|
+
f ? e(s) : (console.warn("error submit!", y), t(y));
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
p(z, "validate");
|
|
72
72
|
function _(e, t) {
|
|
73
|
-
ee(
|
|
73
|
+
ee(s, e, t);
|
|
74
74
|
}
|
|
75
75
|
p(_, "updateFormData"), K(
|
|
76
76
|
() => N.formData,
|
|
77
77
|
(e) => {
|
|
78
|
-
|
|
78
|
+
s = e || {};
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
deep: !0,
|
|
82
82
|
immediate: !0
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function E(e, t) {
|
|
86
|
+
w("onChange", e, t);
|
|
87
87
|
}
|
|
88
|
-
return p(
|
|
88
|
+
return p(E, "onChange"), g({
|
|
89
89
|
FormRef: u,
|
|
90
90
|
validate: z,
|
|
91
|
-
submitForm:
|
|
91
|
+
submitForm: $
|
|
92
92
|
}), (e, t) => {
|
|
93
|
-
const f = oe,
|
|
94
|
-
return r(),
|
|
93
|
+
const f = oe, y = te, S = re, A = le, U = ne, M = se;
|
|
94
|
+
return r(), b("div", ae, [
|
|
95
95
|
C(M, {
|
|
96
|
-
locale:
|
|
96
|
+
locale: a(x),
|
|
97
97
|
"value-on-clear": void 0,
|
|
98
98
|
"empty-values": [void 0, null]
|
|
99
99
|
}, {
|
|
100
100
|
default: l(() => [
|
|
101
|
-
C(U,
|
|
101
|
+
C(U, m({
|
|
102
102
|
ref_key: "FormRef",
|
|
103
103
|
ref: u,
|
|
104
104
|
"label-position": "left",
|
|
@@ -106,93 +106,95 @@ const se = { class: "ls-form" }, ie = T({
|
|
|
106
106
|
"label-width": e.labelWidth,
|
|
107
107
|
"hide-required-asterisk": !!e.read
|
|
108
108
|
}, e.$attrs, {
|
|
109
|
-
model: s
|
|
109
|
+
model: a(s),
|
|
110
110
|
disabled: e.loading || e.disabled,
|
|
111
111
|
class: [e.read && e.hasDefReadStyle ? "show-label" : ""]
|
|
112
112
|
}), {
|
|
113
113
|
default: l(() => [
|
|
114
|
-
e.column > 1 ? (r(),
|
|
114
|
+
e.column > 1 ? (r(), d(y, {
|
|
115
115
|
key: 0,
|
|
116
116
|
gutter: 10
|
|
117
117
|
}, {
|
|
118
118
|
default: l(() => [
|
|
119
|
-
(r(!0),
|
|
119
|
+
(r(!0), b(F, null, v(e.formItems, (o) => (r(), d(f, {
|
|
120
120
|
key: o.prop,
|
|
121
121
|
span: o.isRow ? 24 : 24 / e.column
|
|
122
122
|
}, {
|
|
123
123
|
default: l(() => [
|
|
124
|
-
o.type === "slot" ? i(e.$slots, o.prop, {
|
|
124
|
+
o.type === "slot" ? i(e.$slots, o.prop, {
|
|
125
|
+
key: 0,
|
|
126
|
+
slotRow: { ...o }
|
|
127
|
+
}, void 0, !0) : R.includes(o.type) ? (r(), d(D, m({
|
|
125
128
|
key: 1,
|
|
126
129
|
"is-value": !0,
|
|
127
|
-
value:
|
|
130
|
+
value: a(L)(a(s), o.prop),
|
|
128
131
|
colon: e.colon,
|
|
129
132
|
read: e.read,
|
|
130
133
|
"label-empty": e.labelEmpty,
|
|
131
134
|
ref_for: !0
|
|
132
135
|
}, o, {
|
|
133
136
|
"onUpdate:value": _,
|
|
134
|
-
onOnChange:
|
|
137
|
+
onOnChange: E
|
|
135
138
|
}), B({ _: 2 }, [
|
|
136
|
-
v(e.$slots, (W,
|
|
137
|
-
name:
|
|
138
|
-
fn: l((
|
|
139
|
-
i(e.$slots,
|
|
140
|
-
row: { ...w }
|
|
141
|
-
}, void 0, !0)
|
|
139
|
+
v(e.$slots, (W, c) => ({
|
|
140
|
+
name: c,
|
|
141
|
+
fn: l((h) => [
|
|
142
|
+
i(e.$slots, c, m({ ref_for: !0 }, h), void 0, !0)
|
|
142
143
|
])
|
|
143
144
|
}))
|
|
144
145
|
]), 1040, ["value", "colon", "read", "label-empty"])) : i(e.$slots, o.type, {
|
|
145
146
|
key: 2,
|
|
146
|
-
|
|
147
|
+
slotRow: { ...o }
|
|
147
148
|
}, void 0, !0)
|
|
148
149
|
]),
|
|
149
150
|
_: 2
|
|
150
151
|
}, 1032, ["span"]))), 128))
|
|
151
152
|
]),
|
|
152
153
|
_: 3
|
|
153
|
-
})) : (r(!0),
|
|
154
|
+
})) : (r(!0), b(F, { key: 1 }, v(e.formItems, (o) => (r(), b(F, {
|
|
154
155
|
key: o.prop
|
|
155
156
|
}, [
|
|
156
|
-
o.type === "slot" ? i(e.$slots, o.prop, {
|
|
157
|
+
o.type === "slot" ? i(e.$slots, o.prop, {
|
|
158
|
+
key: 0,
|
|
159
|
+
slotRow: { ...o }
|
|
160
|
+
}, void 0, !0) : R.includes(o.type) ? (r(), d(D, m({
|
|
157
161
|
key: 1,
|
|
158
162
|
"is-value": !0,
|
|
159
|
-
value:
|
|
163
|
+
value: a(L)(a(s), o.prop),
|
|
160
164
|
colon: e.colon,
|
|
161
165
|
read: e.read,
|
|
162
166
|
"label-empty": e.labelEmpty,
|
|
163
167
|
ref_for: !0
|
|
164
168
|
}, o, {
|
|
165
169
|
"onUpdate:value": _,
|
|
166
|
-
onOnChange:
|
|
170
|
+
onOnChange: E
|
|
167
171
|
}), B({ _: 2 }, [
|
|
168
|
-
v(e.$slots, (W,
|
|
169
|
-
name:
|
|
170
|
-
fn: l((
|
|
171
|
-
i(e.$slots,
|
|
172
|
-
row: { ...w }
|
|
173
|
-
}, void 0, !0)
|
|
172
|
+
v(e.$slots, (W, c) => ({
|
|
173
|
+
name: c,
|
|
174
|
+
fn: l((h) => [
|
|
175
|
+
i(e.$slots, c, m({ ref_for: !0 }, h), void 0, !0)
|
|
174
176
|
])
|
|
175
177
|
}))
|
|
176
178
|
]), 1040, ["value", "colon", "read", "label-empty"])) : i(e.$slots, o.type, {
|
|
177
179
|
key: 2,
|
|
178
|
-
|
|
180
|
+
slotRow: { ...o }
|
|
179
181
|
}, void 0, !0)
|
|
180
182
|
], 64))), 128)),
|
|
181
183
|
i(e.$slots, "default", {}, void 0, !0),
|
|
182
|
-
e.showButtons ? (r(),
|
|
184
|
+
e.showButtons ? (r(), d(A, m({ key: 2 }, a(O), { class: e.buttonsClass }), {
|
|
183
185
|
default: l(() => [
|
|
184
186
|
C(S, {
|
|
185
187
|
type: "primary",
|
|
186
188
|
class: Q(e.confirmClassName),
|
|
187
189
|
loading: e.loading && e.showBtnLoading,
|
|
188
|
-
onClick: t[0] || (t[0] = (o) =>
|
|
190
|
+
onClick: t[0] || (t[0] = (o) => $(u.value))
|
|
189
191
|
}, {
|
|
190
192
|
default: l(() => [
|
|
191
193
|
P(X(e.confirmText), 1)
|
|
192
194
|
]),
|
|
193
195
|
_: 1
|
|
194
196
|
}, 8, ["class", "loading"]),
|
|
195
|
-
e.showReset ? (r(),
|
|
197
|
+
e.showReset ? (r(), d(S, {
|
|
196
198
|
key: 0,
|
|
197
199
|
onClick: t[1] || (t[1] = (o) => V(u.value))
|
|
198
200
|
}, {
|
|
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 */;/* empty css */const t=,/* empty css */r=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 */;/* empty css */const t=,/* empty css */r=t.default(e.default,[["__scopeId","data-v-c01dc6dc"]]);exports.default=r;
|
|
@@ -2,7 +2,7 @@ import o from "./index2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
5
|
-
const
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c01dc6dc"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
_ as default
|
|
8
8
|
};
|