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