@duxweb/dvha-elementui 1.0.3 → 1.0.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/dist/cjs/components/menu/TreeMenu.vue.cjs +1 -1
- package/dist/cjs/components/menu/TreeMenu.vue2.cjs +1 -1
- package/dist/cjs/hooks/tab.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/menu/TreeMenu.vue.js +15 -17
- package/dist/esm/hooks/tab.js +11 -12
- package/dist/esm/index.js +4 -4
- package/dist/types/hooks/tab.d.ts +3 -1949
- package/dist/types/index.d.ts +1 -1
- package/package.json +11 -10
- package/dist/cjs/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.cjs +0 -5
- package/dist/cjs/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.cjs +0 -10
- package/dist/cjs/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +0 -5
- package/dist/cjs/node_modules/vue/dist/vue.runtime.esm-bundler.cjs +0 -5
- package/dist/cjs/node_modules/vue-router/dist/vue-router.cjs +0 -5
- package/dist/esm/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -721
- package/dist/esm/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -892
- package/dist/esm/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -103
- package/dist/esm/node_modules/vue/dist/vue.runtime.esm-bundler.js +0 -40
- package/dist/esm/node_modules/vue-router/dist/vue-router.js +0 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=e.defineComponent({name:"TreeMenu",__name:"TreeMenu",props:{menuItems:{type:Array,required:!0},onMenuClick:{type:Function,default:()=>{}}},setup(t){return(a,i)=>{const o=e.resolveComponent("el-icon"),l=e.resolveComponent("TreeMenu",!0),c=e.resolveComponent("el-sub-menu"),r=e.resolveComponent("el-menu-item");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuItems,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n.name},[n.children&&n.children.length?(e.openBlock(),e.createBlock(c,{key:0,index:n.name},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),default:e.withCtx(()=>[n.icon?(e.openBlock(),e.createBlock(o,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(n.icon)},null,2)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(l,{"menu-items":n.children,"on-menu-click":t.onMenuClick},null,8,["menu-items","on-menu-click"])]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(r,{key:1,index:n.name,onClick:m=>t.onMenuClick(n)},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),default:e.withCtx(()=>[n.icon?(e.openBlock(),e.createBlock(o,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(n.icon)},null,2)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1032,["index","onClick"]))],64))),128)}}});exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./TreeMenu.vue.cjs");
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./TreeMenu.vue.cjs");exports.default=e.default;
|
package/dist/cjs/hooks/tab.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@duxweb/dvha-core")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@duxweb/dvha-core"),a=require("vue"),s=require("vue-router");function c(){const e=n.useTabStore(),u=s.useRouter(),o=a.computed(()=>({modelValue:e.current,onTabRemove:t=>{e.delTab(t,r=>{u.push(r.path||"")})},onTabChange:t=>{e.changeTab(t,r=>{u.push(r.path||"")})}}));return{...e,props:o}}exports.useElmTab=c;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/menu/TreeMenu.vue.cjs"),t=require("./hooks/tab.cjs");exports.TreeMenu=e.default;exports.useElmTab=t.useElmTab;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
import { normalizeClass as d, toDisplayString as _ } from "../../node_modules/@vue/shared/dist/shared.esm-bundler.js";
|
|
4
|
-
const v = /* @__PURE__ */ C({
|
|
1
|
+
import { defineComponent as f, resolveComponent as t, createElementBlock as r, openBlock as n, Fragment as a, renderList as y, createBlock as o, withCtx as l, createCommentVNode as i, createVNode as x, createElementVNode as m, normalizeClass as d, createTextVNode as s, toDisplayString as _ } from "vue";
|
|
2
|
+
const v = /* @__PURE__ */ f({
|
|
5
3
|
name: "TreeMenu",
|
|
6
4
|
__name: "TreeMenu",
|
|
7
5
|
props: {
|
|
@@ -17,20 +15,20 @@ const v = /* @__PURE__ */ C({
|
|
|
17
15
|
},
|
|
18
16
|
setup(c) {
|
|
19
17
|
return (M, h) => {
|
|
20
|
-
const
|
|
21
|
-
return n(!0),
|
|
18
|
+
const u = t("el-icon"), k = t("TreeMenu", !0), p = t("el-sub-menu"), C = t("el-menu-item");
|
|
19
|
+
return n(!0), r(a, null, y(c.menuItems, (e) => (n(), r(a, {
|
|
22
20
|
key: e.name
|
|
23
21
|
}, [
|
|
24
|
-
e.children && e.children.length ? (n(),
|
|
22
|
+
e.children && e.children.length ? (n(), o(p, {
|
|
25
23
|
key: 0,
|
|
26
24
|
index: e.name
|
|
27
25
|
}, {
|
|
28
|
-
title:
|
|
26
|
+
title: l(() => [
|
|
29
27
|
s(_(e.label), 1)
|
|
30
28
|
]),
|
|
31
|
-
default:
|
|
32
|
-
e.icon ? (n(),
|
|
33
|
-
default:
|
|
29
|
+
default: l(() => [
|
|
30
|
+
e.icon ? (n(), o(u, { key: 0 }, {
|
|
31
|
+
default: l(() => [
|
|
34
32
|
m("div", {
|
|
35
33
|
class: d(e.icon)
|
|
36
34
|
}, null, 2)
|
|
@@ -43,17 +41,17 @@ const v = /* @__PURE__ */ C({
|
|
|
43
41
|
}, null, 8, ["menu-items", "on-menu-click"])
|
|
44
42
|
]),
|
|
45
43
|
_: 2
|
|
46
|
-
}, 1032, ["index"])) : (n(),
|
|
44
|
+
}, 1032, ["index"])) : (n(), o(C, {
|
|
47
45
|
key: 1,
|
|
48
46
|
index: e.name,
|
|
49
|
-
onClick: (
|
|
47
|
+
onClick: (T) => c.onMenuClick(e)
|
|
50
48
|
}, {
|
|
51
|
-
title:
|
|
49
|
+
title: l(() => [
|
|
52
50
|
s(_(e.label), 1)
|
|
53
51
|
]),
|
|
54
|
-
default:
|
|
55
|
-
e.icon ? (n(),
|
|
56
|
-
default:
|
|
52
|
+
default: l(() => [
|
|
53
|
+
e.icon ? (n(), o(u, { key: 0 }, {
|
|
54
|
+
default: l(() => [
|
|
57
55
|
m("div", {
|
|
58
56
|
class: d(e.icon)
|
|
59
57
|
}, null, 2)
|
package/dist/esm/hooks/tab.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { useTabStore as a } from "@duxweb/dvha-core";
|
|
2
|
-
import "
|
|
3
|
-
import { useRouter as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const o = a(), e = n(), u = p(() => ({
|
|
2
|
+
import { computed as n } from "vue";
|
|
3
|
+
import { useRouter as p } from "vue-router";
|
|
4
|
+
function c() {
|
|
5
|
+
const o = a(), t = p(), u = n(() => ({
|
|
7
6
|
modelValue: o.current,
|
|
8
|
-
onTabRemove: (
|
|
9
|
-
o.delTab(
|
|
10
|
-
|
|
7
|
+
onTabRemove: (e) => {
|
|
8
|
+
o.delTab(e, (r) => {
|
|
9
|
+
t.push(r.path || "");
|
|
11
10
|
});
|
|
12
11
|
},
|
|
13
|
-
onTabChange: (
|
|
14
|
-
o.changeTab(
|
|
15
|
-
|
|
12
|
+
onTabChange: (e) => {
|
|
13
|
+
o.changeTab(e, (r) => {
|
|
14
|
+
t.push(r.path || "");
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
17
|
}));
|
|
@@ -22,5 +21,5 @@ function h() {
|
|
|
22
21
|
};
|
|
23
22
|
}
|
|
24
23
|
export {
|
|
25
|
-
|
|
24
|
+
c as useElmTab
|
|
26
25
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { default as o } from "./components/menu/TreeMenu.vue.js";
|
|
2
|
+
import { useElmTab as f } from "./hooks/tab.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
o as TreeMenu,
|
|
5
|
+
f as useElmTab
|
|
6
6
|
};
|