@lingshugroup/web-plus 1.7.1 → 1.7.3
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/hooks/index.cjs +1 -1
- package/lib/hooks/index.js +6 -8
- 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/_hooks/useOptionHook/index.cjs +1 -1
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js +37 -32
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.br +0 -0
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.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/button/Button.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
- package/lib/packages/ls-components/components/button/Button.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index2.js +14 -14
- package/lib/packages/ls-components/components/button/Button.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/button/Button.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.js +2 -2
- 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 +105 -62
- 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 +24 -4
- 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/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 +40 -38
- 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 +30 -30
- 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/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +52 -52
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/lib/types/components/_hooks/index.d.ts +1 -2
- package/lib/types/components/_hooks/useOptionHook.d.ts +3 -3
- package/lib/types/components/_utils/utils.d.ts +1 -0
- package/lib/types/components/dialog/Index.vue.d.ts +1 -1
- package/lib/types/components/editor/Index.vue.d.ts +12 -0
- package/lib/types/components/editor/index.d.ts +24 -0
- package/lib/types/components/editor/types.d.ts +4 -0
- package/lib/types/components/form/FormItem.vue.d.ts +23 -23
- package/lib/types/components/form/index.d.ts +23 -23
- package/lib/types/components/form/types.d.ts +1 -1
- package/lib/types/components/menu/types.d.ts +1 -1
- package/package.json +1 -1
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.cjs +0 -1
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js +0 -222
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.br +0 -0
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.gz +0 -0
- package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.cjs +0 -1
- package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.js +0 -23
|
@@ -1,40 +1,58 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { Toolbar as
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
import { lsEditorProps as
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var r = (u, m) => R(u, "name", { value: m, configurable: !0 });
|
|
3
|
+
import { defineComponent as g, shallowRef as I, ref as f, computed as P, watch as T, onBeforeUnmount as U, openBlock as V, createElementBlock as _, normalizeClass as q, unref as a, createVNode as p, isRef as z, normalizeStyle as H, nextTick as M } from "vue";
|
|
4
|
+
import { Toolbar as K, Editor as G } from "@wangeditor/editor-for-vue";
|
|
5
|
+
import { useNamespace as j } from "../../_hooks/useNamespace/index.js";
|
|
6
|
+
import { lsEditorProps as J, lsEditorEmits as Q } from "../types/index.js";
|
|
7
|
+
import { elementOutOfBounds as W } from "../../_utils/utils/index.js";
|
|
8
|
+
import h from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
9
|
+
const X = g({
|
|
9
10
|
name: "LSEditor"
|
|
10
|
-
}),
|
|
11
|
-
...
|
|
12
|
-
props:
|
|
13
|
-
emits:
|
|
14
|
-
setup(u, { expose: m, emit:
|
|
15
|
-
const
|
|
11
|
+
}), ae = /* @__PURE__ */ g({
|
|
12
|
+
...X,
|
|
13
|
+
props: J,
|
|
14
|
+
emits: Q,
|
|
15
|
+
setup(u, { expose: m, emit: v }) {
|
|
16
|
+
const y = j("editor").b(), n = u, s = v, l = I(), c = f();
|
|
17
|
+
function C(e, t) {
|
|
18
|
+
let o = (e || 2) * 1024 * 1024;
|
|
19
|
+
if (!e)
|
|
20
|
+
return o;
|
|
21
|
+
switch (t) {
|
|
22
|
+
case "GB":
|
|
23
|
+
o = e * 1024 * 1024;
|
|
24
|
+
break;
|
|
25
|
+
case "KB":
|
|
26
|
+
o = e * 1024;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
return o;
|
|
30
|
+
}
|
|
31
|
+
r(C, "getMaxFileSize");
|
|
32
|
+
const E = {
|
|
16
33
|
excludeKeys: ["group-video"]
|
|
17
|
-
},
|
|
34
|
+
}, b = {
|
|
18
35
|
placeholder: "请输入内容...",
|
|
19
36
|
maxLength: 2e4,
|
|
20
37
|
MENU_CONF: {
|
|
21
38
|
uploadImage: {
|
|
22
|
-
server:
|
|
23
|
-
fieldName:
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
server: n.uploadServer,
|
|
40
|
+
fieldName: n.uploadFieldName,
|
|
41
|
+
maxFileSize: C(n.uploadImgSize, n.uploadImgSizeUnit),
|
|
42
|
+
headers: n.uploadHeaders ? n.uploadHeaders : {
|
|
43
|
+
token: n.uploadToken
|
|
26
44
|
},
|
|
27
|
-
customInsert(e,
|
|
28
|
-
const { data:
|
|
29
|
-
o
|
|
45
|
+
customInsert(e, t) {
|
|
46
|
+
const { data: o = "", alt: x = "", href: A = "" } = e || {};
|
|
47
|
+
t(o, x, A);
|
|
30
48
|
}
|
|
31
49
|
}
|
|
32
50
|
}
|
|
33
|
-
},
|
|
34
|
-
height: (
|
|
35
|
-
})), d =
|
|
36
|
-
|
|
37
|
-
() =>
|
|
51
|
+
}, k = P(() => ({
|
|
52
|
+
height: (n == null ? void 0 : n.height) || "300px"
|
|
53
|
+
})), d = f("");
|
|
54
|
+
T(
|
|
55
|
+
() => n.valueHtml,
|
|
38
56
|
(e) => {
|
|
39
57
|
d.value = e;
|
|
40
58
|
},
|
|
@@ -42,54 +60,79 @@ const j = f({
|
|
|
42
60
|
immediate: !0,
|
|
43
61
|
deep: !0
|
|
44
62
|
}
|
|
45
|
-
),
|
|
46
|
-
const e =
|
|
63
|
+
), U(() => {
|
|
64
|
+
const e = l.value;
|
|
47
65
|
e != null && e.destroy();
|
|
48
66
|
});
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
}, "handleCreated"),
|
|
52
|
-
|
|
53
|
-
}, "handleChange"),
|
|
54
|
-
|
|
55
|
-
}, "handleDestroyed"),
|
|
56
|
-
|
|
57
|
-
}, "handleFocus"), O = /* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
}, "handleBlur"),
|
|
60
|
-
|
|
61
|
-
}, "customAlert"),
|
|
62
|
-
|
|
67
|
+
const S = /* @__PURE__ */ r((e) => {
|
|
68
|
+
l.value = e, L(), s("handleCreated", e);
|
|
69
|
+
}, "handleCreated"), B = /* @__PURE__ */ r((e) => {
|
|
70
|
+
s("handleChange", e);
|
|
71
|
+
}, "handleChange"), D = /* @__PURE__ */ r((e) => {
|
|
72
|
+
s("handleDestroyed", e);
|
|
73
|
+
}, "handleDestroyed"), w = /* @__PURE__ */ r((e) => {
|
|
74
|
+
s("handleFocus", e);
|
|
75
|
+
}, "handleFocus"), O = /* @__PURE__ */ r((e) => {
|
|
76
|
+
s("handleBlur", e);
|
|
77
|
+
}, "handleBlur"), F = /* @__PURE__ */ r((e, t) => {
|
|
78
|
+
s("customAlert", e, t);
|
|
79
|
+
}, "customAlert"), N = /* @__PURE__ */ r((e, t, o) => {
|
|
80
|
+
s("customPaste", e, t, o);
|
|
63
81
|
}, "customPaste");
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
async function L() {
|
|
83
|
+
await M(), (c.value.querySelectorAll('button[data-menu-key="group-image"]') || []).forEach((o) => {
|
|
84
|
+
o.removeEventListener("mouseenter", i), o.addEventListener("mouseenter", () => {
|
|
85
|
+
i(o);
|
|
86
|
+
});
|
|
87
|
+
}), (c.value.querySelectorAll('button[data-menu-key="group-video"]') || []).forEach((o) => {
|
|
88
|
+
o.removeEventListener("mouseenter", i), o.addEventListener("mouseenter", () => {
|
|
89
|
+
i(o);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
r(L, "listenerDoms");
|
|
94
|
+
function i(e) {
|
|
95
|
+
const t = e.parentNode.querySelector(".w-e-bar-item-menus-container");
|
|
96
|
+
switch (W(t, n.containerDom)) {
|
|
97
|
+
case "left":
|
|
98
|
+
t.style.left = 0, t.style.right = "inherit";
|
|
99
|
+
break;
|
|
100
|
+
case "right":
|
|
101
|
+
t.style.left = "inherit", t.style.right = 0;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return r(i, "updateStyle"), m({
|
|
106
|
+
editorRef: l
|
|
107
|
+
}), (e, t) => (V(), _("div", {
|
|
108
|
+
ref_key: "lsEditorRef",
|
|
109
|
+
ref: c,
|
|
110
|
+
class: q(a(y))
|
|
68
111
|
}, [
|
|
69
|
-
|
|
112
|
+
p(a(K), {
|
|
70
113
|
class: "tool-bar-wrap",
|
|
71
|
-
editor:
|
|
72
|
-
"default-config":
|
|
114
|
+
editor: a(l),
|
|
115
|
+
"default-config": a(h)(E, e.toolbarConfig),
|
|
73
116
|
mode: e.mode
|
|
74
117
|
}, null, 8, ["editor", "default-config", "mode"]),
|
|
75
|
-
|
|
118
|
+
p(a(G), {
|
|
76
119
|
class: "editor-wrap",
|
|
77
|
-
modelValue:
|
|
78
|
-
"onUpdate:modelValue":
|
|
79
|
-
"default-config":
|
|
80
|
-
style:
|
|
120
|
+
modelValue: a(d),
|
|
121
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => z(d) ? d.value = o : null),
|
|
122
|
+
"default-config": a(h)(b, e.editorConfig),
|
|
123
|
+
style: H(a(k)),
|
|
81
124
|
mode: e.mode,
|
|
82
|
-
onOnCreated:
|
|
83
|
-
onOnChange:
|
|
84
|
-
onOnDestroyed:
|
|
85
|
-
onOnFocus:
|
|
125
|
+
onOnCreated: S,
|
|
126
|
+
onOnChange: B,
|
|
127
|
+
onOnDestroyed: D,
|
|
128
|
+
onOnFocus: w,
|
|
86
129
|
onOnBlur: O,
|
|
87
|
-
onCustomAlert:
|
|
88
|
-
onCustomPaste:
|
|
130
|
+
onCustomAlert: F,
|
|
131
|
+
onCustomPaste: N
|
|
89
132
|
}, null, 8, ["modelValue", "default-config", "style", "mode"])
|
|
90
133
|
], 2));
|
|
91
134
|
}
|
|
92
135
|
});
|
|
93
136
|
export {
|
|
94
|
-
|
|
137
|
+
ae as default
|
|
95
138
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var e=(t,l)=>d(t,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var d=Object.defineProperty;var e=(t,l)=>d(t,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../_utils/runtime/index.cjs"),o=a.buildProps({valueHtml:{type:String,default:""},height:{type:String,default:"300px"},mode:{type:String,default:"default"},toolbarConfig:{type:Object,default:e(()=>({}),"default")},editorConfig:{type:Object,default:e(()=>({}),"default")},uploadServer:{type:String,default:""},uploadFieldName:{type:String,default:"file"},uploadToken:{type:String,default:""},uploadHeaders:{type:Object,default:e(()=>null,"default")},uploadImgSize:{type:Number,default:2},uploadImgSizeUnit:{type:String,default:"MB"},containerDom:{type:Object,default:null}}),u=["handleCreated","handleChange","handleDestroyed","handleFocus","handleBlur","customAlert","customPaste"];exports.lsEditorEmits=u;exports.lsEditorProps=o;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var e = (t, l) => d(t, "name", { value: l, configurable: !0 });
|
|
3
3
|
import { buildProps as a } from "../../_utils/runtime/index.js";
|
|
4
|
-
const
|
|
4
|
+
const r = a({
|
|
5
5
|
valueHtml: {
|
|
6
6
|
type: String,
|
|
7
7
|
default: ""
|
|
@@ -34,8 +34,28 @@ const u = a({
|
|
|
34
34
|
uploadToken: {
|
|
35
35
|
type: String,
|
|
36
36
|
default: ""
|
|
37
|
+
},
|
|
38
|
+
// 自定义上传请求头
|
|
39
|
+
uploadHeaders: {
|
|
40
|
+
type: Object,
|
|
41
|
+
default: /* @__PURE__ */ e(() => null, "default")
|
|
42
|
+
},
|
|
43
|
+
// 上传图片大小限制, 默认5
|
|
44
|
+
uploadImgSize: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 2
|
|
47
|
+
},
|
|
48
|
+
// 上传图片大小单位(GB,MB,KB),默认M
|
|
49
|
+
uploadImgSizeUnit: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "MB"
|
|
52
|
+
},
|
|
53
|
+
// 可视区域dom
|
|
54
|
+
containerDom: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: null
|
|
37
57
|
}
|
|
38
|
-
}),
|
|
58
|
+
}), n = [
|
|
39
59
|
"handleCreated",
|
|
40
60
|
"handleChange",
|
|
41
61
|
"handleDestroyed",
|
|
@@ -45,6 +65,6 @@ const u = a({
|
|
|
45
65
|
"customPaste"
|
|
46
66
|
];
|
|
47
67
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
68
|
+
n as lsEditorEmits,
|
|
69
|
+
r as lsEditorProps
|
|
50
70
|
};
|
|
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-4b93d1bc"]]);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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4b93d1bc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var o=(c,l)=>g(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"),N=,/* empty css */
|
|
1
|
+
"use strict";var g=Object.defineProperty;var o=(c,l)=>g(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"),N=,/* empty css */y=,/* empty css */w=,/* empty css */B=,/* empty css */E=,/* empty css */D=s.defineComponent({name:"LSMenu"}),P=s.defineComponent({...D,props:y.lsMenuProps,emits:y.lsEmitNames,setup(c,{expose:l,emit:S}){s.useCssVars(e=>({"2ef4fbda":e.hoverColor}));const{currentRouter:r}=w.default(),h=N.useNamespace("menu").b(),k=c,a=S,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(h),"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,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"]))),128))]),_:3},16,["class","default-active"])}}});exports.default=P;
|
|
@@ -4,71 +4,73 @@ var n = (c, l) => w(c, "name", { value: l, configurable: !0 });
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { defineComponent as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import { lsMenuProps as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { ElMenu as
|
|
13
|
-
const
|
|
7
|
+
import { defineComponent as A, useCssVars as B, useAttrs as F, ref as C, watch as k, nextTick as J, onMounted as q, openBlock as v, createBlock as h, mergeProps as I, unref as _, withCtx as b, createElementBlock as R, Fragment as x, renderList as H, renderSlot as K } from "vue";
|
|
8
|
+
import { useNamespace as O } from "../../_hooks/useNamespace/index.js";
|
|
9
|
+
import { lsMenuProps as T, lsEmitNames as j } from "../types/index.js";
|
|
10
|
+
import z from "../../_hooks/useRouterHook/index.js";
|
|
11
|
+
import G from "../MenuItem.vue/index.js";
|
|
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";
|
|
13
|
+
const U = A({
|
|
14
14
|
name: "LSMenu"
|
|
15
|
-
}), ce = /* @__PURE__ */
|
|
16
|
-
...
|
|
17
|
-
props:
|
|
18
|
-
emits:
|
|
15
|
+
}), ce = /* @__PURE__ */ A({
|
|
16
|
+
...U,
|
|
17
|
+
props: T,
|
|
18
|
+
emits: j,
|
|
19
19
|
setup(c, { expose: l, emit: M }) {
|
|
20
20
|
B((e) => ({
|
|
21
|
-
"
|
|
21
|
+
"2ef4fbda": e.hoverColor
|
|
22
22
|
}));
|
|
23
|
-
const { currentRouter: r } =
|
|
24
|
-
|
|
25
|
-
() =>
|
|
23
|
+
const { currentRouter: r } = z(), E = O("menu").b(), y = c, u = M, N = F(), L = C(!1), S = C(""), o = C();
|
|
24
|
+
k(
|
|
25
|
+
() => y.permissionList,
|
|
26
26
|
(e) => {
|
|
27
|
-
|
|
27
|
+
y.needPermission && e && e.length > 0 && a();
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
immediate: !0,
|
|
31
31
|
deep: !0
|
|
32
32
|
}
|
|
33
|
-
),
|
|
33
|
+
), k(
|
|
34
34
|
() => r.value,
|
|
35
35
|
() => {
|
|
36
|
-
|
|
36
|
+
a();
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
immediate: !0,
|
|
40
40
|
deep: !0
|
|
41
41
|
}
|
|
42
|
-
),
|
|
42
|
+
), k(
|
|
43
43
|
() => N["default-active"],
|
|
44
44
|
async (e) => {
|
|
45
|
-
e && (await J(),
|
|
45
|
+
e && (await J(), m(e.toString()));
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
immediate: !0,
|
|
49
49
|
deep: !0
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
|
-
function
|
|
53
|
-
if (!
|
|
52
|
+
function a() {
|
|
53
|
+
if (!L.value)
|
|
54
54
|
return;
|
|
55
55
|
const { meta: e } = (r == null ? void 0 : r.value) || {};
|
|
56
|
-
|
|
56
|
+
S.value = (e == null ? void 0 : e.key) || "1";
|
|
57
57
|
}
|
|
58
|
-
n(
|
|
58
|
+
n(a, "initMenuSider");
|
|
59
59
|
function g(e) {
|
|
60
60
|
u("onJump", e);
|
|
61
61
|
}
|
|
62
62
|
n(g, "onJump");
|
|
63
|
-
function D(e
|
|
64
|
-
|
|
63
|
+
function D(e) {
|
|
64
|
+
const { key: i } = e;
|
|
65
|
+
m(i), u("defineSubClick", e);
|
|
65
66
|
}
|
|
66
67
|
n(D, "defineSubClickFunc");
|
|
67
|
-
function $(e
|
|
68
|
-
|
|
68
|
+
function $(e) {
|
|
69
|
+
const { key: i } = e;
|
|
70
|
+
m(i), u("defineChildClick", e);
|
|
69
71
|
}
|
|
70
72
|
n($, "defineChildClickFunc");
|
|
71
|
-
function
|
|
73
|
+
function m(e) {
|
|
72
74
|
if (o.value) {
|
|
73
75
|
let i = !1;
|
|
74
76
|
const f = o.value.$el.querySelectorAll(".el-sub-menu"), t = o.value.$el.querySelectorAll(".el-menu-item"), d = "is-sub-active", p = "is-active";
|
|
@@ -79,21 +81,21 @@ const V = b({
|
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
|
-
return n(
|
|
83
|
-
|
|
84
|
+
return n(m, "updateActiveClass"), q(() => {
|
|
85
|
+
L.value = !0, a();
|
|
84
86
|
}), l({
|
|
85
87
|
lsComMenuRef: o
|
|
86
88
|
}), (e, i) => {
|
|
87
|
-
const f =
|
|
88
|
-
return
|
|
89
|
+
const f = Q;
|
|
90
|
+
return v(), h(f, I({
|
|
89
91
|
ref_key: "lsComMenuRef",
|
|
90
92
|
ref: o
|
|
91
93
|
}, e.$attrs, {
|
|
92
94
|
class: _(E),
|
|
93
|
-
"default-active": _(
|
|
95
|
+
"default-active": _(S)
|
|
94
96
|
}), {
|
|
95
|
-
default:
|
|
96
|
-
(
|
|
97
|
+
default: b(() => [
|
|
98
|
+
(v(!0), R(x, null, H(e.menuConfigList, (t) => (v(), h(G, {
|
|
97
99
|
key: t.key,
|
|
98
100
|
item: t,
|
|
99
101
|
"permission-list": e.permissionList,
|
|
@@ -103,8 +105,8 @@ const V = b({
|
|
|
103
105
|
onDefineSubClick: D,
|
|
104
106
|
onDefineChildClick: $
|
|
105
107
|
}, {
|
|
106
|
-
[t.iconSlot]:
|
|
107
|
-
|
|
108
|
+
[t.iconSlot]: b(() => [
|
|
109
|
+
K(e.$slots, t.iconSlot, {}, void 0, !0)
|
|
108
110
|
]),
|
|
109
111
|
_: 2
|
|
110
112
|
}, 1032, ["item", "permission-list", "need-permission", "is-define-click"]))), 128))
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var t=(r,m)=>g(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"),
|
|
1
|
+
"use strict";var g=Object.defineProperty;var t=(r,m)=>g(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 */f=,/* empty css */w=,/* empty css */k=,/* empty css */B=e.defineComponent({name:"LSMenuItem"}),M=e.defineComponent({...B,props:f.lsMenuItemProps,emits:f.lsEmitNames,setup(r,{emit:m}){const{jumpRouteCom:C}=w.default(),o=m,u=r,S=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 y(i){o("onJump",i)}t(y,"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=k.ElMenuItem,d=e.resolveComponent("MenuItem",!0),v=k.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=>S(i.item.key,i.item))},{title:e.withCtx(()=>[e.createElementVNode("span",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(v,{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,onOnJump:y,onDefineSubClick:a,onDefineChildClick:p},null,8,["item","permission-list","need-permission","is-define-click"]))),128))]),_:3},8,["index","data-index"]))],64)):e.createCommentVNode("",!0)}}});exports.default=M;
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (r,
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var o = (r, d) => R(r, "name", { value: d, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import
|
|
6
|
+
import { defineComponent as J, resolveComponent as $, openBlock as t, createElementBlock as f, Fragment as c, withModifiers as y, createVNode as k, withCtx as n, createElementVNode as S, toDisplayString as v, normalizeProps as D, guardReactiveProps as M, createSlots as b, renderSlot as I, createBlock as g, renderList as B, createCommentVNode as F } from "vue";
|
|
7
|
+
import E from "../../icon/Index.vue/index.js";
|
|
8
8
|
import { lsMenuItemProps as V, lsEmitNames as j } from "../types/index.js";
|
|
9
9
|
import h from "../../_hooks/useRouterHook/index.js";
|
|
10
10
|
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 =
|
|
11
|
+
const O = J({
|
|
12
12
|
name: "LSMenuItem"
|
|
13
|
-
}), Y = /* @__PURE__ */
|
|
13
|
+
}), Y = /* @__PURE__ */ J({
|
|
14
14
|
...O,
|
|
15
15
|
props: V,
|
|
16
16
|
emits: j,
|
|
17
|
-
setup(r, { emit:
|
|
18
|
-
const { jumpRouteCom:
|
|
19
|
-
if (
|
|
20
|
-
C(
|
|
17
|
+
setup(r, { emit: d }) {
|
|
18
|
+
const { jumpRouteCom: L } = h(), m = d, u = r, P = /* @__PURE__ */ o((e, i) => {
|
|
19
|
+
if (u.isDefineClick)
|
|
20
|
+
C(i);
|
|
21
21
|
else {
|
|
22
22
|
const { link: l, defJump: p } = i || {};
|
|
23
|
-
p ? m("onJump", i) : l ? window.open(l, "_blank") :
|
|
23
|
+
p ? m("onJump", i) : l ? window.open(l, "_blank") : L(i);
|
|
24
24
|
}
|
|
25
25
|
}, "jumpRoute");
|
|
26
|
-
function
|
|
26
|
+
function w(e) {
|
|
27
27
|
m("onJump", e);
|
|
28
28
|
}
|
|
29
|
-
o(
|
|
30
|
-
function a(e
|
|
31
|
-
|
|
29
|
+
o(w, "onJump");
|
|
30
|
+
function a(e) {
|
|
31
|
+
u.isDefineClick && m("defineSubClick", e);
|
|
32
32
|
}
|
|
33
33
|
o(a, "defineSubClickFunc");
|
|
34
|
-
function C(e
|
|
35
|
-
|
|
34
|
+
function C(e) {
|
|
35
|
+
u.isDefineClick && m("defineChildClick", e);
|
|
36
36
|
}
|
|
37
37
|
return o(C, "defineChildClickFunc"), (e, i) => {
|
|
38
|
-
const l = z, p =
|
|
38
|
+
const l = z, p = $("MenuItem", !0), N = H;
|
|
39
39
|
return !e.needPermission || e.permissionList.includes(e.item.pCode) ? (t(), f(c, { key: 0 }, [
|
|
40
40
|
!e.item.children || e.item.leaf ? (t(), f("div", {
|
|
41
41
|
key: 0,
|
|
42
|
-
onClick: i[1] || (i[1] =
|
|
42
|
+
onClick: i[1] || (i[1] = y(() => {
|
|
43
43
|
}, ["stop"]))
|
|
44
44
|
}, [
|
|
45
45
|
k(l, {
|
|
46
46
|
index: e.item.key,
|
|
47
47
|
"data-index": e.item.key,
|
|
48
|
-
onClick: i[0] || (i[0] = (s) =>
|
|
48
|
+
onClick: i[0] || (i[0] = (s) => P(e.item.key, e.item))
|
|
49
49
|
}, {
|
|
50
50
|
title: n(() => [
|
|
51
|
-
|
|
51
|
+
S("span", null, v(e.item.title), 1)
|
|
52
52
|
]),
|
|
53
53
|
default: n(() => [
|
|
54
|
-
k(
|
|
54
|
+
k(E, D(M(e.item.iconConfig)), b({ _: 2 }, [
|
|
55
55
|
e.item.iconSlot ? {
|
|
56
56
|
name: "default",
|
|
57
57
|
fn: n(() => [
|
|
58
|
-
|
|
58
|
+
I(e.$slots, e.item.iconSlot)
|
|
59
59
|
]),
|
|
60
60
|
key: "0"
|
|
61
61
|
} : void 0
|
|
@@ -63,32 +63,32 @@ const O = E({
|
|
|
63
63
|
]),
|
|
64
64
|
_: 3
|
|
65
65
|
}, 8, ["index", "data-index"])
|
|
66
|
-
])) : (t(),
|
|
66
|
+
])) : (t(), g(N, {
|
|
67
67
|
key: 1,
|
|
68
68
|
index: e.item.key,
|
|
69
69
|
"data-index": e.item.key,
|
|
70
|
-
onClick: i[2] || (i[2] = (s) => a(e.item
|
|
70
|
+
onClick: i[2] || (i[2] = y((s) => a(e.item), ["stop"]))
|
|
71
71
|
}, {
|
|
72
72
|
title: n(() => [
|
|
73
|
-
k(
|
|
73
|
+
k(E, D(M(e.item.iconConfig)), b({ _: 2 }, [
|
|
74
74
|
e.item.iconSlot ? {
|
|
75
75
|
name: "default",
|
|
76
76
|
fn: n(() => [
|
|
77
|
-
|
|
77
|
+
I(e.$slots, e.item.iconSlot)
|
|
78
78
|
]),
|
|
79
79
|
key: "0"
|
|
80
80
|
} : void 0
|
|
81
81
|
]), 1040),
|
|
82
|
-
|
|
82
|
+
S("span", null, v(e.item.title), 1)
|
|
83
83
|
]),
|
|
84
84
|
default: n(() => [
|
|
85
|
-
(t(!0), f(c, null, B(e.item.children, (s) => (t(),
|
|
85
|
+
(t(!0), f(c, null, B(e.item.children, (s) => (t(), g(p, {
|
|
86
86
|
key: s.key,
|
|
87
87
|
item: s,
|
|
88
88
|
"permission-list": e.permissionList,
|
|
89
89
|
"need-permission": e.needPermission,
|
|
90
90
|
"is-define-click": e.isDefineClick,
|
|
91
|
-
onOnJump:
|
|
91
|
+
onOnJump: w,
|
|
92
92
|
onDefineSubClick: a,
|
|
93
93
|
onDefineChildClick: C
|
|
94
94
|
}, null, 8, ["item", "permission-list", "need-permission", "is-define-click"]))), 128))
|
|
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-a5e190b8"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a5e190b8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|