@lingshugroup/web-plus 1.5.0 → 1.5.1

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.
@@ -1 +1 @@
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,alignCenter:!0}),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,C)=>{const q=D.ElScrollbar,h=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":C[0]||(C[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(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,["class","modelValue","show-close"])}}});exports.default=E;
1
+ "use strict";var _=Object.defineProperty;var n=(r,a)=>_(r,"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"),D=,/* empty css */h=,/* empty css */s=,/* empty css */x=,/* empty css */M=,/* empty css */P=,/* empty css */$={key:1,class:"content-wrap"},E={class:"dialog-footer"},L=e.defineComponent({name:"LSDialog",inheritAttrs:!1,__name:"Index",props:e.mergeModels(h.lsDialogProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(h.lsEmitNames,["update:modelValue"]),setup(r,{expose:a,emit:k}){const l=r,i=k,S=e.useSlots(),t=e.useModel(r,"modelValue"),v=D.useNamespace("dialog").b(),d=e.ref(),u=e.ref({width:"50%",closeOnClickModal:!1,closeOnPressEscape:!1,zIndex:2e3,alignCenter:!0}),c=e.ref(0);e.watch(()=>t==null?void 0:t.value,o=>{o&&l.openScroll&&g()},{immediate:!0,deep:!0});const f=e.computed(()=>s.default({txt:"取消"},l.btnCancelConfig)),m=e.computed(()=>s.default({type:"primary",txt:"确认"},l.btnConfirmConfig));function y(){i("onCancel")}n(y,"handleClose");function B(){t.value=!1}n(B,"handleBtnClose");function q(){i("onConfirm")}n(q,"handleConfirm");async function g(){await e.nextTick();const o=l.hasFooter?108:60;c.value=parseInt(getComputedStyle(d.value.querySelector(".el-dialog")).height)-o}return n(g,"updateHeight"),a({updateHeight:g}),(o,p)=>{const w=x.ElScrollbar,C=e.resolveComponent("LSButton"),V=M.ElDialog,b=P.vLoading;return e.openBlock(),e.createBlock(V,e.mergeProps({ref_key:"lsDialogRef",ref:d,class:e.unref(v),modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=N=>t.value=N)},e.unref(s.default)(e.unref(u),o.$attrs),{"show-close":!o.loading,onClose:y}),e.createSlots({header:e.withCtx(()=>[e.renderSlot(o.$slots,"header")]),default:e.withCtx(()=>[o.openScroll?e.withDirectives((e.openBlock(),e.createBlock(w,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"])),[[b,o.contentLoading]]):(e.openBlock(),e.createElementBlock("div",$,[e.renderSlot(o.$slots,"default")]))]),_:2},[o.hasFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",E,[e.unref(S).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:B}),{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:q}),{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=L;
@@ -1,100 +1,104 @@
1
- var H = Object.defineProperty;
2
- var s = (n, c) => H(n, "name", { value: c, configurable: !0 });
1
+ var O = Object.defineProperty;
2
+ var l = (a, c) => O(a, "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
- 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";
8
+ import { defineComponent as R, mergeModels as V, useSlots as T, useModel as q, ref as f, watch as z, computed as b, nextTick as U, resolveComponent as j, openBlock as r, createBlock as u, mergeProps as i, unref as o, createSlots as x, withCtx as n, renderSlot as d, withDirectives as G, createElementBlock as J, createElementVNode as K, createCommentVNode as w, createTextVNode as D, toDisplayString as _, createVNode as Q } 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
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.5.13_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.5.13_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.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/loading/src/directive/index.js";
15
- const oe = {
12
+ import { ElScrollbar as Z } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_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.5.13_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.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/loading/src/directive/index.js";
15
+ const te = {
16
16
  key: 1,
17
17
  class: "content-wrap"
18
- }, te = { class: "dialog-footer" }, Ce = /* @__PURE__ */ O({
18
+ }, ne = { class: "dialog-footer" }, ke = /* @__PURE__ */ R({
19
19
  name: "LSDialog",
20
20
  inheritAttrs: !1,
21
21
  __name: "Index",
22
- props: /* @__PURE__ */ b(W, {
22
+ props: /* @__PURE__ */ V(X, {
23
23
  modelValue: {
24
24
  type: Boolean
25
25
  },
26
26
  modelModifiers: {}
27
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({
28
+ emits: /* @__PURE__ */ V(Y, ["update:modelValue"]),
29
+ setup(a, { expose: c, emit: E }) {
30
+ const s = a, p = E, N = T(), t = q(a, "modelValue"), $ = W("dialog").b(), g = f(), h = f({
31
31
  width: "50%",
32
32
  closeOnClickModal: !1,
33
33
  closeOnPressEscape: !1,
34
34
  zIndex: 2e3,
35
35
  alignCenter: !0
36
36
  }), C = f(0);
37
- q(
37
+ z(
38
38
  () => t == null ? void 0 : t.value,
39
39
  (e) => {
40
- e && a.openScroll && S();
40
+ e && s.openScroll && v();
41
41
  },
42
42
  {
43
43
  immediate: !0,
44
44
  deep: !0
45
45
  }
46
46
  );
47
- const k = w(() => m(
47
+ const k = b(() => m(
48
48
  {
49
49
  txt: "取消"
50
50
  },
51
- a.btnCancelConfig
52
- )), y = w(() => m(
51
+ s.btnCancelConfig
52
+ )), y = b(() => m(
53
53
  {
54
54
  type: "primary",
55
55
  txt: "确认"
56
56
  },
57
- a.btnConfirmConfig
57
+ s.btnConfirmConfig
58
58
  ));
59
- function v() {
60
- t.value = !1, p("onCancel");
59
+ function L() {
60
+ p("onCancel");
61
61
  }
62
- s(v, "handleClose");
62
+ l(L, "handleClose");
63
63
  function M() {
64
+ t.value = !1;
65
+ }
66
+ l(M, "handleBtnClose");
67
+ function I() {
64
68
  p("onConfirm");
65
69
  }
66
- s(M, "handleConfirm");
67
- async function S() {
68
- await z();
69
- const e = a.hasFooter ? 108 : 60;
70
+ l(I, "handleConfirm");
71
+ async function v() {
72
+ await U();
73
+ const e = s.hasFooter ? 108 : 60;
70
74
  C.value = parseInt(getComputedStyle(g.value.querySelector(".el-dialog")).height) - e;
71
75
  }
72
- return s(S, "updateHeight"), c({
73
- updateHeight: S
74
- }), (e, V) => {
75
- const I = Y, B = U("LSButton"), P = Z, A = ee;
76
- return r(), u(P, i({
76
+ return l(v, "updateHeight"), c({
77
+ updateHeight: v
78
+ }), (e, S) => {
79
+ const P = Z, B = j("LSButton"), A = ee, F = oe;
80
+ return r(), u(A, i({
77
81
  ref_key: "lsDialogRef",
78
82
  ref: g,
79
- class: o(L),
83
+ class: o($),
80
84
  modelValue: t.value,
81
- "onUpdate:modelValue": V[0] || (V[0] = (F) => t.value = F)
85
+ "onUpdate:modelValue": S[0] || (S[0] = (H) => t.value = H)
82
86
  }, o(m)(o(h), e.$attrs), {
83
87
  "show-close": !e.loading,
84
- onClose: v
85
- }), j({
86
- header: l(() => [
88
+ onClose: L
89
+ }), x({
90
+ header: n(() => [
87
91
  d(e.$slots, "header")
88
92
  ]),
89
- default: l(() => [
90
- e.openScroll ? x((r(), u(I, i({ key: 0 }, o(m)(o(h), e.$attrs), { "max-height": o(C) }), {
91
- default: l(() => [
93
+ default: n(() => [
94
+ e.openScroll ? G((r(), u(P, i({ key: 0 }, o(m)(o(h), e.$attrs), { "max-height": o(C) }), {
95
+ default: n(() => [
92
96
  d(e.$slots, "default")
93
97
  ]),
94
98
  _: 3
95
99
  }, 16, ["max-height"])), [
96
- [A, e.contentLoading]
97
- ]) : (r(), G("div", oe, [
100
+ [F, e.contentLoading]
101
+ ]) : (r(), J("div", te, [
98
102
  d(e.$slots, "default")
99
103
  ]))
100
104
  ]),
@@ -102,25 +106,25 @@ const oe = {
102
106
  }, [
103
107
  e.hasFooter ? {
104
108
  name: "footer",
105
- fn: l(() => [
106
- J("div", te, [
107
- o($).footer ? d(e.$slots, "footer", { key: 0 }) : D("", !0),
109
+ fn: n(() => [
110
+ K("div", ne, [
111
+ o(N).footer ? d(e.$slots, "footer", { key: 0 }) : w("", !0),
108
112
  e.hasCancelBtn ? (r(), u(B, i({ key: 1 }, o(k), {
109
113
  disabled: e.loading,
110
- onClick: v
114
+ onClick: M
111
115
  }), {
112
- default: l(() => [
113
- _(E(o(k).txt), 1)
116
+ default: n(() => [
117
+ D(_(o(k).txt), 1)
114
118
  ]),
115
119
  _: 1
116
- }, 16, ["disabled"])) : D("", !0),
117
- K(B, i(o(y), {
120
+ }, 16, ["disabled"])) : w("", !0),
121
+ Q(B, i(o(y), {
118
122
  loading: e.loading,
119
123
  disabled: e.loading,
120
- onClick: M
124
+ onClick: I
121
125
  }), {
122
- default: l(() => [
123
- _(E(o(y).txt), 1)
126
+ default: n(() => [
127
+ D(_(o(y).txt), 1)
124
128
  ]),
125
129
  _: 1
126
130
  }, 16, ["loading", "disabled"])
@@ -133,5 +137,5 @@ const oe = {
133
137
  }
134
138
  });
135
139
  export {
136
- Ce as default
140
+ ke as default
137
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",