@lingshugroup/web-plus 0.1.1-beta → 1.0.0
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/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.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/vue/vnode/index.cjs +1 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/utils/vue/vnode/index.js +23 -38
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/utils/vue/vnode/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/vue/vnode/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 +40 -37
- 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/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 +15 -15
- 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/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +71 -67
- 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 +281 -157
- 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 +27 -6
- 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 +2 -2
- package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.js +128 -124
- 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 +4 -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/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 +152 -126
- 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/table/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/table/types/index.js +12 -0
- package/lib/packages/ls-components/components/table/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/table/types/index.js.gz +0 -0
- package/package.json +1 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/index/index.cjs +0 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/index/index.js +0 -9
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/src/item/index.cjs +0 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/src/item/index.js +0 -19
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/src/space/index.cjs +0 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/src/space/index.js +0 -111
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/src/space/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/components/space/src/space/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/components/space/src/use-space/index.cjs +0 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/src/use-space/index.js +0 -40
- package/lib/node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/space/src/use-space/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/components/space/src/use-space/index.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";var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var S=(e,T)=>i(e,"name",{value:T,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("vue"),u=require("../../../../../../../@vue_shared@3.4.38/node_modules/@vue/shared/dist/shared.esm-bundler/index.cjs"),p=require("../../error/index.cjs"),s="utils/vue/vnode";var A=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(A||{});const t=S(e=>{if(!N.isVNode(e))return p.debugWarn(s,"[getNormalizedProps] must be a VNode"),{};const T=e.props||{},o=(N.isVNode(e.type)?e.type.props:void 0)||{},r={};return Object.keys(o).forEach(E=>{u.hasOwn(o[E],"default")&&(r[E]=o[E].default)}),Object.keys(T).forEach(E=>{r[u.camelize(E)]=T[E]}),r},"getNormalizedProps"),n=S(e=>{const T=u.isArray(e)?e:[e],o=[];return T.forEach(r=>{var E;u.isArray(r)?o.push(...n(r)):N.isVNode(r)&&u.isArray(r.children)?o.push(...n(r.children)):(o.push(r),N.isVNode(r)&&((E=r.component)!=null&&E.subTree)&&o.push(...n(r.component.subTree)))}),o},"flattedChildren");exports.PatchFlags=A;exports.flattedChildren=n;exports.getNormalizedProps=t;
|
|
@@ -1,43 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { isVNode as
|
|
4
|
-
import { isArray as
|
|
5
|
-
import { debugWarn as
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
u(O, "isComment");
|
|
16
|
-
function M(r) {
|
|
17
|
-
return n(r) && !D(r) && !O(r);
|
|
18
|
-
}
|
|
19
|
-
u(M, "isValidElementNode");
|
|
20
|
-
const v = /* @__PURE__ */ u((r) => {
|
|
21
|
-
if (!n(r))
|
|
22
|
-
return i(_, "[getNormalizedProps] must be a VNode"), {};
|
|
23
|
-
const T = r.props || {}, E = (n(r.type) ? r.type.props : void 0) || {}, e = {};
|
|
24
|
-
return Object.keys(E).forEach((o) => {
|
|
25
|
-
A(E[o], "default") && (e[o] = E[o].default);
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var S = (E, T) => n(E, "name", { value: T, configurable: !0 });
|
|
3
|
+
import { isVNode as p } from "vue";
|
|
4
|
+
import { isArray as A, hasOwn as u, camelize as _ } from "../../../../../../../@vue_shared@3.4.38/node_modules/@vue/shared/dist/shared.esm-bundler/index.js";
|
|
5
|
+
import { debugWarn as f } from "../../error/index.js";
|
|
6
|
+
const L = "utils/vue/vnode";
|
|
7
|
+
var m = /* @__PURE__ */ ((E) => (E[E.TEXT = 1] = "TEXT", E[E.CLASS = 2] = "CLASS", E[E.STYLE = 4] = "STYLE", E[E.PROPS = 8] = "PROPS", E[E.FULL_PROPS = 16] = "FULL_PROPS", E[E.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", E[E.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", E[E.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", E[E.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", E[E.NEED_PATCH = 512] = "NEED_PATCH", E[E.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", E[E.HOISTED = -1] = "HOISTED", E[E.BAIL = -2] = "BAIL", E))(m || {});
|
|
8
|
+
const i = /* @__PURE__ */ S((E) => {
|
|
9
|
+
if (!p(E))
|
|
10
|
+
return f(L, "[getNormalizedProps] must be a VNode"), {};
|
|
11
|
+
const T = E.props || {}, e = (p(E.type) ? E.type.props : void 0) || {}, r = {};
|
|
12
|
+
return Object.keys(e).forEach((o) => {
|
|
13
|
+
u(e[o], "default") && (r[o] = e[o].default);
|
|
26
14
|
}), Object.keys(T).forEach((o) => {
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
}, "getNormalizedProps"),
|
|
30
|
-
const T =
|
|
31
|
-
return T.forEach((
|
|
15
|
+
r[_(o)] = T[o];
|
|
16
|
+
}), r;
|
|
17
|
+
}, "getNormalizedProps"), N = /* @__PURE__ */ S((E) => {
|
|
18
|
+
const T = A(E) ? E : [E], e = [];
|
|
19
|
+
return T.forEach((r) => {
|
|
32
20
|
var o;
|
|
33
|
-
|
|
34
|
-
}),
|
|
21
|
+
A(r) ? e.push(...N(r)) : p(r) && A(r.children) ? e.push(...N(r.children)) : (e.push(r), p(r) && ((o = r.component) != null && o.subTree) && e.push(...N(r.component.subTree)));
|
|
22
|
+
}), e;
|
|
35
23
|
}, "flattedChildren");
|
|
36
24
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
O as isComment,
|
|
41
|
-
D as isFragment,
|
|
42
|
-
M as isValidElementNode
|
|
25
|
+
m as PatchFlags,
|
|
26
|
+
N as flattedChildren,
|
|
27
|
+
i as getNormalizedProps
|
|
43
28
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var D=Object.defineProperty;var t=(o,r)=>D(o,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function M(o,r,p){const a=e.ref(!0),s=e.ref(!1),u=e.ref(1),c=e.ref(10),S=[10,20,30,50],i=e.ref([]),f=e.ref(0),{autoFetch:P=!0,dealData:v,dealParams:m}=p||{},l=t((n=!0,C=!1)=>{if(!o)return;n&&(s.value=!0),C&&(a.value=!0);let d={currentPage:u.value,pageSize:c.value,...r};m&&(d=m(d)),o(d).then(g=>{if(v&&typeof v=="function"){const{data:h,total:b=0}=v(g);i.value=h||[],f.value=Number(b||0)}else{const{records:h=[],total:b}=g||{};i.value=h||[],f.value=Number(b||0)}}).catch(g=>{}).finally(()=>{s.value=!1,a.value&&setTimeout(()=>{a.value=!1},200)})},"loadData"),z=t(n=>{u.value=n,l()},"handleCurrentPageChange"),T=t(n=>{c.value=n,u.value=1,l()},"handleSizeChange"),y=t(()=>{u.value=1,e.nextTick(()=>{l()})},"handleReset");return e.onMounted(()=>{P&&(a.value=!0,l())}),{isFirst:a,loading:s,pageSize:c,pageSizes:S,currentPage:u,tableData:i,total:f,handleCurrentPageChange:z,handleSizeChange:T,handleReset:y,loadData:l}}t(M,"useTableListHook");exports.default=M;
|
|
@@ -1,52 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var e = (o, s) =>
|
|
3
|
-
import { ref as
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var k = Object.defineProperty;
|
|
2
|
+
var e = (o, s) => k(o, "name", { value: s, configurable: !0 });
|
|
3
|
+
import { ref as a, onMounted as x, nextTick as y } from "vue";
|
|
4
|
+
function H(o, s, b) {
|
|
5
|
+
const t = a(!0), r = a(!1), l = a(1), c = a(10), z = [10, 20, 30, 50], i = a([]), f = a(0), { autoFetch: P = !0, dealData: v, dealParams: p } = b || {}, u = /* @__PURE__ */ e((n = !0, T = !1) => {
|
|
6
|
+
if (!o) return;
|
|
7
|
+
n && (r.value = !0), T && (t.value = !0);
|
|
8
|
+
let d = {
|
|
9
|
+
currentPage: l.value,
|
|
10
|
+
pageSize: c.value,
|
|
9
11
|
...s
|
|
10
|
-
}
|
|
12
|
+
};
|
|
13
|
+
p && (d = p(d)), o(d).then((g) => {
|
|
11
14
|
if (v && typeof v == "function") {
|
|
12
|
-
const { data:
|
|
13
|
-
i.value =
|
|
15
|
+
const { data: h, total: m = 0 } = v(g);
|
|
16
|
+
i.value = h || [], f.value = Number(m || 0);
|
|
14
17
|
} else {
|
|
15
|
-
const { records:
|
|
16
|
-
i.value =
|
|
18
|
+
const { records: h = [], total: m } = g || {};
|
|
19
|
+
i.value = h || [], f.value = Number(m || 0);
|
|
17
20
|
}
|
|
18
|
-
}).catch((
|
|
21
|
+
}).catch((g) => {
|
|
19
22
|
}).finally(() => {
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
r.value = !1, t.value && setTimeout(() => {
|
|
24
|
+
t.value = !1;
|
|
22
25
|
}, 200);
|
|
23
|
-
})
|
|
24
|
-
}, "loadData"),
|
|
25
|
-
|
|
26
|
-
}, "handleCurrentPageChange"),
|
|
27
|
-
|
|
28
|
-
}, "handleSizeChange"),
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
});
|
|
27
|
+
}, "loadData"), S = /* @__PURE__ */ e((n) => {
|
|
28
|
+
l.value = n, u();
|
|
29
|
+
}, "handleCurrentPageChange"), C = /* @__PURE__ */ e((n) => {
|
|
30
|
+
c.value = n, l.value = 1, u();
|
|
31
|
+
}, "handleSizeChange"), D = /* @__PURE__ */ e(() => {
|
|
32
|
+
l.value = 1, y(() => {
|
|
33
|
+
u();
|
|
31
34
|
});
|
|
32
35
|
}, "handleReset");
|
|
33
|
-
return
|
|
34
|
-
|
|
36
|
+
return x(() => {
|
|
37
|
+
P && (t.value = !0, u());
|
|
35
38
|
}), {
|
|
36
|
-
isFirst:
|
|
37
|
-
loading:
|
|
38
|
-
pageSize:
|
|
39
|
-
pageSizes:
|
|
40
|
-
currentPage:
|
|
39
|
+
isFirst: t,
|
|
40
|
+
loading: r,
|
|
41
|
+
pageSize: c,
|
|
42
|
+
pageSizes: z,
|
|
43
|
+
currentPage: l,
|
|
41
44
|
tableData: i,
|
|
42
45
|
total: f,
|
|
43
|
-
handleCurrentPageChange:
|
|
44
|
-
handleSizeChange:
|
|
45
|
-
handleReset:
|
|
46
|
-
loadData:
|
|
46
|
+
handleCurrentPageChange: S,
|
|
47
|
+
handleSizeChange: C,
|
|
48
|
+
handleReset: D,
|
|
49
|
+
loadData: u
|
|
47
50
|
};
|
|
48
51
|
}
|
|
49
|
-
e(
|
|
52
|
+
e(H, "useTableListHook");
|
|
50
53
|
export {
|
|
51
|
-
|
|
54
|
+
H as default
|
|
52
55
|
};
|
|
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-9b4f38cc"]]);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-9b4f38cc"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var y=Object.defineProperty;var
|
|
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,i=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),l=t.computed(()=>e.message);t.watch(()=>l.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=l.value:o.textContent=l.value)}r(g,"updateMessage");function B(){v.ElMessageBox({title:C,message:l.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,a,m)=>{if(o==="confirm"){if(a.confirmButtonLoading=!0,e.requestApi&&typeof e.requestApi=="function")try{u.value=await e.requestApi()}catch(h){u.value=h}a.confirmButtonLoading=!1,m()}else a.confirmButtonLoading||m()},"beforeClose")}).then(()=>{s.value=!1,i("onConfirm",u)}).catch(()=>{s.value=!1,i("onCancel")})}return r(B,"initBox"),(o,a)=>(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 l = (s, r) => _(s, "name", { value: r, 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 L, unref as k } from "vue";
|
|
4
|
+
import { useNamespace as q } 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: r }) {
|
|
19
|
+
const g = q("confirm").b(), e = s, m = r, 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
|
+
l(h, "updateMessage");
|
|
45
45
|
function y() {
|
|
46
46
|
b({
|
|
47
47
|
title: x,
|
|
@@ -59,28 +59,28 @@ const H = C({
|
|
|
59
59
|
closeOnClickModal: e.closeOnClickModal,
|
|
60
60
|
closeOnPressEscape: e.closeOnPressEscape,
|
|
61
61
|
appendTo: e.appendTo,
|
|
62
|
-
beforeClose: /* @__PURE__ */
|
|
62
|
+
beforeClose: /* @__PURE__ */ l(async (o, a, u) => {
|
|
63
63
|
if (o === "confirm") {
|
|
64
|
-
if (
|
|
64
|
+
if (a.confirmButtonLoading = !0, e.requestApi && typeof e.requestApi == "function")
|
|
65
65
|
try {
|
|
66
|
-
|
|
66
|
+
c.value = await e.requestApi();
|
|
67
67
|
} catch (M) {
|
|
68
|
-
|
|
68
|
+
c.value = M;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
a.confirmButtonLoading = !1, u();
|
|
71
71
|
} else
|
|
72
|
-
u();
|
|
72
|
+
a.confirmButtonLoading || u();
|
|
73
73
|
}, "beforeClose")
|
|
74
74
|
}).then(() => {
|
|
75
|
-
t.value = !1, m("onConfirm",
|
|
75
|
+
t.value = !1, m("onConfirm", c);
|
|
76
76
|
}).catch(() => {
|
|
77
77
|
t.value = !1, m("onCancel");
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return l(y, "initBox"), (o, a) => (w(), T("div", {
|
|
81
81
|
ref_key: "lsConfirmRef",
|
|
82
82
|
ref: B,
|
|
83
|
-
class: k(
|
|
83
|
+
class: L(k(g))
|
|
84
84
|
}, null, 2));
|
|
85
85
|
}
|
|
86
86
|
});
|
|
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-66245a45"]]);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 p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-66245a45"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var E=Object.defineProperty;var i=(d,p)=>E(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 */const e=require("vue"),y=,/* empty css */P=,/* empty css */v=,/* empty css */L=,/* empty css */_=,/* empty css */R=,/* empty css */V=,/* empty css */B=,/* empty css */I=e.defineComponent({name:"LSForm"}),N=e.defineComponent({...I,props:P.lsFormProps,emits:["submit","reset","update:form-data"],setup(d,{expose:p,emit:w}){const C=d,m=w,n=e.useAttrs(),g=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();let l=e.reactive({});function q(t){t&&(t.resetFields(),m("reset",l))}i(q,"resetForm");async function c(t){t&&await t.validate((o,u)=>{o&&m("submit",l)})}i(c,"submitForm");function h(){return new Promise((t,o)=>{if(!s.value)return t(!1);s.value.validate((u,f)=>{u?t(l):o(f)})})}i(h,"validate");function k(t,o){L.default(l,t,o)}return i(k,"updateFormData"),e.watch(()=>C.formData,t=>{l=t||{}},{deep:!0,immediate:!0}),p({FormRef:s,validate:h,submitForm:c}),(t,o)=>{const u=_.ElCol,f=R.ElRow,b=V.ElButton,F=B.ElFormItem,$=B.ElForm;return e.openBlock(),e.createBlock($,e.mergeProps({ref_key:"FormRef",ref:s,"label-position":"left","require-asterisk-position":"right","label-width":t.labelWidth,"hide-required-asterisk":!!t.read},t.$attrs,{model:e.unref(l),disabled:t.loading||t.disabled}),{default:e.withCtx(()=>[t.column>1?(e.openBlock(),e.createBlock(f,{key:0,gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formItems,r=>(e.openBlock(),e.createBlock(u,{key:r.prop,span:r.isRow?24:24/t.column},{default:e.withCtx(()=>[r.type==="slot"?e.renderSlot(t.$slots,r.prop,{key:0},void 0,!0):(e.openBlock(),e.createBlock(y.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(v.default)(e.unref(l),r.prop),colon:t.colon,read:t.read,"label-empty":t.labelEmpty,ref_for:!0},r,{"onUpdate:value":k}),e.createSlots({_:2},[e.renderList(t.$slots,(S,a)=>({name:a,fn:e.withCtx(()=>[e.renderSlot(t.$slots,a,{},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(t.formItems,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.type==="slot"?e.renderSlot(t.$slots,r.prop,{key:0},void 0,!0):(e.openBlock(),e.createBlock(y.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(v.default)(e.unref(l),r.prop),colon:t.colon,read:t.read,"label-empty":t.labelEmpty,ref_for:!0},r,{"onUpdate:value":k}),e.createSlots({_:2},[e.renderList(t.$slots,(S,a)=>({name:a,fn:e.withCtx(()=>[e.renderSlot(t.$slots,a,{},void 0,!0)])}))]),1040,["value","colon","read","label-empty"]))],64))),128)),e.renderSlot(t.$slots,"default",{},void 0,!0),t.showButtons?(e.openBlock(),e.createBlock(F,e.mergeProps({key:2},e.unref(g),{class:t.buttonsClass}),{default:e.withCtx(()=>[e.createVNode(b,{type:"primary",class:e.normalizeClass(t.confirmClassName),loading:t.loading&&t.showBtnLoading,onClick:o[0]||(o[0]=r=>c(s.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmText),1)]),_:1},8,["class","loading"]),t.showReset?(e.openBlock(),e.createBlock(b,{key:0,onClick:o[1]||(o[1]=r=>q(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"])}}});exports.default=N;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var p = (v, c) => U(v, "name", { value: c, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { defineComponent as I, useAttrs as
|
|
9
|
+
import { defineComponent as I, useAttrs as z, computed as O, ref as W, reactive as j, watch as G, openBlock as r, createBlock as a, mergeProps as b, unref as u, withCtx as s, createElementBlock as w, Fragment as F, renderList as y, renderSlot as d, createSlots as B, createVNode as H, normalizeClass as J, createTextVNode as E, toDisplayString as K, createCommentVNode as R } from "vue";
|
|
10
10
|
import S from "../FormItem.vue/index.js";
|
|
11
|
-
import { lsFormProps as
|
|
12
|
-
import
|
|
11
|
+
import { lsFormProps as M } from "../types/index.js";
|
|
12
|
+
import _ from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get/index.js";
|
|
13
13
|
import Q from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set/index.js";
|
|
14
14
|
import { ElCol 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/col/index/index.js";
|
|
15
15
|
import { ElRow as Y } 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";
|
|
@@ -19,41 +19,41 @@ const oe = I({
|
|
|
19
19
|
name: "LSForm"
|
|
20
20
|
}), ke = /* @__PURE__ */ I({
|
|
21
21
|
...oe,
|
|
22
|
-
props:
|
|
22
|
+
props: M,
|
|
23
23
|
emits: ["submit", "reset", "update:form-data"],
|
|
24
|
-
setup(v, { expose:
|
|
25
|
-
const
|
|
24
|
+
setup(v, { expose: c, emit: L }) {
|
|
25
|
+
const P = v, g = L, l = z(), q = O(() => l && l.hasOwnProperty("inline") ? typeof l.inline == "boolean" && l.inline === !1 ? {} : l && l["label-position"] === "top" ? {
|
|
26
26
|
class: "form-item-buttons "
|
|
27
|
-
} : {} :
|
|
27
|
+
} : {} : l && l["label-position"] === "top" ? {
|
|
28
28
|
"label-position": "top"
|
|
29
29
|
} : {
|
|
30
30
|
label: " "
|
|
31
|
-
}),
|
|
32
|
-
let n =
|
|
33
|
-
function
|
|
34
|
-
e && (e.resetFields(),
|
|
31
|
+
}), i = W();
|
|
32
|
+
let n = j({});
|
|
33
|
+
function D(e) {
|
|
34
|
+
e && (e.resetFields(), g("reset", n));
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
async function
|
|
38
|
-
e && await e.validate((t,
|
|
39
|
-
t &&
|
|
36
|
+
p(D, "resetForm");
|
|
37
|
+
async function C(e) {
|
|
38
|
+
e && await e.validate((t, f) => {
|
|
39
|
+
t && g("submit", n);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
function
|
|
42
|
+
p(C, "submitForm");
|
|
43
|
+
function V() {
|
|
44
44
|
return new Promise((e, t) => {
|
|
45
|
-
if (!
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
if (!i.value) return e(!1);
|
|
46
|
+
i.value.validate((f, k) => {
|
|
47
|
+
f ? e(n) : t(k);
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
p(V, "validate");
|
|
52
52
|
function $(e, t) {
|
|
53
53
|
Q(n, e, t);
|
|
54
54
|
}
|
|
55
|
-
return
|
|
56
|
-
() =>
|
|
55
|
+
return p($, "updateFormData"), G(
|
|
56
|
+
() => P.formData,
|
|
57
57
|
(e) => {
|
|
58
58
|
n = e || {};
|
|
59
59
|
},
|
|
@@ -61,91 +61,95 @@ const oe = I({
|
|
|
61
61
|
deep: !0,
|
|
62
62
|
immediate: !0
|
|
63
63
|
}
|
|
64
|
-
),
|
|
65
|
-
FormRef:
|
|
66
|
-
validate:
|
|
67
|
-
submitForm:
|
|
64
|
+
), c({
|
|
65
|
+
FormRef: i,
|
|
66
|
+
validate: V,
|
|
67
|
+
submitForm: C
|
|
68
68
|
}), (e, t) => {
|
|
69
|
-
const
|
|
70
|
-
return r(),
|
|
69
|
+
const f = X, k = Y, h = Z, A = x, N = ee;
|
|
70
|
+
return r(), a(N, b({
|
|
71
71
|
ref_key: "FormRef",
|
|
72
|
-
ref:
|
|
72
|
+
ref: i,
|
|
73
73
|
"label-position": "left",
|
|
74
|
-
"
|
|
74
|
+
"require-asterisk-position": "right",
|
|
75
|
+
"label-width": e.labelWidth,
|
|
76
|
+
"hide-required-asterisk": !!e.read
|
|
75
77
|
}, e.$attrs, {
|
|
76
|
-
model:
|
|
78
|
+
model: u(n),
|
|
77
79
|
disabled: e.loading || e.disabled
|
|
78
80
|
}), {
|
|
79
|
-
default:
|
|
80
|
-
e.column > 1 ? (r(),
|
|
81
|
+
default: s(() => [
|
|
82
|
+
e.column > 1 ? (r(), a(k, {
|
|
81
83
|
key: 0,
|
|
82
84
|
gutter: 10
|
|
83
85
|
}, {
|
|
84
|
-
default:
|
|
85
|
-
(r(!0), w(F, null,
|
|
86
|
+
default: s(() => [
|
|
87
|
+
(r(!0), w(F, null, y(e.formItems, (o) => (r(), a(f, {
|
|
86
88
|
key: o.prop,
|
|
87
89
|
span: o.isRow ? 24 : 24 / e.column
|
|
88
90
|
}, {
|
|
89
|
-
default:
|
|
90
|
-
o.type === "slot" ?
|
|
91
|
+
default: s(() => [
|
|
92
|
+
o.type === "slot" ? d(e.$slots, o.prop, { key: 0 }, void 0, !0) : (r(), a(S, b({
|
|
91
93
|
key: 1,
|
|
92
94
|
"is-value": !0,
|
|
93
|
-
value:
|
|
95
|
+
value: u(_)(u(n), o.prop),
|
|
94
96
|
colon: e.colon,
|
|
95
97
|
read: e.read,
|
|
98
|
+
"label-empty": e.labelEmpty,
|
|
96
99
|
ref_for: !0
|
|
97
100
|
}, o, { "onUpdate:value": $ }), B({ _: 2 }, [
|
|
98
|
-
|
|
99
|
-
name:
|
|
100
|
-
fn:
|
|
101
|
-
|
|
101
|
+
y(e.$slots, (T, m) => ({
|
|
102
|
+
name: m,
|
|
103
|
+
fn: s(() => [
|
|
104
|
+
d(e.$slots, m, {}, void 0, !0)
|
|
102
105
|
])
|
|
103
106
|
}))
|
|
104
|
-
]), 1040, ["value", "colon", "read"]))
|
|
107
|
+
]), 1040, ["value", "colon", "read", "label-empty"]))
|
|
105
108
|
]),
|
|
106
109
|
_: 2
|
|
107
110
|
}, 1032, ["span"]))), 128))
|
|
108
111
|
]),
|
|
109
112
|
_: 3
|
|
110
|
-
})) : (r(!0), w(F, { key: 1 },
|
|
113
|
+
})) : (r(!0), w(F, { key: 1 }, y(e.formItems, (o) => (r(), w(F, {
|
|
111
114
|
key: o.prop
|
|
112
115
|
}, [
|
|
113
|
-
o.type === "slot" ?
|
|
116
|
+
o.type === "slot" ? d(e.$slots, o.prop, { key: 0 }, void 0, !0) : (r(), a(S, b({
|
|
114
117
|
key: 1,
|
|
115
118
|
"is-value": !0,
|
|
116
|
-
value:
|
|
119
|
+
value: u(_)(u(n), o.prop),
|
|
117
120
|
colon: e.colon,
|
|
118
121
|
read: e.read,
|
|
122
|
+
"label-empty": e.labelEmpty,
|
|
119
123
|
ref_for: !0
|
|
120
124
|
}, o, { "onUpdate:value": $ }), B({ _: 2 }, [
|
|
121
|
-
|
|
122
|
-
name:
|
|
123
|
-
fn:
|
|
124
|
-
|
|
125
|
+
y(e.$slots, (T, m) => ({
|
|
126
|
+
name: m,
|
|
127
|
+
fn: s(() => [
|
|
128
|
+
d(e.$slots, m, {}, void 0, !0)
|
|
125
129
|
])
|
|
126
130
|
}))
|
|
127
|
-
]), 1040, ["value", "colon", "read"]))
|
|
131
|
+
]), 1040, ["value", "colon", "read", "label-empty"]))
|
|
128
132
|
], 64))), 128)),
|
|
129
|
-
|
|
130
|
-
e.showButtons ? (r(),
|
|
131
|
-
default:
|
|
132
|
-
|
|
133
|
+
d(e.$slots, "default", {}, void 0, !0),
|
|
134
|
+
e.showButtons ? (r(), a(A, b({ key: 2 }, u(q), { class: e.buttonsClass }), {
|
|
135
|
+
default: s(() => [
|
|
136
|
+
H(h, {
|
|
133
137
|
type: "primary",
|
|
134
|
-
class:
|
|
138
|
+
class: J(e.confirmClassName),
|
|
135
139
|
loading: e.loading && e.showBtnLoading,
|
|
136
|
-
onClick: t[0] || (t[0] = (o) =>
|
|
140
|
+
onClick: t[0] || (t[0] = (o) => C(i.value))
|
|
137
141
|
}, {
|
|
138
|
-
default:
|
|
139
|
-
|
|
142
|
+
default: s(() => [
|
|
143
|
+
E(K(e.confirmText), 1)
|
|
140
144
|
]),
|
|
141
145
|
_: 1
|
|
142
146
|
}, 8, ["class", "loading"]),
|
|
143
|
-
e.showReset ? (r(),
|
|
147
|
+
e.showReset ? (r(), a(h, {
|
|
144
148
|
key: 0,
|
|
145
|
-
onClick: t[1] || (t[1] = (o) =>
|
|
149
|
+
onClick: t[1] || (t[1] = (o) => D(i.value))
|
|
146
150
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
|
|
151
|
+
default: s(() => [
|
|
152
|
+
E(" 重置 ")
|
|
149
153
|
]),
|
|
150
154
|
_: 1
|
|
151
155
|
})) : R("", !0)
|
|
@@ -154,7 +158,7 @@ const oe = I({
|
|
|
154
158
|
}, 16, ["class"])) : R("", !0)
|
|
155
159
|
]),
|
|
156
160
|
_: 3
|
|
157
|
-
}, 16, ["label-width", "model", "disabled"]);
|
|
161
|
+
}, 16, ["label-width", "hide-required-asterisk", "model", "disabled"]);
|
|
158
162
|
};
|
|
159
163
|
}
|
|
160
164
|
});
|
|
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-0f98dca0"]]);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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0f98dca0"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|