@lingshugroup/web-plus 1.0.3 → 1.0.4
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/packages/ls-components/components/confirm/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/confirm/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/confirm/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/confirm/Index.vue/index2.js +10 -10
- 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
- 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 +1 -1
- 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/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/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-dfae23bb"]]);exports.default=u;
|
|
@@ -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 _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-dfae23bb"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var y=Object.defineProperty;var r=(n,c)=>y(n,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),M=require("../../_hooks/useNamespace/index.cjs"),v=require("element-plus"),f=require("../types/index.cjs"),x=t.defineComponent({name:"LSConfirm"}),_=t.defineComponent({...x,props:t.mergeModels(f.lsConfirmProps,{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(f.emitNames,["update:modelValue"]),setup(n,{emit:c}){const d=M.useNamespace("confirm").b(),e=n,
|
|
1
|
+
"use strict";var y=Object.defineProperty;var r=(n,c)=>y(n,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),M=require("../../_hooks/useNamespace/index.cjs"),v=require("element-plus"),f=require("../types/index.cjs"),x=t.defineComponent({name:"LSConfirm"}),_=t.defineComponent({...x,props:t.mergeModels(f.lsConfirmProps,{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(f.emitNames,["update:modelValue"]),setup(n,{emit:c}){const d=M.useNamespace("confirm").b(),e=n,m=c,s=t.useModel(n,"modelValue"),p=t.ref(),u=t.ref();t.watch(()=>s==null?void 0:s.value,o=>{o&&B()},{immediate:!0,deep:!0});const C=t.computed(()=>e.title),a=t.computed(()=>e.message);t.watch(()=>a.value,o=>{s!=null&&s.value&&o&&g()},{deep:!0});async function g(){const o=document.querySelector(".ls-confirm-box .el-message-box__message p");o&&(e.useHtml?o.innerHTML=a.value:o.textContent=a.value)}r(g,"updateMessage");function B(){v.ElMessageBox({title:C,message:a.value,confirmButtonText:e.confirmBtnTxt,cancelButtonText:e.cancelBtnTxt,type:e.type,center:e.center,draggable:e.draggable,dangerouslyUseHTMLString:e.useHtml,showCancelButton:e.showCancelBtn,showConfirmButton:e.showConfirmBtn,showClose:e.showClose,customClass:`${e.customClass} ls-confirm-box`,closeOnClickModal:e.closeOnClickModal,closeOnPressEscape:e.closeOnPressEscape,appendTo:e.appendTo,beforeClose:r(async(o,l,i)=>{if(o==="confirm"){if(l.confirmButtonLoading=!0,e.requestApi&&typeof e.requestApi=="function")try{u.value=await e.requestApi(e.requestParams)}catch(h){u.value=h}l.confirmButtonLoading=!1,i()}else l.confirmButtonLoading||i()},"beforeClose")}).then(()=>{s.value=!1,m("onConfirm",u)}).catch(()=>{s.value=!1,m("onCancel")})}return r(B,"initBox"),(o,l)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"lsConfirmRef",ref:p,class:t.normalizeClass(t.unref(d))},null,2))}});exports.default=_;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _ = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
import { defineComponent as C, mergeModels as i, useModel as v, ref as f, watch as p, computed as d, openBlock as w, createElementBlock as T, normalizeClass as
|
|
4
|
-
import { useNamespace as
|
|
2
|
+
var r = (s, l) => _(s, "name", { value: l, configurable: !0 });
|
|
3
|
+
import { defineComponent as C, mergeModels as i, useModel as v, ref as f, watch as p, computed as d, openBlock as w, createElementBlock as T, normalizeClass as q, unref as L } from "vue";
|
|
4
|
+
import { useNamespace as k } from "../../_hooks/useNamespace/index.js";
|
|
5
5
|
import { ElMessageBox as b } from "element-plus";
|
|
6
6
|
import { lsConfirmProps as A, emitNames as E } from "../types/index.js";
|
|
7
7
|
const H = C({
|
|
@@ -15,8 +15,8 @@ const H = C({
|
|
|
15
15
|
modelModifiers: {}
|
|
16
16
|
}),
|
|
17
17
|
emits: /* @__PURE__ */ i(E, ["update:modelValue"]),
|
|
18
|
-
setup(s, { emit:
|
|
19
|
-
const g =
|
|
18
|
+
setup(s, { emit: l }) {
|
|
19
|
+
const g = k("confirm").b(), e = s, m = l, t = v(s, "modelValue"), B = f(), c = f();
|
|
20
20
|
p(
|
|
21
21
|
() => t == null ? void 0 : t.value,
|
|
22
22
|
(o) => {
|
|
@@ -41,7 +41,7 @@ const H = C({
|
|
|
41
41
|
const o = document.querySelector(".ls-confirm-box .el-message-box__message p");
|
|
42
42
|
o && (e.useHtml ? o.innerHTML = n.value : o.textContent = n.value);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
r(h, "updateMessage");
|
|
45
45
|
function y() {
|
|
46
46
|
b({
|
|
47
47
|
title: x,
|
|
@@ -59,11 +59,11 @@ const H = C({
|
|
|
59
59
|
closeOnClickModal: e.closeOnClickModal,
|
|
60
60
|
closeOnPressEscape: e.closeOnPressEscape,
|
|
61
61
|
appendTo: e.appendTo,
|
|
62
|
-
beforeClose: /* @__PURE__ */
|
|
62
|
+
beforeClose: /* @__PURE__ */ r(async (o, a, u) => {
|
|
63
63
|
if (o === "confirm") {
|
|
64
64
|
if (a.confirmButtonLoading = !0, e.requestApi && typeof e.requestApi == "function")
|
|
65
65
|
try {
|
|
66
|
-
c.value = await e.requestApi();
|
|
66
|
+
c.value = await e.requestApi(e.requestParams);
|
|
67
67
|
} catch (M) {
|
|
68
68
|
c.value = M;
|
|
69
69
|
}
|
|
@@ -77,10 +77,10 @@ const H = C({
|
|
|
77
77
|
t.value = !1, m("onCancel");
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return r(y, "initBox"), (o, a) => (w(), T("div", {
|
|
81
81
|
ref_key: "lsConfirmRef",
|
|
82
82
|
ref: B,
|
|
83
|
-
class: L(
|
|
83
|
+
class: q(L(g))
|
|
84
84
|
}, null, 2));
|
|
85
85
|
}
|
|
86
86
|
});
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var a=Object.defineProperty;var e=(t,l)=>a(t,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../_utils/runtime/index.cjs"),o=n.buildProps({title:{type:[String,Object],default:""},type:{type:String,default:""},message:{type:[String,Object,HTMLElement],default:""},confirmBtnTxt:{type:String,default:"确定"},cancelBtnTxt:{type:String,default:"取消"},showCancelBtn:{type:Boolean,default:!0},showConfirmBtn:{type:Boolean,default:!0},center:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},useHtml:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},customClass:{type:String,default:""},closeOnClickModal:{type:Boolean,default:!1},closeOnPressEscape:{type:Boolean,default:!1},appendTo:{type:[String,HTMLElement],default:""},requestApi:{type:[Function,null],default:null},requestParams:{type:Object,default:e(()=>({}),"default")}}),s=["onConfirm","onCancel"];exports.emitNames=s;exports.lsConfirmProps=o;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var e = (t, l) => a(t, "name", { value: l, configurable: !0 });
|
|
3
|
+
import { buildProps as n } from "../../_utils/runtime/index.js";
|
|
4
|
+
const u = n({
|
|
3
5
|
title: {
|
|
4
6
|
type: [String, Object],
|
|
5
7
|
default: ""
|
|
@@ -63,9 +65,13 @@ const l = e({
|
|
|
63
65
|
requestApi: {
|
|
64
66
|
type: [Function, null],
|
|
65
67
|
default: null
|
|
68
|
+
},
|
|
69
|
+
requestParams: {
|
|
70
|
+
type: Object,
|
|
71
|
+
default: /* @__PURE__ */ e(() => ({}), "default")
|
|
66
72
|
}
|
|
67
|
-
}),
|
|
73
|
+
}), f = ["onConfirm", "onCancel"];
|
|
68
74
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
f as emitNames,
|
|
76
|
+
u as lsConfirmProps
|
|
71
77
|
};
|
|
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-3c05be03"]]);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 _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3c05be03"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -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-a02fe28c"]]);exports.default=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a02fe28c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var N=Object.defineProperty;var s=(d,p)=>N(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"),g=,/* empty css */V=,/* empty css */L=,/* empty css */h=,/* empty css */T=,/* empty css */I=,/* empty css */D=,/* empty css */O=,/* empty css */w=,/* 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(d,{expose:p,emit:B}){const q=d,c=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:" "}),a=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(),c("reset",l))}s($,"resetForm");async function y(o){o&&await o.validate((r,u)=>{r&&c("submit",l)})}s(y,"submitForm");function F(){return new Promise((o,r)=>{if(!a.value)return o(!1);a.value.validate((u,f)=>{u?o(l):r(f)})})}s(F,"validate");function v(o,r){T.default(l,o,r)}s(v,"updateFormData"),e.watch(()=>q.formData,o=>{l=o||{}},{deep:!0,immediate:!0});function b(o,r){c("onChange",o,r)}return s(b,"onChange"),p({FormRef:a,validate:F,submitForm:y}),(o,r)=>{const u=I.ElCol,f=D.ElRow,C=O.ElButton,E=w.ElFormItem,P=w.ElForm,_=M.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",z,[e.createVNode(_,{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: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):k.includes(t.type)?(e.openBlock(),e.createBlock(g.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:b}),e.createSlots({_:2},[e.renderList(o.$slots,(R,i)=>({name:i,fn:e.withCtx(({row:m})=>[e.renderSlot(o.$slots,i,{row:{...m}},void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,t.type,{key:2,row:{...t}},void 0,!0)]),_: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):k.includes(t.type)?(e.openBlock(),e.createBlock(g.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:b}),e.createSlots({_:2},[e.renderList(o.$slots,(R,i)=>({name:i,fn:e.withCtx(({row:m})=>[e.renderSlot(o.$slots,i,{row:{...m}},void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,t.type,{key:2,row:{...t}},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(C,{type:"primary",class:e.normalizeClass(o.confirmClassName),loading:o.loading&&o.showBtnLoading,onClick:r[0]||(r[0]=t=>y(a.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmText),1)]),_:1},8,["class","loading"]),o.showReset?(e.openBlock(),e.createBlock(C,{key:0,onClick:r[1]||(r[1]=t=>$(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=U;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Y = Object.defineProperty;
|
|
2
|
+
var p = (b, k) => Y(b, "name", { value: k, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -7,56 +7,73 @@ var m = (b, k) => j(b, "name", { value: k, configurable: !0 });
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { defineComponent 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 c, createVNode as C, unref as s, withCtx as l, mergeProps as y, createBlock as m, 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
|
-
import { lsFormProps as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { ElCol as
|
|
17
|
-
import { ElRow as
|
|
18
|
-
import { ElButton as
|
|
19
|
-
import { ElFormItem as
|
|
20
|
-
import { ElConfigProvider as
|
|
21
|
-
const
|
|
12
|
+
import { lsFormProps as Z } from "../types/index.js";
|
|
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";
|
|
14
|
+
import L from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get/index.js";
|
|
15
|
+
import ee from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set/index.js";
|
|
16
|
+
import { ElCol 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/col/index/index.js";
|
|
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
|
+
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
|
+
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 ae } 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 se = { class: "ls-form" }, ie = T({
|
|
22
22
|
name: "LSForm"
|
|
23
|
-
}),
|
|
24
|
-
...
|
|
25
|
-
props:
|
|
23
|
+
}), Se = /* @__PURE__ */ T({
|
|
24
|
+
...ie,
|
|
25
|
+
props: Z,
|
|
26
26
|
emits: ["submit", "reset", "update:form-data", "onChange"],
|
|
27
27
|
setup(b, { expose: k, emit: q }) {
|
|
28
|
-
const
|
|
28
|
+
const N = b, g = 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
|
-
}),
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
}), u = H(), $ = [
|
|
35
|
+
"label",
|
|
36
|
+
"input",
|
|
37
|
+
"textarea",
|
|
38
|
+
"number",
|
|
39
|
+
"radio",
|
|
40
|
+
"checkbox",
|
|
41
|
+
"select",
|
|
42
|
+
"date",
|
|
43
|
+
"datetimerange",
|
|
44
|
+
"cascader",
|
|
45
|
+
"multipleCascader",
|
|
46
|
+
"switch",
|
|
47
|
+
"inputRange",
|
|
48
|
+
"inputNumberRange",
|
|
49
|
+
"slot",
|
|
50
|
+
"itemSlot"
|
|
51
|
+
];
|
|
52
|
+
let a = J({});
|
|
53
|
+
function V(e) {
|
|
37
54
|
e && (e.resetFields(), g("reset", a));
|
|
38
55
|
}
|
|
39
|
-
|
|
40
|
-
async function
|
|
56
|
+
p(V, "resetForm");
|
|
57
|
+
async function E(e) {
|
|
41
58
|
e && await e.validate((t, f) => {
|
|
42
59
|
t && g("submit", a);
|
|
43
60
|
});
|
|
44
61
|
}
|
|
45
|
-
|
|
46
|
-
function
|
|
62
|
+
p(E, "submitForm");
|
|
63
|
+
function z() {
|
|
47
64
|
return new Promise((e, t) => {
|
|
48
|
-
if (!
|
|
49
|
-
|
|
65
|
+
if (!u.value) return e(!1);
|
|
66
|
+
u.value.validate((f, h) => {
|
|
50
67
|
f ? e(a) : t(h);
|
|
51
68
|
});
|
|
52
69
|
});
|
|
53
70
|
}
|
|
54
|
-
|
|
55
|
-
function
|
|
56
|
-
|
|
71
|
+
p(z, "validate");
|
|
72
|
+
function _(e, t) {
|
|
73
|
+
ee(a, e, t);
|
|
57
74
|
}
|
|
58
|
-
|
|
59
|
-
() =>
|
|
75
|
+
p(_, "updateFormData"), K(
|
|
76
|
+
() => N.formData,
|
|
60
77
|
(e) => {
|
|
61
78
|
a = e || {};
|
|
62
79
|
},
|
|
@@ -65,25 +82,25 @@ const ae = { class: "ls-form" }, se = L({
|
|
|
65
82
|
immediate: !0
|
|
66
83
|
}
|
|
67
84
|
);
|
|
68
|
-
function
|
|
85
|
+
function R(e, t) {
|
|
69
86
|
g("onChange", e, t);
|
|
70
87
|
}
|
|
71
|
-
return
|
|
72
|
-
FormRef:
|
|
73
|
-
validate:
|
|
74
|
-
submitForm:
|
|
88
|
+
return p(R, "onChange"), k({
|
|
89
|
+
FormRef: u,
|
|
90
|
+
validate: z,
|
|
91
|
+
submitForm: E
|
|
75
92
|
}), (e, t) => {
|
|
76
|
-
const f =
|
|
77
|
-
return r(),
|
|
78
|
-
|
|
79
|
-
locale: s(
|
|
93
|
+
const f = oe, h = te, S = re, A = le, U = ne, M = ae;
|
|
94
|
+
return r(), c("div", se, [
|
|
95
|
+
C(M, {
|
|
96
|
+
locale: s(x),
|
|
80
97
|
"value-on-clear": void 0,
|
|
81
98
|
"empty-values": [void 0, null]
|
|
82
99
|
}, {
|
|
83
100
|
default: l(() => [
|
|
84
|
-
|
|
101
|
+
C(U, y({
|
|
85
102
|
ref_key: "FormRef",
|
|
86
|
-
ref:
|
|
103
|
+
ref: u,
|
|
87
104
|
"label-position": "left",
|
|
88
105
|
"require-asterisk-position": "right",
|
|
89
106
|
"label-width": e.labelWidth,
|
|
@@ -94,93 +111,99 @@ const ae = { class: "ls-form" }, se = L({
|
|
|
94
111
|
class: [e.read && e.hasDefReadStyle ? "show-label" : ""]
|
|
95
112
|
}), {
|
|
96
113
|
default: l(() => [
|
|
97
|
-
e.column > 1 ? (r(),
|
|
114
|
+
e.column > 1 ? (r(), m(h, {
|
|
98
115
|
key: 0,
|
|
99
116
|
gutter: 10
|
|
100
117
|
}, {
|
|
101
118
|
default: l(() => [
|
|
102
|
-
(r(!0),
|
|
119
|
+
(r(!0), c(F, null, v(e.formItems, (o) => (r(), m(f, {
|
|
103
120
|
key: o.prop,
|
|
104
121
|
span: o.isRow ? 24 : 24 / e.column
|
|
105
122
|
}, {
|
|
106
123
|
default: l(() => [
|
|
107
|
-
o.type === "slot" ?
|
|
124
|
+
o.type === "slot" ? i(e.$slots, o.prop, { key: 0 }, void 0, !0) : $.includes(o.type) ? (r(), m(D, y({
|
|
108
125
|
key: 1,
|
|
109
126
|
"is-value": !0,
|
|
110
|
-
value: s(
|
|
127
|
+
value: s(L)(s(a), o.prop),
|
|
111
128
|
colon: e.colon,
|
|
112
129
|
read: e.read,
|
|
113
130
|
"label-empty": e.labelEmpty,
|
|
114
131
|
ref_for: !0
|
|
115
132
|
}, o, {
|
|
116
|
-
"onUpdate:value":
|
|
117
|
-
onOnChange:
|
|
118
|
-
}),
|
|
119
|
-
|
|
120
|
-
name:
|
|
121
|
-
fn: l(({ row:
|
|
122
|
-
|
|
123
|
-
row: { ...
|
|
133
|
+
"onUpdate:value": _,
|
|
134
|
+
onOnChange: R
|
|
135
|
+
}), B({ _: 2 }, [
|
|
136
|
+
v(e.$slots, (W, d) => ({
|
|
137
|
+
name: d,
|
|
138
|
+
fn: l(({ row: w }) => [
|
|
139
|
+
i(e.$slots, d, {
|
|
140
|
+
row: { ...w }
|
|
124
141
|
}, void 0, !0)
|
|
125
142
|
])
|
|
126
143
|
}))
|
|
127
|
-
]), 1040, ["value", "colon", "read", "label-empty"]))
|
|
144
|
+
]), 1040, ["value", "colon", "read", "label-empty"])) : i(e.$slots, o.type, {
|
|
145
|
+
key: 2,
|
|
146
|
+
row: { ...o }
|
|
147
|
+
}, void 0, !0)
|
|
128
148
|
]),
|
|
129
149
|
_: 2
|
|
130
150
|
}, 1032, ["span"]))), 128))
|
|
131
151
|
]),
|
|
132
152
|
_: 3
|
|
133
|
-
})) : (r(!0),
|
|
153
|
+
})) : (r(!0), c(F, { key: 1 }, v(e.formItems, (o) => (r(), c(F, {
|
|
134
154
|
key: o.prop
|
|
135
155
|
}, [
|
|
136
|
-
o.type === "slot" ?
|
|
156
|
+
o.type === "slot" ? i(e.$slots, o.prop, { key: 0 }, void 0, !0) : $.includes(o.type) ? (r(), m(D, y({
|
|
137
157
|
key: 1,
|
|
138
158
|
"is-value": !0,
|
|
139
|
-
value: s(
|
|
159
|
+
value: s(L)(s(a), o.prop),
|
|
140
160
|
colon: e.colon,
|
|
141
161
|
read: e.read,
|
|
142
162
|
"label-empty": e.labelEmpty,
|
|
143
163
|
ref_for: !0
|
|
144
164
|
}, o, {
|
|
145
|
-
"onUpdate:value":
|
|
146
|
-
onOnChange:
|
|
147
|
-
}),
|
|
148
|
-
|
|
149
|
-
name:
|
|
150
|
-
fn: l(({ row:
|
|
151
|
-
|
|
152
|
-
row: { ...
|
|
165
|
+
"onUpdate:value": _,
|
|
166
|
+
onOnChange: R
|
|
167
|
+
}), B({ _: 2 }, [
|
|
168
|
+
v(e.$slots, (W, d) => ({
|
|
169
|
+
name: d,
|
|
170
|
+
fn: l(({ row: w }) => [
|
|
171
|
+
i(e.$slots, d, {
|
|
172
|
+
row: { ...w }
|
|
153
173
|
}, void 0, !0)
|
|
154
174
|
])
|
|
155
175
|
}))
|
|
156
|
-
]), 1040, ["value", "colon", "read", "label-empty"]))
|
|
176
|
+
]), 1040, ["value", "colon", "read", "label-empty"])) : i(e.$slots, o.type, {
|
|
177
|
+
key: 2,
|
|
178
|
+
row: { ...o }
|
|
179
|
+
}, void 0, !0)
|
|
157
180
|
], 64))), 128)),
|
|
158
|
-
|
|
159
|
-
e.showButtons ? (r(),
|
|
181
|
+
i(e.$slots, "default", {}, void 0, !0),
|
|
182
|
+
e.showButtons ? (r(), m(A, y({ key: 2 }, s(O), { class: e.buttonsClass }), {
|
|
160
183
|
default: l(() => [
|
|
161
|
-
|
|
184
|
+
C(S, {
|
|
162
185
|
type: "primary",
|
|
163
186
|
class: Q(e.confirmClassName),
|
|
164
187
|
loading: e.loading && e.showBtnLoading,
|
|
165
|
-
onClick: t[0] || (t[0] = (o) =>
|
|
188
|
+
onClick: t[0] || (t[0] = (o) => E(u.value))
|
|
166
189
|
}, {
|
|
167
190
|
default: l(() => [
|
|
168
|
-
|
|
191
|
+
P(X(e.confirmText), 1)
|
|
169
192
|
]),
|
|
170
193
|
_: 1
|
|
171
194
|
}, 8, ["class", "loading"]),
|
|
172
|
-
e.showReset ? (r(),
|
|
195
|
+
e.showReset ? (r(), m(S, {
|
|
173
196
|
key: 0,
|
|
174
|
-
onClick: t[1] || (t[1] = (o) =>
|
|
197
|
+
onClick: t[1] || (t[1] = (o) => V(u.value))
|
|
175
198
|
}, {
|
|
176
199
|
default: l(() => [
|
|
177
|
-
|
|
200
|
+
P(" 重置 ")
|
|
178
201
|
]),
|
|
179
202
|
_: 1
|
|
180
|
-
})) :
|
|
203
|
+
})) : I("", !0)
|
|
181
204
|
]),
|
|
182
205
|
_: 1
|
|
183
|
-
}, 16, ["class"])) :
|
|
206
|
+
}, 16, ["class"])) : I("", !0)
|
|
184
207
|
]),
|
|
185
208
|
_: 3
|
|
186
209
|
}, 16, ["label-width", "hide-required-asterisk", "model", "disabled", "class"])
|
|
@@ -192,5 +215,5 @@ const ae = { class: "ls-form" }, se = L({
|
|
|
192
215
|
}
|
|
193
216
|
});
|
|
194
217
|
export {
|
|
195
|
-
|
|
218
|
+
Se as default
|
|
196
219
|
};
|
|
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-e828c76a"]]);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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e828c76a"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|