@lingshugroup/web-plus 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index/index.cjs +1 -1
- package/lib/index/index.js +20 -18
- 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/_utils/utils/index.cjs +1 -1
- package/lib/packages/ls-components/components/_utils/utils/index.js +120 -100
- package/lib/packages/ls-components/components/_utils/utils/index.js.br +0 -0
- package/lib/packages/ls-components/components/_utils/utils/index.js.gz +0 -0
- package/lib/packages/ls-components/components/editor/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/editor/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/editor/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/editor/Index.vue/index2.js +97 -71
- package/lib/packages/ls-components/components/editor/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/editor/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/editor/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/editor/types/index.js +7 -2
- package/lib/packages/ls-components/components/editor/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/editor/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/index/index.cjs +1 -1
- package/lib/packages/ls-components/components/index/index.js +21 -19
- package/lib/packages/ls-components/components/index/index.js.br +0 -0
- package/lib/packages/ls-components/components/index/index.js.gz +0 -0
- package/lib/packages/ls-components/components/layout/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/layout/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index2.js +49 -48
- package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/menu/Index.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 +65 -47
- 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 +12 -4
- package/lib/packages/ls-components/components/menu/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/menu/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index.cjs +1 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index.js +7 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.cjs +1 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js +51 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.gz +0 -0
- package/lib/tooltip/index.cjs +1 -0
- package/lib/tooltip/index.js +12 -0
- package/lib/types/components/_utils/utils.d.ts +1 -0
- package/lib/types/components/editor/Index.vue.d.ts +3 -0
- package/lib/types/components/editor/index.d.ts +6 -0
- package/lib/types/components/editor/types.d.ts +1 -0
- package/lib/types/components/menu/Index.vue.d.ts +3 -0
- package/lib/types/components/menu/MenuItem.vue.d.ts +3 -0
- package/lib/types/components/menu/index.d.ts +6 -0
- package/lib/types/components/menu/types.d.ts +2 -0
- package/lib/types/components/tooltip/Index.vue.d.ts +21 -0
- package/lib/types/components/tooltip/index.d.ts +6 -0
- package/lib/types/components/tooltip/types.d.ts +1 -0
- package/package.json +5 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var e = Object.defineProperty;
|
|
2
2
|
var i = (m, r) => e(m, "name", { value: r, configurable: !0 });
|
|
3
|
-
import * as
|
|
4
|
-
import { LSButtonGroup as
|
|
3
|
+
import * as p from "@element-plus/icons-vue";
|
|
4
|
+
import { LSButtonGroup as f, LSButton as L } from "../../../../button/index.js";
|
|
5
5
|
import S from "../../../../descriptions/index.js";
|
|
6
6
|
import { LSForm as n, LSFormItem as s } from "../../../../form/index.js";
|
|
7
7
|
import c from "../../../../table/index.js";
|
|
@@ -19,17 +19,18 @@ import x from "../../../../print/index.js";
|
|
|
19
19
|
import y from "../../../../containerBox/index.js";
|
|
20
20
|
import D from "../../../../backTop/index.js";
|
|
21
21
|
import I from "../../../../map/index.js";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
22
|
+
import T from "../../../../editor/index.js";
|
|
23
|
+
import g from "../../../../dialog/index.js";
|
|
24
|
+
import C from "../../../../layout/index.js";
|
|
25
|
+
import F from "../../../../list/index.js";
|
|
26
|
+
import M from "../../../../preview_image/index.js";
|
|
27
27
|
import j from "../../../../preview_docx/index.js";
|
|
28
28
|
import E from "../../../../preview_pdf/index.js";
|
|
29
29
|
import O from "../../../../preview_xlsx/index.js";
|
|
30
30
|
import h from "../../../../downloadFile/index.js";
|
|
31
|
+
import G from "../../../../tooltip/index.js";
|
|
31
32
|
const t = {
|
|
32
|
-
LSButtonGroup:
|
|
33
|
+
LSButtonGroup: f,
|
|
33
34
|
LSButton: L,
|
|
34
35
|
LSDescriptions: S,
|
|
35
36
|
LSUpload: a,
|
|
@@ -49,26 +50,27 @@ const t = {
|
|
|
49
50
|
LSContainerBox: y,
|
|
50
51
|
LSBackTop: D,
|
|
51
52
|
LSMap: I,
|
|
52
|
-
LSEditor:
|
|
53
|
-
LSDialog:
|
|
54
|
-
LSLayout:
|
|
55
|
-
LSList:
|
|
56
|
-
LSPreviewImage:
|
|
53
|
+
LSEditor: T,
|
|
54
|
+
LSDialog: g,
|
|
55
|
+
LSLayout: C,
|
|
56
|
+
LSList: F,
|
|
57
|
+
LSPreviewImage: M,
|
|
57
58
|
LSPreviewDocx: j,
|
|
58
59
|
LSPreviewPdf: E,
|
|
59
60
|
LSPreviewXlsx: O,
|
|
60
|
-
LSDownloadFile: h
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
LSDownloadFile: h,
|
|
62
|
+
LSTooltip: G
|
|
63
|
+
}, U = /* @__PURE__ */ i((m) => {
|
|
64
|
+
for (const [r, o] of Object.entries(p))
|
|
63
65
|
m.component(r, o);
|
|
64
66
|
for (const r of Object.keys(t)) {
|
|
65
67
|
const o = t[r];
|
|
66
68
|
m.component(o == null ? void 0 : o.name, o);
|
|
67
69
|
}
|
|
68
|
-
}, "install"),
|
|
70
|
+
}, "install"), ao = {
|
|
69
71
|
...t,
|
|
70
|
-
install:
|
|
72
|
+
install: U
|
|
71
73
|
};
|
|
72
74
|
export {
|
|
73
|
-
|
|
75
|
+
ao as default
|
|
74
76
|
};
|
|
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-cd7b1046"]]);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-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cd7b1046"]]);
|
|
5
5
|
export {
|
|
6
6
|
m 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 u=,/* empty css */t=u.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 u=,/* empty css */t=u.default(e.default,[["__scopeId","data-v-5237673e"]]);exports.default=t;
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5237673e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var A=Object.defineProperty;var o=(c,l)=>A(c,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("vue"),g=,/* empty css */h=,/* empty css */N=,/* empty css */B=,/* empty css */E=,/* empty css */D=s.defineComponent({name:"LSMenu"}),P=s.defineComponent({...D,props:h.lsMenuProps,emits:h.lsEmitNames,setup(c,{expose:l,emit:y}){s.useCssVars(e=>({"6ca42f51":e.hoverColor}));const{currentRouter:r}=N.default(),S=g.useNamespace("menu").b(),k=c,a=y,q=s.useAttrs(),C=s.ref(!1),_=s.ref(""),u=s.ref();s.watch(()=>k.permissionList,e=>{k.needPermission&&e&&e.length>0&&m()},{immediate:!0,deep:!0}),s.watch(()=>r.value,()=>{m()},{immediate:!0,deep:!0}),s.watch(()=>q["default-active"],async e=>{e&&(await s.nextTick(),f(e.toString()))},{immediate:!0,deep:!0});function m(){if(!C.value)return;const{meta:e}=(r==null?void 0:r.value)||{};_.value=(e==null?void 0:e.key)||"1"}o(m,"initMenuSider");function L(e){a("onJump",e)}o(L,"onJump");function M(e){const{key:i}=e;f(i),a("defineSubClick",e)}o(M,"defineSubClickFunc");function b(e){const{key:i}=e;f(i),a("defineChildClick",e)}o(b,"defineChildClickFunc");function f(e){if(u.value){let i=!1;const d=u.value.$el.querySelectorAll(".el-sub-menu"),n=u.value.$el.querySelectorAll(".el-menu-item"),p="is-sub-active",v="is-active";n.forEach(t=>{Array.from(t.classList).includes(v)&&t.classList.remove(v),e===t.dataset.index&&(i=!0,t.classList.add(v))}),d.forEach(t=>{Array.from(t.classList).includes(p)&&t.classList.remove(p),!i&&e===t.dataset.index&&t.classList.add(p)})}}return o(f,"updateActiveClass"),s.onMounted(()=>{C.value=!0,m()}),l({lsComMenuRef:u}),(e,i)=>{const d=E.ElMenu;return s.openBlock(),s.createBlock(d,s.mergeProps({ref_key:"lsComMenuRef",ref:u},e.$attrs,{class:s.unref(S),"default-active":s.unref(_)}),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.menuConfigList,n=>(s.openBlock(),s.createBlock(B.default,{key:n.key,item:n,"permission-list":e.permissionList,"need-permission":e.needPermission,"is-define-click":e.isDefineClick,"show-tooltip":e.showTooltip,onOnJump:L,onDefineSubClick:M,onDefineChildClick:b},{[n.iconSlot]:s.withCtx(()=>[s.renderSlot(e.$slots,n.iconSlot,{},void 0,!0)]),_:2},1032,["item","permission-list","need-permission","is-define-click","show-tooltip"]))),128))]),_:3},16,["class","default-active"])}}});exports.default=P;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var P = Object.defineProperty;
|
|
2
|
+
var o = (c, l) => P(c, "name", { value: l, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { defineComponent as b, useCssVars as B, useAttrs as F, ref as C, watch as k, nextTick as J, onMounted as q, openBlock as v, createBlock as
|
|
7
|
+
import { defineComponent as b, useCssVars as B, useAttrs as F, ref as C, watch as k, nextTick as J, onMounted as q, openBlock as v, createBlock as S, mergeProps as I, unref as A, withCtx as _, createElementBlock as R, Fragment as T, renderList as H, renderSlot as K } from "vue";
|
|
8
8
|
import { useNamespace as O } from "../../_hooks/useNamespace/index.js";
|
|
9
|
-
import { lsMenuProps as
|
|
9
|
+
import { lsMenuProps as j, lsEmitNames as x } from "../types/index.js";
|
|
10
10
|
import z from "../../_hooks/useRouterHook/index.js";
|
|
11
11
|
import G from "../MenuItem.vue/index.js";
|
|
12
12
|
import { ElMenu as Q } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/menu/index/index.js";
|
|
@@ -14,17 +14,17 @@ const U = b({
|
|
|
14
14
|
name: "LSMenu"
|
|
15
15
|
}), ce = /* @__PURE__ */ b({
|
|
16
16
|
...U,
|
|
17
|
-
props:
|
|
18
|
-
emits:
|
|
17
|
+
props: j,
|
|
18
|
+
emits: x,
|
|
19
19
|
setup(c, { expose: l, emit: M }) {
|
|
20
20
|
B((e) => ({
|
|
21
|
-
"
|
|
21
|
+
"6ca42f51": e.hoverColor
|
|
22
22
|
}));
|
|
23
|
-
const { currentRouter: r } = z(),
|
|
23
|
+
const { currentRouter: r } = z(), w = O("menu").b(), h = c, u = M, E = F(), y = C(!1), L = C(""), n = C();
|
|
24
24
|
k(
|
|
25
|
-
() =>
|
|
25
|
+
() => h.permissionList,
|
|
26
26
|
(e) => {
|
|
27
|
-
|
|
27
|
+
h.needPermission && e && e.length > 0 && a();
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
immediate: !0,
|
|
@@ -40,7 +40,7 @@ const U = b({
|
|
|
40
40
|
deep: !0
|
|
41
41
|
}
|
|
42
42
|
), k(
|
|
43
|
-
() =>
|
|
43
|
+
() => E["default-active"],
|
|
44
44
|
async (e) => {
|
|
45
45
|
e && (await J(), m(e.toString()));
|
|
46
46
|
},
|
|
@@ -50,66 +50,67 @@ const U = b({
|
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
function a() {
|
|
53
|
-
if (!
|
|
53
|
+
if (!y.value)
|
|
54
54
|
return;
|
|
55
55
|
const { meta: e } = (r == null ? void 0 : r.value) || {};
|
|
56
|
-
|
|
56
|
+
L.value = (e == null ? void 0 : e.key) || "1";
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
function
|
|
58
|
+
o(a, "initMenuSider");
|
|
59
|
+
function N(e) {
|
|
60
60
|
u("onJump", e);
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
function
|
|
64
|
-
const { key:
|
|
65
|
-
m(
|
|
62
|
+
o(N, "onJump");
|
|
63
|
+
function g(e) {
|
|
64
|
+
const { key: t } = e;
|
|
65
|
+
m(t), u("defineSubClick", e);
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
function
|
|
69
|
-
const { key:
|
|
70
|
-
m(
|
|
67
|
+
o(g, "defineSubClickFunc");
|
|
68
|
+
function D(e) {
|
|
69
|
+
const { key: t } = e;
|
|
70
|
+
m(t), u("defineChildClick", e);
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
o(D, "defineChildClickFunc");
|
|
73
73
|
function m(e) {
|
|
74
|
-
if (
|
|
75
|
-
let
|
|
76
|
-
const f =
|
|
77
|
-
|
|
78
|
-
Array.from(s.classList).includes(p) && s.classList.remove(p), e === s.dataset.index && (
|
|
74
|
+
if (n.value) {
|
|
75
|
+
let t = !1;
|
|
76
|
+
const f = n.value.$el.querySelectorAll(".el-sub-menu"), i = n.value.$el.querySelectorAll(".el-menu-item"), d = "is-sub-active", p = "is-active";
|
|
77
|
+
i.forEach((s) => {
|
|
78
|
+
Array.from(s.classList).includes(p) && s.classList.remove(p), e === s.dataset.index && (t = !0, s.classList.add(p));
|
|
79
79
|
}), f.forEach((s) => {
|
|
80
|
-
Array.from(s.classList).includes(d) && s.classList.remove(d), !
|
|
80
|
+
Array.from(s.classList).includes(d) && s.classList.remove(d), !t && e === s.dataset.index && s.classList.add(d);
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
return
|
|
85
|
-
|
|
84
|
+
return o(m, "updateActiveClass"), q(() => {
|
|
85
|
+
y.value = !0, a();
|
|
86
86
|
}), l({
|
|
87
|
-
lsComMenuRef:
|
|
88
|
-
}), (e,
|
|
87
|
+
lsComMenuRef: n
|
|
88
|
+
}), (e, t) => {
|
|
89
89
|
const f = Q;
|
|
90
|
-
return v(),
|
|
90
|
+
return v(), S(f, I({
|
|
91
91
|
ref_key: "lsComMenuRef",
|
|
92
|
-
ref:
|
|
92
|
+
ref: n
|
|
93
93
|
}, e.$attrs, {
|
|
94
|
-
class:
|
|
95
|
-
"default-active":
|
|
94
|
+
class: A(w),
|
|
95
|
+
"default-active": A(L)
|
|
96
96
|
}), {
|
|
97
|
-
default:
|
|
98
|
-
(v(!0), R(
|
|
99
|
-
key:
|
|
100
|
-
item:
|
|
97
|
+
default: _(() => [
|
|
98
|
+
(v(!0), R(T, null, H(e.menuConfigList, (i) => (v(), S(G, {
|
|
99
|
+
key: i.key,
|
|
100
|
+
item: i,
|
|
101
101
|
"permission-list": e.permissionList,
|
|
102
102
|
"need-permission": e.needPermission,
|
|
103
103
|
"is-define-click": e.isDefineClick,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
"show-tooltip": e.showTooltip,
|
|
105
|
+
onOnJump: N,
|
|
106
|
+
onDefineSubClick: g,
|
|
107
|
+
onDefineChildClick: D
|
|
107
108
|
}, {
|
|
108
|
-
[
|
|
109
|
-
K(e.$slots,
|
|
109
|
+
[i.iconSlot]: _(() => [
|
|
110
|
+
K(e.$slots, i.iconSlot, {}, void 0, !0)
|
|
110
111
|
]),
|
|
111
112
|
_: 2
|
|
112
|
-
}, 1032, ["item", "permission-list", "need-permission", "is-define-click"]))), 128))
|
|
113
|
+
}, 1032, ["item", "permission-list", "need-permission", "is-define-click", "show-tooltip"]))), 128))
|
|
113
114
|
]),
|
|
114
115
|
_: 3
|
|
115
116
|
}, 16, ["class", "default-active"]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var w=Object.defineProperty;var t=(r,m)=>w(r,"name",{value:m,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 */k=,/* empty css */g=,/* empty css */f=,/* empty css */v={class:"menu-title"},E={key:1,class:"menu-title"},M=e.defineComponent({name:"LSMenuItem"}),q=e.defineComponent({...M,props:k.lsMenuItemProps,emits:k.lsEmitNames,setup(r,{emit:m}){const{jumpRouteCom:C}=g.default(),o=m,u=r,y=t((i,n)=>{if(u.isDefineClick)p(n);else{const{link:l,defJump:d}=n||{};d?o("onJump",n):l?window.open(l,"_blank"):C(n)}},"jumpRoute");function S(i){o("onJump",i)}t(S,"onJump");function a(i){u.isDefineClick&&o("defineSubClick",i)}t(a,"defineSubClickFunc");function p(i){u.isDefineClick&&o("defineChildClick",i)}return t(p,"defineChildClickFunc"),(i,n)=>{const l=f.ElMenuItem,d=e.resolveComponent("MenuItem",!0),h=f.ElSubMenu;return!i.needPermission||i.permissionList.includes(i.item.pCode)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[!i.item.children||i.item.leaf?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:n[1]||(n[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(l,{index:i.item.key,"data-index":i.item.key,onClick:n[0]||(n[0]=s=>y(i.item.key,i.item))},{title:e.withCtx(()=>[i.showTooltip?(e.openBlock(),e.createBlock(B.default,{key:0,content:i.item.title,placement:"right"},{default:e.withCtx(()=>[e.createElementVNode("span",v,[e.createElementVNode("p",null,e.toDisplayString(i.item.title),1)])]),_:1},8,["content"])):(e.openBlock(),e.createElementBlock("span",E,[e.createElementVNode("p",null,e.toDisplayString(i.item.title),1)]))]),default:e.withCtx(()=>[e.createVNode(c.default,e.normalizeProps(e.guardReactiveProps(i.item.iconConfig)),e.createSlots({_:2},[i.item.iconSlot?{name:"default",fn:e.withCtx(()=>[e.renderSlot(i.$slots,i.item.iconSlot)]),key:"0"}:void 0]),1040)]),_:3},8,["index","data-index"])])):(e.openBlock(),e.createBlock(h,{key:1,index:i.item.key,"data-index":i.item.key,onClick:n[2]||(n[2]=e.withModifiers(s=>a(i.item),["stop"]))},{title:e.withCtx(()=>[e.createVNode(c.default,e.normalizeProps(e.guardReactiveProps(i.item.iconConfig)),e.createSlots({_:2},[i.item.iconSlot?{name:"default",fn:e.withCtx(()=>[e.renderSlot(i.$slots,i.item.iconSlot)]),key:"0"}:void 0]),1040),e.createElementVNode("span",null,e.toDisplayString(i.item.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.item.children,s=>(e.openBlock(),e.createBlock(d,{key:s.key,item:s,"permission-list":i.permissionList,"need-permission":i.needPermission,"is-define-click":i.isDefineClick,"show-tooltip":i.showTooltip,onOnJump:S,onDefineSubClick:a,onDefineChildClick:p},null,8,["item","permission-list","need-permission","is-define-click","show-tooltip"]))),128))]),_:3},8,["index","data-index"]))],64)):e.createCommentVNode("",!0)}}});exports.default=q;
|
|
@@ -1,60 +1,77 @@
|
|
|
1
1
|
var N = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var t = (u, d) => N(u, "name", { value: d, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { defineComponent as
|
|
6
|
+
import { defineComponent as I, resolveComponent as R, openBlock as n, createElementBlock as r, Fragment as h, withModifiers as w, createVNode as k, withCtx as o, createBlock as C, createElementVNode as p, toDisplayString as c, normalizeProps as v, guardReactiveProps as D, createSlots as M, renderSlot as b, renderList as $, createCommentVNode as B } from "vue";
|
|
7
7
|
import g from "../../icon/Index.vue/index.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import F from "../../tooltip/Index.vue/index.js";
|
|
9
|
+
import { lsMenuItemProps as T, lsEmitNames as V } from "../types/index.js";
|
|
10
|
+
import j from "../../_hooks/useRouterHook/index.js";
|
|
10
11
|
import { ElMenuItem as z, ElSubMenu as H } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/menu/index/index.js";
|
|
11
|
-
const O =
|
|
12
|
+
const O = { class: "menu-title" }, q = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "menu-title"
|
|
15
|
+
}, A = I({
|
|
12
16
|
name: "LSMenuItem"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
15
|
-
props:
|
|
16
|
-
emits:
|
|
17
|
-
setup(
|
|
18
|
-
const { jumpRouteCom:
|
|
19
|
-
if (
|
|
20
|
-
|
|
17
|
+
}), ee = /* @__PURE__ */ I({
|
|
18
|
+
...A,
|
|
19
|
+
props: T,
|
|
20
|
+
emits: V,
|
|
21
|
+
setup(u, { emit: d }) {
|
|
22
|
+
const { jumpRouteCom: L } = j(), l = d, f = u, E = /* @__PURE__ */ t((e, i) => {
|
|
23
|
+
if (f.isDefineClick)
|
|
24
|
+
S(i);
|
|
21
25
|
else {
|
|
22
|
-
const { link:
|
|
23
|
-
|
|
26
|
+
const { link: m, defJump: a } = i || {};
|
|
27
|
+
a ? l("onJump", i) : m ? window.open(m, "_blank") : L(i);
|
|
24
28
|
}
|
|
25
29
|
}, "jumpRoute");
|
|
26
|
-
function
|
|
27
|
-
|
|
30
|
+
function J(e) {
|
|
31
|
+
l("onJump", e);
|
|
28
32
|
}
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
33
|
+
t(J, "onJump");
|
|
34
|
+
function y(e) {
|
|
35
|
+
f.isDefineClick && l("defineSubClick", e);
|
|
32
36
|
}
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
37
|
+
t(y, "defineSubClickFunc");
|
|
38
|
+
function S(e) {
|
|
39
|
+
f.isDefineClick && l("defineChildClick", e);
|
|
36
40
|
}
|
|
37
|
-
return
|
|
38
|
-
const
|
|
39
|
-
return !e.needPermission || e.permissionList.includes(e.item.pCode) ? (
|
|
40
|
-
!e.item.children || e.item.leaf ? (
|
|
41
|
+
return t(S, "defineChildClickFunc"), (e, i) => {
|
|
42
|
+
const m = z, a = R("MenuItem", !0), P = H;
|
|
43
|
+
return !e.needPermission || e.permissionList.includes(e.item.pCode) ? (n(), r(h, { key: 0 }, [
|
|
44
|
+
!e.item.children || e.item.leaf ? (n(), r("div", {
|
|
41
45
|
key: 0,
|
|
42
|
-
onClick: i[1] || (i[1] =
|
|
46
|
+
onClick: i[1] || (i[1] = w(() => {
|
|
43
47
|
}, ["stop"]))
|
|
44
48
|
}, [
|
|
45
|
-
k(
|
|
49
|
+
k(m, {
|
|
46
50
|
index: e.item.key,
|
|
47
51
|
"data-index": e.item.key,
|
|
48
|
-
onClick: i[0] || (i[0] = (s) =>
|
|
52
|
+
onClick: i[0] || (i[0] = (s) => E(e.item.key, e.item))
|
|
49
53
|
}, {
|
|
50
|
-
title:
|
|
51
|
-
|
|
54
|
+
title: o(() => [
|
|
55
|
+
e.showTooltip ? (n(), C(F, {
|
|
56
|
+
key: 0,
|
|
57
|
+
content: e.item.title,
|
|
58
|
+
placement: "right"
|
|
59
|
+
}, {
|
|
60
|
+
default: o(() => [
|
|
61
|
+
p("span", O, [
|
|
62
|
+
p("p", null, c(e.item.title), 1)
|
|
63
|
+
])
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 8, ["content"])) : (n(), r("span", q, [
|
|
67
|
+
p("p", null, c(e.item.title), 1)
|
|
68
|
+
]))
|
|
52
69
|
]),
|
|
53
|
-
default:
|
|
70
|
+
default: o(() => [
|
|
54
71
|
k(g, v(D(e.item.iconConfig)), M({ _: 2 }, [
|
|
55
72
|
e.item.iconSlot ? {
|
|
56
73
|
name: "default",
|
|
57
|
-
fn:
|
|
74
|
+
fn: o(() => [
|
|
58
75
|
b(e.$slots, e.item.iconSlot)
|
|
59
76
|
]),
|
|
60
77
|
key: "0"
|
|
@@ -63,42 +80,43 @@ const O = E({
|
|
|
63
80
|
]),
|
|
64
81
|
_: 3
|
|
65
82
|
}, 8, ["index", "data-index"])
|
|
66
|
-
])) : (
|
|
83
|
+
])) : (n(), C(P, {
|
|
67
84
|
key: 1,
|
|
68
85
|
index: e.item.key,
|
|
69
86
|
"data-index": e.item.key,
|
|
70
|
-
onClick: i[2] || (i[2] = (s) =>
|
|
87
|
+
onClick: i[2] || (i[2] = w((s) => y(e.item), ["stop"]))
|
|
71
88
|
}, {
|
|
72
|
-
title:
|
|
89
|
+
title: o(() => [
|
|
73
90
|
k(g, v(D(e.item.iconConfig)), M({ _: 2 }, [
|
|
74
91
|
e.item.iconSlot ? {
|
|
75
92
|
name: "default",
|
|
76
|
-
fn:
|
|
93
|
+
fn: o(() => [
|
|
77
94
|
b(e.$slots, e.item.iconSlot)
|
|
78
95
|
]),
|
|
79
96
|
key: "0"
|
|
80
97
|
} : void 0
|
|
81
98
|
]), 1040),
|
|
82
|
-
|
|
99
|
+
p("span", null, c(e.item.title), 1)
|
|
83
100
|
]),
|
|
84
|
-
default:
|
|
85
|
-
(
|
|
101
|
+
default: o(() => [
|
|
102
|
+
(n(!0), r(h, null, $(e.item.children, (s) => (n(), C(a, {
|
|
86
103
|
key: s.key,
|
|
87
104
|
item: s,
|
|
88
105
|
"permission-list": e.permissionList,
|
|
89
106
|
"need-permission": e.needPermission,
|
|
90
107
|
"is-define-click": e.isDefineClick,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
108
|
+
"show-tooltip": e.showTooltip,
|
|
109
|
+
onOnJump: J,
|
|
110
|
+
onDefineSubClick: y,
|
|
111
|
+
onDefineChildClick: S
|
|
112
|
+
}, null, 8, ["item", "permission-list", "need-permission", "is-define-click", "show-tooltip"]))), 128))
|
|
95
113
|
]),
|
|
96
114
|
_: 3
|
|
97
115
|
}, 8, ["index", "data-index"]))
|
|
98
|
-
], 64)) :
|
|
116
|
+
], 64)) : B("", !0);
|
|
99
117
|
};
|
|
100
118
|
}
|
|
101
119
|
});
|
|
102
120
|
export {
|
|
103
|
-
|
|
121
|
+
ee as default
|
|
104
122
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var e=(o,l)=>s(o,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../_utils/runtime/index.cjs"),i=["onJump","defineSubClick","defineChildClick"],r=t.buildProps({menuConfigList:{type:Array,default:e(()=>[],"default")},needPermission:{type:Boolean,default:!1},permissionList:{type:Array,default:e(()=>[],"default")},hoverColor:{type:String,default:""},isDefineClick:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0}}),n=t.buildProps({needPermission:{type:Boolean,default:!0},permissionList:{type:Array,default:e(()=>[],"default")},item:{type:Object,required:!0,default:e(()=>({}),"default")},isDefineClick:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1}});exports.lsEmitNames=i;exports.lsMenuItemProps=n;exports.lsMenuProps=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var e = (
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var e = (o, l) => i(o, "name", { value: l, configurable: !0 });
|
|
3
3
|
import { buildProps as t } from "../../_utils/runtime/index.js";
|
|
4
|
-
const
|
|
4
|
+
const r = ["onJump", "defineSubClick", "defineChildClick"], a = t({
|
|
5
5
|
menuConfigList: {
|
|
6
6
|
type: Array,
|
|
7
7
|
default: /* @__PURE__ */ e(() => [], "default")
|
|
@@ -21,6 +21,10 @@ const n = ["onJump", "defineSubClick", "defineChildClick"], a = t({
|
|
|
21
21
|
isDefineClick: {
|
|
22
22
|
type: Boolean,
|
|
23
23
|
default: !1
|
|
24
|
+
},
|
|
25
|
+
showTooltip: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !0
|
|
24
28
|
}
|
|
25
29
|
}), u = t({
|
|
26
30
|
needPermission: {
|
|
@@ -39,10 +43,14 @@ const n = ["onJump", "defineSubClick", "defineChildClick"], a = t({
|
|
|
39
43
|
isDefineClick: {
|
|
40
44
|
type: Boolean,
|
|
41
45
|
default: !1
|
|
46
|
+
},
|
|
47
|
+
showTooltip: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
42
50
|
}
|
|
43
51
|
});
|
|
44
52
|
export {
|
|
45
|
-
|
|
53
|
+
r as lsEmitNames,
|
|
46
54
|
u as lsMenuItemProps,
|
|
47
55
|
a as lsMenuProps
|
|
48
56
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +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-282c5f77"]]);exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var s=(r,l)=>m(r,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),_=,/* empty css */v=,/* empty css */w={class:"temp-content"},g=e.defineComponent({name:"LSTooltip"}),C=e.defineComponent({...g,setup(r){const i=_.useNamespace("tooltip").b(),n=e.ref(!1),o=e.ref(),u=e.useAttrs(),c=e.computed(()=>u.content||"");function a(){d()}s(a,"onMouseEnter");async function d(){if(await e.nextTick(),o.value){const t=o.value.getBoundingClientRect();o.value.querySelector(".temp-content").getBoundingClientRect().width>t.width?n.value=!0:n.value=!1}}return s(d,"updateTooltip"),(t,p)=>{const f=v.ElTooltip;return e.openBlock(),e.createElementBlock("div",{ref_key:"lsTooltipRef",ref:o,class:e.normalizeClass(e.unref(i)),onMouseenter:a},[e.createElementVNode("div",w,e.toDisplayString(e.unref(c)),1),e.createVNode(f,e.mergeProps({disabled:!e.unref(n)},t.$attrs),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content",{},void 0,!0)]),_:3},16,["disabled"])],34)}}});exports.default=C;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var T = Object.defineProperty;
|
|
2
|
+
var n = (l, r) => T(l, "name", { value: r, configurable: !0 });
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { defineComponent as p, ref as i, useAttrs as g, computed as h, openBlock as C, createElementBlock as k, normalizeClass as y, unref as s, createElementVNode as B, toDisplayString as E, createVNode as R, mergeProps as S, withCtx as c, renderSlot as a, nextTick as b } from "vue";
|
|
7
|
+
import { useNamespace as N } from "../../_hooks/useNamespace/index.js";
|
|
8
|
+
import { ElTooltip as $ } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/tooltip/index/index.js";
|
|
9
|
+
const M = { class: "temp-content" }, V = p({
|
|
10
|
+
name: "LSTooltip"
|
|
11
|
+
}), j = /* @__PURE__ */ p({
|
|
12
|
+
...V,
|
|
13
|
+
setup(l) {
|
|
14
|
+
const u = N("tooltip").b(), o = i(!1), e = i(), d = g(), m = h(() => d.content || "");
|
|
15
|
+
function f() {
|
|
16
|
+
_();
|
|
17
|
+
}
|
|
18
|
+
n(f, "onMouseEnter");
|
|
19
|
+
async function _() {
|
|
20
|
+
if (await b(), e.value) {
|
|
21
|
+
const t = e.value.getBoundingClientRect();
|
|
22
|
+
e.value.querySelector(".temp-content").getBoundingClientRect().width > t.width ? o.value = !0 : o.value = !1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return n(_, "updateTooltip"), (t, v) => {
|
|
26
|
+
const w = $;
|
|
27
|
+
return C(), k("div", {
|
|
28
|
+
ref_key: "lsTooltipRef",
|
|
29
|
+
ref: e,
|
|
30
|
+
class: y(s(u)),
|
|
31
|
+
onMouseenter: f
|
|
32
|
+
}, [
|
|
33
|
+
B("div", M, E(s(m)), 1),
|
|
34
|
+
R(w, S({
|
|
35
|
+
disabled: !s(o)
|
|
36
|
+
}, t.$attrs), {
|
|
37
|
+
default: c(() => [
|
|
38
|
+
a(t.$slots, "default", {}, void 0, !0)
|
|
39
|
+
]),
|
|
40
|
+
content: c(() => [
|
|
41
|
+
a(t.$slots, "content", {}, void 0, !0)
|
|
42
|
+
]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 16, ["disabled"])
|
|
45
|
+
], 34);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
j as default
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var o=(e,l)=>n(e,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../packages/ls-components/components/tooltip/Index.vue/index.cjs"),u=require("../packages/ls-components/components/_utils/config/index.cjs"),a=Object.assign(t.default,{install:o((e,l)=>{u.setGlobalConfig(e,l),t.default.name&&e.component(t.default.name,t.default)},"install")});exports.default=a;
|