@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
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
|
|
1
|
+
"use strict";var h=Object.defineProperty;var c=(n,r)=>h(n,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),y=require("../../_hooks/useNamespace/index.cjs"),M=require("element-plus"),f=require("../types/index.cjs"),_={style:{display:"none"}},v=t.defineComponent({name:"LSConfirm"}),x=t.defineComponent({...v,props:t.mergeModels(f.lsConfirmProps,{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(f.emitNames,["update:modelValue"]),setup(n,{emit:r}){const d=y.useNamespace("confirm").b(),e=n,i=r,s=t.useModel(n,"modelValue"),u=t.ref();t.watch(()=>s==null?void 0:s.value,o=>{o&&C()},{immediate:!0,deep:!0});const p=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)}c(g,"updateMessage");function C(){M.ElMessageBox({title:p,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:`${d} ${e.customClass} ls-confirm-box`,closeOnClickModal:e.closeOnClickModal,closeOnPressEscape:e.closeOnPressEscape,appendTo:e.appendTo,beforeClose:c(async(o,l,m)=>{if(o==="confirm"){if(l.confirmButtonLoading=!0,e.requestApi&&typeof e.requestApi=="function")try{u.value=await e.requestApi(e.requestParams)}catch(B){u.value=B}l.confirmButtonLoading=!1,m()}else l.confirmButtonLoading||m()},"beforeClose")}).then(()=>{s.value=!1,i("onConfirm",u)}).catch(()=>{s.value=!1,i("onCancel")})}return c(C,"initBox"),(o,l)=>(t.openBlock(),t.createElementBlock("div",_))}});exports.default=x;
|
|
@@ -1,7 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var l = (s, r) => y(s, "name", { value: r, configurable: !0 });
|
|
3
|
+
import { defineComponent as d, mergeModels as i, useModel as _, ref as M, watch as f, computed as p, openBlock as v, createElementBlock as w } from "vue";
|
|
4
|
+
import { useNamespace as T } from "../../_hooks/useNamespace/index.js";
|
|
5
|
+
import { ElMessageBox as q } from "element-plus";
|
|
6
|
+
import { lsConfirmProps as L, emitNames as b } from "../types/index.js";
|
|
7
|
+
const k = { style: { display: "none" } }, A = d({
|
|
8
|
+
name: "LSConfirm"
|
|
9
|
+
}), D = /* @__PURE__ */ d({
|
|
10
|
+
...A,
|
|
11
|
+
props: /* @__PURE__ */ i(L, {
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: Boolean
|
|
14
|
+
},
|
|
15
|
+
modelModifiers: {}
|
|
16
|
+
}),
|
|
17
|
+
emits: /* @__PURE__ */ i(b, ["update:modelValue"]),
|
|
18
|
+
setup(s, { emit: r }) {
|
|
19
|
+
const g = T("confirm").b(), e = s, m = r, t = _(s, "modelValue"), c = M();
|
|
20
|
+
f(
|
|
21
|
+
() => t == null ? void 0 : t.value,
|
|
22
|
+
(o) => {
|
|
23
|
+
o && h();
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
immediate: !0,
|
|
27
|
+
deep: !0
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
const C = p(() => e.title), n = p(() => e.message);
|
|
31
|
+
f(
|
|
32
|
+
() => n.value,
|
|
33
|
+
(o) => {
|
|
34
|
+
t != null && t.value && o && B();
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
deep: !0
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
async function B() {
|
|
41
|
+
const o = document.querySelector(".ls-confirm-box .el-message-box__message p");
|
|
42
|
+
o && (e.useHtml ? o.innerHTML = n.value : o.textContent = n.value);
|
|
43
|
+
}
|
|
44
|
+
l(B, "updateMessage");
|
|
45
|
+
function h() {
|
|
46
|
+
q({
|
|
47
|
+
title: C,
|
|
48
|
+
message: n.value,
|
|
49
|
+
confirmButtonText: e.confirmBtnTxt,
|
|
50
|
+
cancelButtonText: e.cancelBtnTxt,
|
|
51
|
+
type: e.type,
|
|
52
|
+
center: e.center,
|
|
53
|
+
draggable: e.draggable,
|
|
54
|
+
dangerouslyUseHTMLString: e.useHtml,
|
|
55
|
+
showCancelButton: e.showCancelBtn,
|
|
56
|
+
showConfirmButton: e.showConfirmBtn,
|
|
57
|
+
showClose: e.showClose,
|
|
58
|
+
customClass: `${g} ${e.customClass} ls-confirm-box`,
|
|
59
|
+
closeOnClickModal: e.closeOnClickModal,
|
|
60
|
+
closeOnPressEscape: e.closeOnPressEscape,
|
|
61
|
+
appendTo: e.appendTo,
|
|
62
|
+
beforeClose: /* @__PURE__ */ l(async (o, a, u) => {
|
|
63
|
+
if (o === "confirm") {
|
|
64
|
+
if (a.confirmButtonLoading = !0, e.requestApi && typeof e.requestApi == "function")
|
|
65
|
+
try {
|
|
66
|
+
c.value = await e.requestApi(e.requestParams);
|
|
67
|
+
} catch (x) {
|
|
68
|
+
c.value = x;
|
|
69
|
+
}
|
|
70
|
+
a.confirmButtonLoading = !1, u();
|
|
71
|
+
} else
|
|
72
|
+
a.confirmButtonLoading || u();
|
|
73
|
+
}, "beforeClose")
|
|
74
|
+
}).then(() => {
|
|
75
|
+
t.value = !1, m("onConfirm", c);
|
|
76
|
+
}).catch(() => {
|
|
77
|
+
t.value = !1, m("onCancel");
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return l(h, "initBox"), (o, a) => (v(), w("div", k));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
5
83
|
export {
|
|
6
|
-
|
|
84
|
+
D as default
|
|
7
85
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */exports.default=e.default;
|
|
@@ -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-2baea1e6"]]);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
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2baea1e6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var p=(
|
|
1
|
+
"use strict";var g=Object.defineProperty;var p=(c,r)=>g(c,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),C=,/* empty css */b=,/* empty css */m=,/* empty css */B=,/* empty css */S=,/* empty css */f=,/* empty css */h={class:"cell-item"},v=e.defineComponent({name:"LSDescriptions"}),D=e.defineComponent({...v,props:m.lsDescProp,setup(c){const r=e.useSlots(),l=c,k=e.ref({column:1}),d=e.ref(),y=B.useNamespace("descriptions").b();e.watch(()=>l.labelColor,async o=>{o&&s(o,1)},{deep:!0,immediate:!0}),e.watch(()=>l.labelBgColor,async o=>{o&&s(o,2)},{deep:!0,immediate:!0}),e.watch(()=>l.list,()=>{s(l.labelColor,2),s(l.labelBgColor,2)},{immediate:!0,deep:!0});async function s(o,u){var a;await e.nextTick(),(((a=d.value)==null?void 0:a.querySelectorAll(".el-descriptions__label"))||[]).forEach(t=>{u===1?t.style.color=o:u===2&&(t.style.backgroundColor=o)})}return p(s,"updateLabelStyle"),(o,u)=>{const i=f.ElDescriptionsItem,a=f.ElDescriptions;return e.openBlock(),e.createElementBlock("div",{ref_key:"lsDescRef",ref:d,class:e.normalizeClass([e.unref(y),`column-${o.$attrs.column||1}`,e.unref(r).title||e.unref(r).extra?"":"no-header"])},[e.createVNode(a,e.mergeProps(e.unref(S.default)(e.unref(k),o.$attrs),{border:""}),{title:e.withCtx(()=>[e.renderSlot(o.$slots,"title",{},void 0,!0)]),extra:e.withCtx(()=>[e.renderSlot(o.$slots,"extra",{},void 0,!0)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.list,(t,_)=>(e.openBlock(),e.createBlock(i,{key:_,label:t==null?void 0:t.label},{label:e.withCtx(()=>{var n;return[e.createElementVNode("div",h,[(n=t.iconConfig)!=null&&n.name||e.unref(r).icon?(e.openBlock(),e.createBlock(C.default,e.mergeProps({key:0,ref_for:!0},t.iconConfig),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"icon",{},void 0,!0)]),_:2},1040)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t==null?void 0:t.label),1)])]}),default:e.withCtx(()=>{var n;return[t.type==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.value?e.unref(b.default)(t.value).format(t.format||"YYYY-MM-DD HH:mm:ss"):"--"),1)],64)):t.type==="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(((n=t.propMap[t.value])==null?void 0:n.label)||"--"),1)],64)):t.type=="slot"?e.renderSlot(o.$slots,t.slotName,{key:2,data:t==null?void 0:t.value},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString((t==null?void 0:t.value)||"--"),1)],64))]}),_:2},1032,["label"]))),128))]),_:3},16)],2)}}});exports.default=D;
|
|
@@ -1,97 +1,106 @@
|
|
|
1
|
-
var
|
|
2
|
-
var v = (
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var v = (y, t) => E(y, "name", { value: t, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { defineComponent as
|
|
6
|
+
import { defineComponent as $, useSlots as L, ref as g, watch as b, nextTick as V, openBlock as r, createElementBlock as c, normalizeClass as Y, unref as l, createVNode as w, mergeProps as D, withCtx as s, renderSlot as u, Fragment as i, renderList as M, createBlock as S, createElementVNode as A, createCommentVNode as H, createTextVNode as f, toDisplayString as m } from "vue";
|
|
7
7
|
import I from "../../icon/Index.vue/index.js";
|
|
8
8
|
import P from "../../../../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min/index.js";
|
|
9
9
|
import { lsDescProp as R } from "../types/index.js";
|
|
10
10
|
import { useNamespace as T } from "../../_hooks/useNamespace/index.js";
|
|
11
11
|
import j from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
12
|
-
import { ElDescriptionsItem as q, ElDescriptions as
|
|
13
|
-
const
|
|
12
|
+
import { ElDescriptionsItem as q, ElDescriptions 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/descriptions/index/index.js";
|
|
13
|
+
const z = { class: "cell-item" }, F = $({
|
|
14
14
|
name: "LSDescriptions"
|
|
15
|
-
}),
|
|
16
|
-
...
|
|
15
|
+
}), le = /* @__PURE__ */ $({
|
|
16
|
+
...F,
|
|
17
17
|
props: R,
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
18
|
+
setup(y) {
|
|
19
|
+
const t = L(), a = y, h = g({
|
|
20
20
|
column: 1
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
() =>
|
|
21
|
+
}), k = g(), N = T("descriptions").b();
|
|
22
|
+
b(
|
|
23
|
+
() => a.labelColor,
|
|
24
24
|
async (o) => {
|
|
25
|
-
o && (
|
|
25
|
+
o && p(o, 1);
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
deep: !0,
|
|
29
29
|
immediate: !0
|
|
30
30
|
}
|
|
31
|
-
),
|
|
32
|
-
() =>
|
|
31
|
+
), b(
|
|
32
|
+
() => a.labelBgColor,
|
|
33
33
|
async (o) => {
|
|
34
|
-
o && (
|
|
34
|
+
o && p(o, 2);
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
deep: !0,
|
|
38
38
|
immediate: !0
|
|
39
39
|
}
|
|
40
|
+
), b(
|
|
41
|
+
() => a.list,
|
|
42
|
+
() => {
|
|
43
|
+
p(a.labelColor, 2), p(a.labelBgColor, 2);
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
immediate: !0,
|
|
47
|
+
deep: !0
|
|
48
|
+
}
|
|
40
49
|
);
|
|
41
|
-
function
|
|
42
|
-
var
|
|
43
|
-
(((
|
|
44
|
-
|
|
50
|
+
async function p(o, _) {
|
|
51
|
+
var d;
|
|
52
|
+
await V(), (((d = k.value) == null ? void 0 : d.querySelectorAll(".el-descriptions__label")) || []).forEach((e) => {
|
|
53
|
+
_ === 1 ? e.style.color = o : _ === 2 && (e.style.backgroundColor = o);
|
|
45
54
|
});
|
|
46
55
|
}
|
|
47
|
-
return v(
|
|
48
|
-
const
|
|
49
|
-
return r(),
|
|
56
|
+
return v(p, "updateLabelStyle"), (o, _) => {
|
|
57
|
+
const C = q, d = x;
|
|
58
|
+
return r(), c("div", {
|
|
50
59
|
ref_key: "lsDescRef",
|
|
51
|
-
ref:
|
|
52
|
-
class:
|
|
60
|
+
ref: k,
|
|
61
|
+
class: Y([l(N), `column-${o.$attrs.column || 1}`, l(t).title || l(t).extra ? "" : "no-header"])
|
|
53
62
|
}, [
|
|
54
|
-
|
|
63
|
+
w(d, D(l(j)(l(h), o.$attrs), { border: "" }), {
|
|
55
64
|
title: s(() => [
|
|
56
|
-
|
|
65
|
+
u(o.$slots, "title", {}, void 0, !0)
|
|
57
66
|
]),
|
|
58
67
|
extra: s(() => [
|
|
59
|
-
|
|
68
|
+
u(o.$slots, "extra", {}, void 0, !0)
|
|
60
69
|
]),
|
|
61
70
|
default: s(() => [
|
|
62
|
-
(r(!0),
|
|
63
|
-
key:
|
|
71
|
+
(r(!0), c(i, null, M(o.list, (e, B) => (r(), S(C, {
|
|
72
|
+
key: B,
|
|
64
73
|
label: e == null ? void 0 : e.label
|
|
65
74
|
}, {
|
|
66
75
|
label: s(() => {
|
|
67
|
-
var
|
|
76
|
+
var n;
|
|
68
77
|
return [
|
|
69
|
-
A("div",
|
|
70
|
-
(
|
|
78
|
+
A("div", z, [
|
|
79
|
+
(n = e.iconConfig) != null && n.name || l(t).icon ? (r(), S(I, D({
|
|
71
80
|
key: 0,
|
|
72
81
|
ref_for: !0
|
|
73
82
|
}, e.iconConfig), {
|
|
74
83
|
default: s(() => [
|
|
75
|
-
|
|
84
|
+
u(o.$slots, "icon", {}, void 0, !0)
|
|
76
85
|
]),
|
|
77
86
|
_: 2
|
|
78
87
|
}, 1040)) : H("", !0),
|
|
79
|
-
|
|
88
|
+
f(" " + m(e == null ? void 0 : e.label), 1)
|
|
80
89
|
])
|
|
81
90
|
];
|
|
82
91
|
}),
|
|
83
92
|
default: s(() => {
|
|
84
|
-
var
|
|
93
|
+
var n;
|
|
85
94
|
return [
|
|
86
|
-
e.type === "date" ? (r(),
|
|
87
|
-
|
|
88
|
-
], 64)) : e.type === "select" ? (r(),
|
|
89
|
-
|
|
90
|
-
], 64)) : e.type == "slot" ?
|
|
95
|
+
e.type === "date" ? (r(), c(i, { key: 0 }, [
|
|
96
|
+
f(m(e.value ? l(P)(e.value).format(e.format || "YYYY-MM-DD HH:mm:ss") : "--"), 1)
|
|
97
|
+
], 64)) : e.type === "select" ? (r(), c(i, { key: 1 }, [
|
|
98
|
+
f(m(((n = e.propMap[e.value]) == null ? void 0 : n.label) || "--"), 1)
|
|
99
|
+
], 64)) : e.type == "slot" ? u(o.$slots, e.slotName, {
|
|
91
100
|
key: 2,
|
|
92
101
|
data: e == null ? void 0 : e.value
|
|
93
|
-
}, void 0, !0) : (r(),
|
|
94
|
-
|
|
102
|
+
}, void 0, !0) : (r(), c(i, { key: 3 }, [
|
|
103
|
+
f(m((e == null ? void 0 : e.value) || "--"), 1)
|
|
95
104
|
], 64))
|
|
96
105
|
];
|
|
97
106
|
}),
|
|
@@ -105,5 +114,5 @@ const F = { class: "cell-item" }, x = N({
|
|
|
105
114
|
}
|
|
106
115
|
});
|
|
107
116
|
export {
|
|
108
|
-
|
|
117
|
+
le as default
|
|
109
118
|
};
|
|
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-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;
|