hy-dispatch-ui-v3 0.2.19 → 0.2.20
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,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent, useModel, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList,
|
|
1
|
+
import { defineComponent, useModel, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, unref, withCtx, withModifiers, createVNode, toDisplayString, normalizeStyle, createCommentVNode, mergeModels } from 'vue';
|
|
2
2
|
import { ElIcon } from 'element-plus';
|
|
3
3
|
import { Download } from '@element-plus/icons-vue';
|
|
4
|
-
import { usePermissionMap } from '../../hooks/usePermissionMap.mjs';
|
|
5
4
|
import { AppTooltip } from '../appTooltip/index.mjs';
|
|
6
5
|
import { AppIcon } from '../appIcon/index.mjs';
|
|
7
6
|
|
|
@@ -16,24 +15,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
16
15
|
type: Array,
|
|
17
16
|
default: () => []
|
|
18
17
|
},
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: () => ""
|
|
21
|
+
},
|
|
19
22
|
showShrink: {
|
|
20
23
|
type: Boolean,
|
|
21
24
|
default: false
|
|
22
25
|
}
|
|
23
26
|
}, {
|
|
24
|
-
"modelValue": { type: String, default: "" },
|
|
25
|
-
"modelModifiers": {},
|
|
26
27
|
"expand": { type: Boolean, default: true },
|
|
27
28
|
"expandModifiers": {}
|
|
28
29
|
}),
|
|
29
|
-
emits: /* @__PURE__ */ mergeModels(["select", "open", "close"], ["update:
|
|
30
|
+
emits: /* @__PURE__ */ mergeModels(["select", "open", "close"], ["update:expand"]),
|
|
30
31
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
31
32
|
const emits = __emit;
|
|
32
|
-
const { permissionMap } = usePermissionMap();
|
|
33
|
-
const modelValue = useModel(__props, "modelValue");
|
|
34
33
|
const expand = useModel(__props, "expand");
|
|
35
34
|
function onClickHandler(item) {
|
|
36
|
-
modelValue.value = item.path;
|
|
37
35
|
emits("select", item);
|
|
38
36
|
}
|
|
39
37
|
function onExpandHandler() {
|
|
@@ -53,47 +51,39 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
53
51
|
Fragment,
|
|
54
52
|
null,
|
|
55
53
|
renderList(__props.menu, (item, index) => {
|
|
56
|
-
return openBlock(),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
]),
|
|
90
|
-
_: 2
|
|
91
|
-
/* DYNAMIC */
|
|
92
|
-
}, 1032, ["disabled", "content"])) : createCommentVNode("v-if", true)
|
|
93
|
-
],
|
|
94
|
-
64
|
|
95
|
-
/* STABLE_FRAGMENT */
|
|
96
|
-
);
|
|
54
|
+
return openBlock(), createBlock(unref(AppTooltip), {
|
|
55
|
+
key: index,
|
|
56
|
+
"is-always": "",
|
|
57
|
+
overLine: 1,
|
|
58
|
+
disabled: expand.value,
|
|
59
|
+
content: item.label,
|
|
60
|
+
placement: "right"
|
|
61
|
+
}, {
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
createElementVNode("div", {
|
|
64
|
+
class: normalizeClass(["operator-menu-item", { "operator-menu-item-active": __props.modelValue === item.path }]),
|
|
65
|
+
onClick: withModifiers(($event) => onClickHandler(item), ["stop"])
|
|
66
|
+
}, [
|
|
67
|
+
createElementVNode("div", { class: "operator-label clickBox" }, [
|
|
68
|
+
createVNode(unref(AppIcon), {
|
|
69
|
+
"svg-name": `${item.iconName}`,
|
|
70
|
+
"class-name": "!w-5 !h-5 flex-shrink-0"
|
|
71
|
+
}, null, 8, ["svg-name"]),
|
|
72
|
+
createElementVNode(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
class: normalizeClass([{ "ml-3": expand.value }, "over_one_line w-full px-2"])
|
|
76
|
+
},
|
|
77
|
+
toDisplayString(expand.value ? item.label : item.tip || item.label),
|
|
78
|
+
3
|
|
79
|
+
/* TEXT, CLASS */
|
|
80
|
+
)
|
|
81
|
+
])
|
|
82
|
+
], 10, ["onClick"])
|
|
83
|
+
]),
|
|
84
|
+
_: 2
|
|
85
|
+
/* DYNAMIC */
|
|
86
|
+
}, 1032, ["disabled", "content"]);
|
|
97
87
|
}),
|
|
98
88
|
128
|
|
99
89
|
/* KEYED_FRAGMENT */
|
package/es/version.mjs
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
-
var usePermissionMap = require('../../hooks/usePermissionMap.js');
|
|
9
8
|
var index = require('../appTooltip/index.js');
|
|
10
9
|
var index$1 = require('../appIcon/index.js');
|
|
11
10
|
|
|
@@ -20,24 +19,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
20
19
|
type: Array,
|
|
21
20
|
default: () => []
|
|
22
21
|
},
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: () => ""
|
|
25
|
+
},
|
|
23
26
|
showShrink: {
|
|
24
27
|
type: Boolean,
|
|
25
28
|
default: false
|
|
26
29
|
}
|
|
27
30
|
}, {
|
|
28
|
-
"modelValue": { type: String, default: "" },
|
|
29
|
-
"modelModifiers": {},
|
|
30
31
|
"expand": { type: Boolean, default: true },
|
|
31
32
|
"expandModifiers": {}
|
|
32
33
|
}),
|
|
33
|
-
emits: /* @__PURE__ */ vue.mergeModels(["select", "open", "close"], ["update:
|
|
34
|
+
emits: /* @__PURE__ */ vue.mergeModels(["select", "open", "close"], ["update:expand"]),
|
|
34
35
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
35
36
|
const emits = __emit;
|
|
36
|
-
const { permissionMap } = usePermissionMap.usePermissionMap();
|
|
37
|
-
const modelValue = vue.useModel(__props, "modelValue");
|
|
38
37
|
const expand = vue.useModel(__props, "expand");
|
|
39
38
|
function onClickHandler(item) {
|
|
40
|
-
modelValue.value = item.path;
|
|
41
39
|
emits("select", item);
|
|
42
40
|
}
|
|
43
41
|
function onExpandHandler() {
|
|
@@ -57,47 +55,39 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
57
55
|
vue.Fragment,
|
|
58
56
|
null,
|
|
59
57
|
vue.renderList(__props.menu, (item, index$2) => {
|
|
60
|
-
return vue.openBlock(), vue.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
]),
|
|
94
|
-
_: 2
|
|
95
|
-
/* DYNAMIC */
|
|
96
|
-
}, 1032, ["disabled", "content"])) : vue.createCommentVNode("v-if", true)
|
|
97
|
-
],
|
|
98
|
-
64
|
|
99
|
-
/* STABLE_FRAGMENT */
|
|
100
|
-
);
|
|
58
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.AppTooltip), {
|
|
59
|
+
key: index$2,
|
|
60
|
+
"is-always": "",
|
|
61
|
+
overLine: 1,
|
|
62
|
+
disabled: expand.value,
|
|
63
|
+
content: item.label,
|
|
64
|
+
placement: "right"
|
|
65
|
+
}, {
|
|
66
|
+
default: vue.withCtx(() => [
|
|
67
|
+
vue.createElementVNode("div", {
|
|
68
|
+
class: vue.normalizeClass(["operator-menu-item", { "operator-menu-item-active": __props.modelValue === item.path }]),
|
|
69
|
+
onClick: vue.withModifiers(($event) => onClickHandler(item), ["stop"])
|
|
70
|
+
}, [
|
|
71
|
+
vue.createElementVNode("div", { class: "operator-label clickBox" }, [
|
|
72
|
+
vue.createVNode(vue.unref(index$1.AppIcon), {
|
|
73
|
+
"svg-name": `${item.iconName}`,
|
|
74
|
+
"class-name": "!w-5 !h-5 flex-shrink-0"
|
|
75
|
+
}, null, 8, ["svg-name"]),
|
|
76
|
+
vue.createElementVNode(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
class: vue.normalizeClass([{ "ml-3": expand.value }, "over_one_line w-full px-2"])
|
|
80
|
+
},
|
|
81
|
+
vue.toDisplayString(expand.value ? item.label : item.tip || item.label),
|
|
82
|
+
3
|
|
83
|
+
/* TEXT, CLASS */
|
|
84
|
+
)
|
|
85
|
+
])
|
|
86
|
+
], 10, ["onClick"])
|
|
87
|
+
]),
|
|
88
|
+
_: 2
|
|
89
|
+
/* DYNAMIC */
|
|
90
|
+
}, 1032, ["disabled", "content"]);
|
|
101
91
|
}),
|
|
102
92
|
128
|
|
103
93
|
/* KEYED_FRAGMENT */
|
package/lib/version.js
CHANGED