@lingshugroup/web-plus 1.0.21 → 1.0.22

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.
Files changed (29) hide show
  1. package/README.md +2 -2
  2. package/lib/dialog/index.cjs +1 -1
  3. package/lib/dialog/index.js +7 -6
  4. package/lib/index/index.cjs +1 -1
  5. package/lib/index/index.js +55 -54
  6. package/lib/index/index.js.br +0 -0
  7. package/lib/index/index.js.gz +0 -0
  8. package/lib/index.css +1 -1
  9. package/lib/index.css.br +0 -0
  10. package/lib/index.css.gz +0 -0
  11. package/lib/packages/ls-components/components/descriptions/Index.vue/index.cjs +1 -1
  12. package/lib/packages/ls-components/components/descriptions/Index.vue/index.js +1 -1
  13. package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
  14. package/lib/packages/ls-components/components/dialog/Index.vue/index.js +134 -5
  15. package/lib/packages/ls-components/components/dialog/Index.vue/index.js.br +0 -0
  16. package/lib/packages/ls-components/components/dialog/Index.vue/index.js.gz +0 -0
  17. package/lib/packages/ls-components/components/dialog/Index.vue/index3.cjs +1 -0
  18. package/lib/packages/ls-components/components/dialog/Index.vue/index3.js +5 -0
  19. package/lib/packages/ls-components/components/preview/components/Xlsx.vue/index.cjs +1 -1
  20. package/lib/packages/ls-components/components/preview/components/Xlsx.vue/index.js +2 -2
  21. package/lib/packages/ls-components/components/preview/components/Xlsx.vue/index2.cjs +1 -1
  22. package/lib/packages/ls-components/components/preview/components/Xlsx.vue/index2.js +1 -1
  23. package/lib/packages/ls-components/components/preview/components/Xlsx.vue/index2.js.br +0 -0
  24. package/lib/packages/ls-components/components/preview/components/Xlsx.vue/index2.js.gz +0 -0
  25. package/package.json +1 -1
  26. package/lib/packages/ls-components/components/dialog/Index.vue/index2.cjs +0 -1
  27. package/lib/packages/ls-components/components/dialog/Index.vue/index2.js +0 -139
  28. package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.br +0 -0
  29. package/lib/packages/ls-components/components/dialog/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=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-eb7461ce"]]);exports.default=u;
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-7a22ee84"]]);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 s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-eb7461ce"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7a22ee84"]]);
5
5
  export {
6
6
  s 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 */u=t.default(e.default,[["__scopeId","data-v-1166dfbd"]]);exports.default=u;
1
+ "use strict";var N=Object.defineProperty;var l=(n,a)=>N(n,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),_=,/* empty css */k=,/* empty css */s=,/* empty css */D=,/* empty css */x=,/* empty css */M=,/* empty css */P={key:1,class:"content-wrap"},$={class:"dialog-footer"},E=e.defineComponent({name:"LSDialog",inheritAttrs:!1,__name:"Index",props:e.mergeModels(k.lsDialogProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(k.lsEmitNames,["update:modelValue"]),setup(n,{expose:a,emit:S}){const r=n,i=S,v=e.useSlots(),t=e.useModel(n,"modelValue"),y=_.useNamespace("dialog").b(),d=e.ref(),u=e.ref({width:"50%",closeOnClickModal:!1,closeOnPressEscape:!1,zIndex:2e3}),c=e.ref(0);e.watch(()=>t==null?void 0:t.value,o=>{o&&r.openScroll&&p()},{immediate:!0,deep:!0});const f=e.computed(()=>s.default({txt:"取消"},r.btnCancelConfig)),m=e.computed(()=>s.default({type:"primary",txt:"确认"},r.btnConfirmConfig));function g(){t.value=!1,i("onCancel")}l(g,"handleClose");function B(){i("onConfirm")}l(B,"handleConfirm");async function p(){await e.nextTick();const o=r.hasFooter?108:60;c.value=parseInt(getComputedStyle(d.value.querySelector(".el-dialog")).height)-o}return l(p,"updateHeight"),a({updateHeight:p}),(o,h)=>{const q=D.ElScrollbar,C=e.resolveComponent("LSButton"),w=x.ElDialog,V=M.vLoading;return e.openBlock(),e.createBlock(w,e.mergeProps({ref_key:"lsDialogRef",ref:d,class:e.unref(y),modelValue:t.value,"onUpdate:modelValue":h[0]||(h[0]=b=>t.value=b)},e.unref(s.default)(e.unref(u),o.$attrs),{"show-close":!o.loading,onClose:g}),e.createSlots({header:e.withCtx(()=>[e.renderSlot(o.$slots,"header")]),default:e.withCtx(()=>[o.openScroll?e.withDirectives((e.openBlock(),e.createBlock(q,e.mergeProps({key:0},e.unref(s.default)(e.unref(u),o.$attrs),{"max-height":e.unref(c)}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["max-height"])),[[V,o.contentLoading]]):(e.openBlock(),e.createElementBlock("div",P,[e.renderSlot(o.$slots,"default")]))]),_:2},[o.hasFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",$,[e.unref(v).footer?e.renderSlot(o.$slots,"footer",{key:0}):e.createCommentVNode("",!0),o.hasCancelBtn?(e.openBlock(),e.createBlock(C,e.mergeProps({key:1},e.unref(f),{disabled:o.loading,onClick:g}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f).txt),1)]),_:1},16,["disabled"])):e.createCommentVNode("",!0),e.createVNode(C,e.mergeProps(e.unref(m),{loading:o.loading,disabled:o.loading,onClick:B}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m).txt),1)]),_:1},16,["loading","disabled"])])]),key:"0"}:void 0]),1040,["class","modelValue","show-close"])}}});exports.default=E;
@@ -1,7 +1,136 @@
1
- import o from "./index2.js";
2
- /* empty css */
3
- import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1166dfbd"]]);
1
+ var H = Object.defineProperty;
2
+ var s = (n, c) => H(n, "name", { value: c, configurable: !0 });
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ import { defineComponent as O, mergeModels as b, useSlots as R, useModel as T, ref as f, watch as q, computed as w, nextTick as z, resolveComponent as U, openBlock as r, createBlock as u, mergeProps as i, unref as o, createSlots as j, withCtx as l, renderSlot as d, withDirectives as x, createElementBlock as G, createElementVNode as J, createCommentVNode as D, createTextVNode as _, toDisplayString as E, createVNode as K } from "vue";
9
+ import { useNamespace as Q } from "../../_hooks/useNamespace/index.js";
10
+ import { lsDialogProp as W, lsEmitNames as X } from "../types/index.js";
11
+ import m from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
12
+ import { ElScrollbar 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/scrollbar/index/index.js";
13
+ import { ElDialog as Z } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/dialog/index/index.js";
14
+ import { vLoading as ee } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/loading/src/directive/index.js";
15
+ const oe = {
16
+ key: 1,
17
+ class: "content-wrap"
18
+ }, te = { class: "dialog-footer" }, Ce = /* @__PURE__ */ O({
19
+ name: "LSDialog",
20
+ inheritAttrs: !1,
21
+ __name: "Index",
22
+ props: /* @__PURE__ */ b(W, {
23
+ modelValue: {
24
+ type: Boolean
25
+ },
26
+ modelModifiers: {}
27
+ }),
28
+ emits: /* @__PURE__ */ b(X, ["update:modelValue"]),
29
+ setup(n, { expose: c, emit: N }) {
30
+ const a = n, p = N, $ = R(), t = T(n, "modelValue"), L = Q("dialog").b(), g = f(), h = f({
31
+ width: "50%",
32
+ closeOnClickModal: !1,
33
+ closeOnPressEscape: !1,
34
+ zIndex: 2e3
35
+ }), C = f(0);
36
+ q(
37
+ () => t == null ? void 0 : t.value,
38
+ (e) => {
39
+ e && a.openScroll && S();
40
+ },
41
+ {
42
+ immediate: !0,
43
+ deep: !0
44
+ }
45
+ );
46
+ const k = w(() => m(
47
+ {
48
+ txt: "取消"
49
+ },
50
+ a.btnCancelConfig
51
+ )), y = w(() => m(
52
+ {
53
+ type: "primary",
54
+ txt: "确认"
55
+ },
56
+ a.btnConfirmConfig
57
+ ));
58
+ function v() {
59
+ t.value = !1, p("onCancel");
60
+ }
61
+ s(v, "handleClose");
62
+ function M() {
63
+ p("onConfirm");
64
+ }
65
+ s(M, "handleConfirm");
66
+ async function S() {
67
+ await z();
68
+ const e = a.hasFooter ? 108 : 60;
69
+ C.value = parseInt(getComputedStyle(g.value.querySelector(".el-dialog")).height) - e;
70
+ }
71
+ return s(S, "updateHeight"), c({
72
+ updateHeight: S
73
+ }), (e, V) => {
74
+ const I = Y, B = U("LSButton"), P = Z, A = ee;
75
+ return r(), u(P, i({
76
+ ref_key: "lsDialogRef",
77
+ ref: g,
78
+ class: o(L),
79
+ modelValue: t.value,
80
+ "onUpdate:modelValue": V[0] || (V[0] = (F) => t.value = F)
81
+ }, o(m)(o(h), e.$attrs), {
82
+ "show-close": !e.loading,
83
+ onClose: v
84
+ }), j({
85
+ header: l(() => [
86
+ d(e.$slots, "header")
87
+ ]),
88
+ default: l(() => [
89
+ e.openScroll ? x((r(), u(I, i({ key: 0 }, o(m)(o(h), e.$attrs), { "max-height": o(C) }), {
90
+ default: l(() => [
91
+ d(e.$slots, "default")
92
+ ]),
93
+ _: 3
94
+ }, 16, ["max-height"])), [
95
+ [A, e.contentLoading]
96
+ ]) : (r(), G("div", oe, [
97
+ d(e.$slots, "default")
98
+ ]))
99
+ ]),
100
+ _: 2
101
+ }, [
102
+ e.hasFooter ? {
103
+ name: "footer",
104
+ fn: l(() => [
105
+ J("div", te, [
106
+ o($).footer ? d(e.$slots, "footer", { key: 0 }) : D("", !0),
107
+ e.hasCancelBtn ? (r(), u(B, i({ key: 1 }, o(k), {
108
+ disabled: e.loading,
109
+ onClick: v
110
+ }), {
111
+ default: l(() => [
112
+ _(E(o(k).txt), 1)
113
+ ]),
114
+ _: 1
115
+ }, 16, ["disabled"])) : D("", !0),
116
+ K(B, i(o(y), {
117
+ loading: e.loading,
118
+ disabled: e.loading,
119
+ onClick: M
120
+ }), {
121
+ default: l(() => [
122
+ _(E(o(y).txt), 1)
123
+ ]),
124
+ _: 1
125
+ }, 16, ["loading", "disabled"])
126
+ ])
127
+ ]),
128
+ key: "0"
129
+ } : void 0
130
+ ]), 1040, ["class", "modelValue", "show-close"]);
131
+ };
132
+ }
133
+ });
5
134
  export {
6
- f as default
135
+ Ce as default
7
136
  };
@@ -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;
@@ -0,0 +1,5 @@
1
+ import o from "./index.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -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-af24afd9"]]);exports.default=u;
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-5d122118"]]);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-af24afd9"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5d122118"]]);
5
5
  export {
6
- m as default
6
+ s as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var C=Object.defineProperty;var t=(o,c)=>C(o,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../_hooks/useNamespace/index.cjs"),m=require("../../types/index.cjs"),a=require("../../../_utils/utils/index.cjs"),g=require("../../../_utils/check/index.cjs"),_=require("luckyexcel"),b=t(o=>(e.pushScopeId("data-v-af24afd9"),o=o(),e.popScopeId(),o),"_withScopeId"),v=b(()=>e.createElementVNode("div",{id:"luckysheet",class:"luckysheet-wrap"},null,-1)),B=e.defineComponent({name:"LSXlsx"}),S=e.defineComponent({...B,props:m.xlsxProps,emits:m.previewEmits,setup(o,{emit:c}){const u=[{id:"luckysheet1",src:"/luckysheet/plugins/js/plugin.js"},{id:"luckysheet2",src:"/luckysheet/luckysheet.umd.js"}],f=[{id:"luckysheetCss1",src:"/luckysheet/plugins/css/pluginsCss.css"},{id:"luckysheetCss2",src:"/luckysheet/plugins/plugins.css"},{id:"luckysheetCss3",src:"/luckysheet/css/luckysheet.css"},{id:"luckysheetCss4",src:"/luckysheet/assets/iconfont/iconfont.css"}],n=w.useNamespace("xlsx"),p=n.b(),i=o,r=c;e.watch(()=>i.source,s=>{k(s)},{immediate:!0,deep:!0});function d(){const s=document.scripts;for(let l=0;l<s.length;l++)if(s[l].src.includes("luckysheet"))return!0;return!1}t(d,"isLuckySheet");const y=t(()=>{i.onClose&&i.onClose(),r("update:source",[])},"closeFunc");async function k(s){if(!(!s||!g.isFile(s)))try{d()||(await a.loadCss(f),await a.loadJs(u)),_.transformExcelToLucky(s,function(l){l.sheets!=null&&(window.luckysheet.destroy(),window.luckysheet.create({container:"luckysheet",data:l.sheets,title:l.info.name,lang:"zh",gridKey:new Date().getTime(),showinfobar:!1,allowEdit:!1,allowCopy:!1,allowUpdate:!1,showtoolbar:!1,enableAddRow:!1,enableAddBackTop:!1,sheetFormulaBar:!1,showstatisticBar:!1,showsheetbar:!1,forceCalculation:!0,showConfigWindowResize:!1,showsheetbarConfig:{sheet:!0},sheetRightClickConfig:{delete:!1,copy:!1,rename:!1,color:!1,hide:!1,move:!1},cellRightClickConfig:{copy:!1,copyAs:!1,paste:!1,insertRow:!1,insertColumn:!1,deleteRow:!1,deleteColumn:!1,deleteCell:!1,hideRow:!1,hideColumn:!1,rowHeight:!1,columnWidth:!1,clear:!1,matrix:!1,sort:!1,filter:!1,chart:!1,image:!1,link:!1,data:!1,cellFormat:!1},hook:{cellUpdateBefore:t(()=>!1,"cellUpdateBefore"),imageDeleteBefore:t(()=>!1,"imageDeleteBefore"),imageUpdateBefore:t(()=>!1,"imageUpdateBefore")}}))}),r("loadComplete")}catch{r("loadError")}}return t(k,"initXlsx"),e.onBeforeUnmount(()=>{d()||(a.removeCss(f),a.removeJs(u))}),(s,l)=>{const h=e.resolveComponent("LSIcon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(p))},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(n).e("btn"),e.unref(n).e("close")]),onClick:y},[e.createVNode(h,{name:"Close",size:24,color:"#FFF"})],2),v],2)}}});exports.default=S;
1
+ "use strict";var C=Object.defineProperty;var t=(o,a)=>C(o,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../_hooks/useNamespace/index.cjs"),m=require("../../types/index.cjs"),c=require("../../../_utils/utils/index.cjs"),g=require("../../../_utils/check/index.cjs"),_=require("luckyexcel"),b=t(o=>(e.pushScopeId("data-v-5d122118"),o=o(),e.popScopeId(),o),"_withScopeId"),v=b(()=>e.createElementVNode("div",{id:"luckysheet",class:"luckysheet-wrap"},null,-1)),B=e.defineComponent({name:"LSXlsx"}),S=e.defineComponent({...B,props:m.xlsxProps,emits:m.previewEmits,setup(o,{emit:a}){const u=[{id:"luckysheet1",src:"/luckysheet/plugins/js/plugin.js"},{id:"luckysheet2",src:"/luckysheet/luckysheet.umd.js"}],f=[{id:"luckysheetCss1",src:"/luckysheet/plugins/css/pluginsCss.css"},{id:"luckysheetCss2",src:"/luckysheet/plugins/plugins.css"},{id:"luckysheetCss3",src:"/luckysheet/css/luckysheet.css"},{id:"luckysheetCss4",src:"/luckysheet/assets/iconfont/iconfont.css"}],n=w.useNamespace("xlsx"),p=n.b(),i=o,r=a;e.watch(()=>i.source,s=>{k(s)},{immediate:!0,deep:!0});function d(){const s=document.scripts;for(let l=0;l<s.length;l++)if(s[l].src.includes("luckysheet"))return!0;return!1}t(d,"isLuckySheet");const y=t(()=>{i.onClose&&i.onClose(),r("update:source",[])},"closeFunc");async function k(s){if(!(!s||!g.isFile(s)))try{d()||(await c.loadCss(f),await c.loadJs(u)),_.transformExcelToLucky(s,function(l){l.sheets!=null&&(window.luckysheet.destroy(),window.luckysheet.create({container:"luckysheet",data:l.sheets,title:l.info.name,lang:"zh",gridKey:new Date().getTime(),showinfobar:!1,allowEdit:!1,allowCopy:!1,allowUpdate:!1,showtoolbar:!1,enableAddRow:!1,enableAddBackTop:!1,sheetFormulaBar:!1,showstatisticBar:!1,showsheetbar:!1,forceCalculation:!0,showConfigWindowResize:!1,showsheetbarConfig:{sheet:!0},sheetRightClickConfig:{delete:!1,copy:!1,rename:!1,color:!1,hide:!1,move:!1},cellRightClickConfig:{copy:!1,copyAs:!1,paste:!1,insertRow:!1,insertColumn:!1,deleteRow:!1,deleteColumn:!1,deleteCell:!1,hideRow:!1,hideColumn:!1,rowHeight:!1,columnWidth:!1,clear:!1,matrix:!1,sort:!1,filter:!1,chart:!1,image:!1,link:!1,data:!1,cellFormat:!1},hook:{cellUpdateBefore:t(()=>!1,"cellUpdateBefore"),imageDeleteBefore:t(()=>!1,"imageDeleteBefore"),imageUpdateBefore:t(()=>!1,"imageUpdateBefore")}}))}),r("loadComplete")}catch{r("loadError")}}return t(k,"initXlsx"),e.onBeforeUnmount(()=>{d()||(c.removeCss(f),c.removeJs(u))}),(s,l)=>{const h=e.resolveComponent("LSIcon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(p))},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(n).e("btn"),e.unref(n).e("close")]),onClick:y},[e.createVNode(h,{name:"Close",size:24,color:"#FFF"})],2),v],2)}}});exports.default=S;
@@ -6,7 +6,7 @@ import { xlsxProps as S, previewEmits as v } from "../../types/index.js";
6
6
  import { loadCss as I, loadJs as j, removeCss as z, removeJs as U } from "../../../_utils/utils/index.js";
7
7
  import { isFile as A } from "../../../_utils/check/index.js";
8
8
  import N from "luckyexcel";
9
- const T = /* @__PURE__ */ l((t) => (E("data-v-af24afd9"), t = t(), F(), t), "_withScopeId"), D = /* @__PURE__ */ T(() => /* @__PURE__ */ p("div", {
9
+ const T = /* @__PURE__ */ l((t) => (E("data-v-5d122118"), t = t(), F(), t), "_withScopeId"), D = /* @__PURE__ */ T(() => /* @__PURE__ */ p("div", {
10
10
  id: "luckysheet",
11
11
  class: "luckysheet-wrap"
12
12
  }, null, -1)), V = h({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",
@@ -1 +0,0 @@
1
- "use strict";var N=Object.defineProperty;var r=(n,s)=>N(n,"name",{value:s,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),_=,/* empty css */v=,/* empty css */l=,/* empty css */D=,/* empty css */x=,/* empty css */E=,/* empty css */M={key:1,class:"content-wrap"},P={class:"dialog-footer"},$=e.defineComponent({name:"LSDialog",inheritAttrs:!1,__name:"Index",props:e.mergeModels(v.lsDialogProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(v.lsEmitNames,["update:modelValue"]),setup(n,{expose:s,emit:k}){const a=n,i=k,S=e.useSlots(),t=e.useModel(n,"modelValue"),y=_.useNamespace("dialog").b(),d=e.ref(),u=e.ref({width:"50%",closeOnClickModal:!1,closeOnPressEscape:!1,zIndex:2e3}),c=e.ref(0);e.watch(()=>t==null?void 0:t.value,o=>{o&&p()},{immediate:!0,deep:!0});const f=e.computed(()=>l.default({txt:"取消"},a.btnCancelConfig)),m=e.computed(()=>l.default({type:"primary",txt:"确认"},a.btnConfirmConfig));function g(){t.value=!1,i("onCancel")}r(g,"handleClose");function B(){i("onConfirm")}r(B,"handleConfirm");async function p(){await e.nextTick();const o=a.hasFooter?108:60;c.value=parseInt(getComputedStyle(d.value.querySelector(".el-dialog")).height)-o}return r(p,"updateHeight"),s({updateHeight:p}),(o,C)=>{const q=D.ElScrollbar,h=e.resolveComponent("LSButton"),w=x.ElDialog,V=E.vLoading;return e.openBlock(),e.createElementBlock("div",{ref_key:"lsDialogRef",ref:d,class:e.normalizeClass(e.unref(y))},[e.createVNode(w,e.mergeProps({modelValue:t.value,"onUpdate:modelValue":C[0]||(C[0]=b=>t.value=b)},e.unref(l.default)(e.unref(u),o.$attrs),{"show-close":!o.loading,onClose:g}),e.createSlots({header:e.withCtx(()=>[e.renderSlot(o.$slots,"header",{},void 0,!0)]),default:e.withCtx(()=>[o.openScroll?e.withDirectives((e.openBlock(),e.createBlock(q,e.mergeProps({key:0},e.unref(l.default)(e.unref(u),o.$attrs),{"max-height":e.unref(c)}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3},16,["max-height"])),[[V,o.contentLoading]]):(e.openBlock(),e.createElementBlock("div",M,[e.renderSlot(o.$slots,"default",{},void 0,!0)]))]),_:2},[o.hasFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",P,[e.unref(S).footer?e.renderSlot(o.$slots,"footer",{key:0},void 0,!0):e.createCommentVNode("",!0),o.hasCancelBtn?(e.openBlock(),e.createBlock(h,e.mergeProps({key:1},e.unref(f),{disabled:o.loading,onClick:g}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f).txt),1)]),_:1},16,["disabled"])):e.createCommentVNode("",!0),e.createVNode(h,e.mergeProps(e.unref(m),{loading:o.loading,disabled:o.loading,onClick:B}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m).txt),1)]),_:1},16,["loading","disabled"])])]),key:"0"}:void 0]),1040,["modelValue","show-close"])],2)}}});exports.default=$;
@@ -1,139 +0,0 @@
1
- var O = Object.defineProperty;
2
- var a = (n, m) => O(n, "name", { value: m, configurable: !0 });
3
- /* empty css */
4
- /* empty css */
5
- /* empty css */
6
- /* empty css */
7
- /* empty css */
8
- import { defineComponent as R, mergeModels as B, useSlots as T, useModel as q, ref as u, watch as U, computed as b, nextTick as j, resolveComponent as x, openBlock as s, createElementBlock as w, normalizeClass as G, unref as o, createVNode as D, mergeProps as r, createSlots as J, withCtx as l, renderSlot as i, withDirectives as K, createBlock as _, createElementVNode as Q, createCommentVNode as E, createTextVNode as N, toDisplayString as $ } from "vue";
9
- import { useNamespace as W } from "../../_hooks/useNamespace/index.js";
10
- import { lsDialogProp as X, lsEmitNames as Y } from "../types/index.js";
11
- import d from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
12
- import { ElScrollbar as Z } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/scrollbar/index/index.js";
13
- import { ElDialog as ee } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/dialog/index/index.js";
14
- import { vLoading as oe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/loading/src/directive/index.js";
15
- const te = {
16
- key: 1,
17
- class: "content-wrap"
18
- }, le = { class: "dialog-footer" }, ve = /* @__PURE__ */ R({
19
- name: "LSDialog",
20
- inheritAttrs: !1,
21
- __name: "Index",
22
- props: /* @__PURE__ */ B(X, {
23
- modelValue: {
24
- type: Boolean
25
- },
26
- modelModifiers: {}
27
- }),
28
- emits: /* @__PURE__ */ B(Y, ["update:modelValue"]),
29
- setup(n, { expose: m, emit: L }) {
30
- const c = n, f = L, M = T(), t = q(n, "modelValue"), I = W("dialog").b(), p = u(), g = u({
31
- width: "50%",
32
- closeOnClickModal: !1,
33
- closeOnPressEscape: !1,
34
- zIndex: 2e3
35
- }), h = u(0);
36
- U(
37
- () => t == null ? void 0 : t.value,
38
- (e) => {
39
- e && y();
40
- },
41
- {
42
- immediate: !0,
43
- deep: !0
44
- }
45
- );
46
- const C = b(() => d(
47
- {
48
- txt: "取消"
49
- },
50
- c.btnCancelConfig
51
- )), v = b(() => d(
52
- {
53
- type: "primary",
54
- txt: "确认"
55
- },
56
- c.btnConfirmConfig
57
- ));
58
- function k() {
59
- t.value = !1, f("onCancel");
60
- }
61
- a(k, "handleClose");
62
- function P() {
63
- f("onConfirm");
64
- }
65
- a(P, "handleConfirm");
66
- async function y() {
67
- await j();
68
- const e = c.hasFooter ? 108 : 60;
69
- h.value = parseInt(getComputedStyle(p.value.querySelector(".el-dialog")).height) - e;
70
- }
71
- return a(y, "updateHeight"), m({
72
- updateHeight: y
73
- }), (e, S) => {
74
- const z = Z, V = x("LSButton"), A = ee, F = oe;
75
- return s(), w("div", {
76
- ref_key: "lsDialogRef",
77
- ref: p,
78
- class: G(o(I))
79
- }, [
80
- D(A, r({
81
- modelValue: t.value,
82
- "onUpdate:modelValue": S[0] || (S[0] = (H) => t.value = H)
83
- }, o(d)(o(g), e.$attrs), {
84
- "show-close": !e.loading,
85
- onClose: k
86
- }), J({
87
- header: l(() => [
88
- i(e.$slots, "header", {}, void 0, !0)
89
- ]),
90
- default: l(() => [
91
- e.openScroll ? K((s(), _(z, r({ key: 0 }, o(d)(o(g), e.$attrs), { "max-height": o(h) }), {
92
- default: l(() => [
93
- i(e.$slots, "default", {}, void 0, !0)
94
- ]),
95
- _: 3
96
- }, 16, ["max-height"])), [
97
- [F, e.contentLoading]
98
- ]) : (s(), w("div", te, [
99
- i(e.$slots, "default", {}, void 0, !0)
100
- ]))
101
- ]),
102
- _: 2
103
- }, [
104
- e.hasFooter ? {
105
- name: "footer",
106
- fn: l(() => [
107
- Q("div", le, [
108
- o(M).footer ? i(e.$slots, "footer", { key: 0 }, void 0, !0) : E("", !0),
109
- e.hasCancelBtn ? (s(), _(V, r({ key: 1 }, o(C), {
110
- disabled: e.loading,
111
- onClick: k
112
- }), {
113
- default: l(() => [
114
- N($(o(C).txt), 1)
115
- ]),
116
- _: 1
117
- }, 16, ["disabled"])) : E("", !0),
118
- D(V, r(o(v), {
119
- loading: e.loading,
120
- disabled: e.loading,
121
- onClick: P
122
- }), {
123
- default: l(() => [
124
- N($(o(v).txt), 1)
125
- ]),
126
- _: 1
127
- }, 16, ["loading", "disabled"])
128
- ])
129
- ]),
130
- key: "0"
131
- } : void 0
132
- ]), 1040, ["modelValue", "show-close"])
133
- ], 2);
134
- };
135
- }
136
- });
137
- export {
138
- ve as default
139
- };