@wfrog/vc-ui 1.10.0 → 1.10.2
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/es/components/explorer-list/explorer-list.d.ts +1 -0
- package/dist/es/components/explorer-list/explorer-list.mjs +64 -49
- package/dist/es/components/explorer-list/explorer-list.vue.d.ts +32 -3
- package/dist/es/components/explorer-list/index.css +13 -13
- package/dist/es/components/explorer-tree/explorer-tree.d.ts +2 -1
- package/dist/es/components/explorer-tree/explorer-tree.mjs +69 -56
- package/dist/es/components/explorer-tree/explorer-tree.vue.d.ts +10 -1
- package/dist/es/components/explorer-tree/index.css +16 -16
- package/dist/es/index.mjs +1 -1
- package/dist/index.css +29 -29
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css'
|
|
2
2
|
import '../../chunk/Gk1J52Yw.mjs';
|
|
3
|
-
import { defineComponent, ref, computed, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createElementVNode, Fragment, renderList, unref, renderSlot, createTextVNode, toDisplayString, mergeProps, vShow, createVNode } from 'vue';
|
|
3
|
+
import { defineComponent, ref, computed, watch, onBeforeUnmount, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createElementVNode, Fragment, renderList, unref, renderSlot, createTextVNode, toDisplayString, mergeProps, vShow, createVNode } from 'vue';
|
|
4
4
|
import { Loading } from '@element-plus/icons-vue';
|
|
5
5
|
import { C as Component$3 } from '../button/button.mjs';
|
|
6
6
|
import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
|
|
@@ -21,6 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
loading: { type: Boolean },
|
|
22
22
|
loadingText: { default: "数据加载中..." },
|
|
23
23
|
highlightCurrent: { type: Boolean, default: true },
|
|
24
|
+
deepWatch: { type: Boolean, default: false },
|
|
24
25
|
confirmParams: { type: Function, default: (item) => {
|
|
25
26
|
return { msg: `确定要删除 ${item.label} 吗?` };
|
|
26
27
|
} }
|
|
@@ -41,10 +42,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
42
|
const filterMethod = props.filterMethod || ((keyword, item) => {
|
|
42
43
|
return item.label.toLowerCase().includes(keyword.toLowerCase());
|
|
43
44
|
});
|
|
45
|
+
const listData = ref([]);
|
|
44
46
|
const myData = computed(() => {
|
|
45
|
-
return filterKeyword.value ?
|
|
47
|
+
return filterKeyword.value ? listData.value.filter((item) => filterMethod(filterKeyword.value, item)) : listData.value;
|
|
46
48
|
});
|
|
47
49
|
const isEmpty = computed(() => myData.value.length === 0);
|
|
50
|
+
const propsWatch = watch(() => props.data, (value) => {
|
|
51
|
+
listData.value = value;
|
|
52
|
+
}, { immediate: true, deep: props.deepWatch });
|
|
48
53
|
function handleClick(item, e) {
|
|
49
54
|
if (!props.highlightCurrent) {
|
|
50
55
|
return;
|
|
@@ -57,6 +62,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
62
|
actived.value = value;
|
|
58
63
|
}
|
|
59
64
|
});
|
|
65
|
+
onBeforeUnmount(() => {
|
|
66
|
+
propsWatch.stop();
|
|
67
|
+
});
|
|
60
68
|
return (_ctx, _cache) => {
|
|
61
69
|
const _component_ElIcon = ElIcon;
|
|
62
70
|
return openBlock(), createBlock(Component$1, {
|
|
@@ -71,45 +79,54 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
79
|
class: normalizeClass([_ctx.$style.item, { [_ctx.$style.active]: unref(actived) === item.value }]),
|
|
72
80
|
onClick: (e) => handleClick(item, e)
|
|
73
81
|
}, [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
renderSlot(_ctx.$slots, "item", {
|
|
83
|
+
data: item,
|
|
84
|
+
index
|
|
85
|
+
}, () => [
|
|
86
|
+
createElementVNode("div", {
|
|
87
|
+
class: normalizeClass(_ctx.$style.label)
|
|
88
|
+
}, [
|
|
89
|
+
renderSlot(_ctx.$slots, "label", {
|
|
90
|
+
data: item,
|
|
91
|
+
index
|
|
92
|
+
}, () => [
|
|
93
|
+
item.icon ? (openBlock(), createBlock(Component$2, {
|
|
94
|
+
key: 0,
|
|
95
|
+
name: item.icon,
|
|
96
|
+
class: normalizeClass(_ctx.$style.icon)
|
|
97
|
+
}, null, 8, ["name", "class"])) : createCommentVNode("", true),
|
|
98
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
99
|
+
])
|
|
100
|
+
], 2),
|
|
101
|
+
__props.actions.length ? (openBlock(), createElementBlock("div", {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: normalizeClass(_ctx.$style.actions)
|
|
104
|
+
}, [
|
|
105
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action) => {
|
|
106
|
+
return openBlock(), createElementBlock(Fragment, { key: action }, [
|
|
107
|
+
action === "action" ? renderSlot(_ctx.$slots, "action", {
|
|
108
|
+
key: 0,
|
|
109
|
+
data: item,
|
|
110
|
+
index
|
|
111
|
+
}) : (openBlock(), createBlock(Component$3, mergeProps({
|
|
112
|
+
key: 1,
|
|
113
|
+
ref_for: true
|
|
114
|
+
}, actionsMapping[action], {
|
|
115
|
+
confirm: action === "remove" ? __props.confirmParams(item) : void 0,
|
|
116
|
+
class: action === "remove" ? _ctx.$style.remove : void 0,
|
|
117
|
+
link: "",
|
|
118
|
+
icon: { type: "el", name: actionsMapping[action].icon },
|
|
119
|
+
stop: "",
|
|
120
|
+
onClick: ($event) => emits(action, item.value, item)
|
|
121
|
+
}), null, 16, ["confirm", "class", "icon", "onClick"]))
|
|
122
|
+
], 64);
|
|
123
|
+
}), 128))
|
|
124
|
+
], 2)) : createCommentVNode("", true),
|
|
125
|
+
renderSlot(_ctx.$slots, "extra-label", {
|
|
78
126
|
data: item,
|
|
79
127
|
index
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
key: 0,
|
|
83
|
-
name: item.icon,
|
|
84
|
-
class: normalizeClass(_ctx.$style.icon)
|
|
85
|
-
}, null, 8, ["name", "class"])) : createCommentVNode("", true),
|
|
86
|
-
createTextVNode(toDisplayString(item.label), 1)
|
|
87
|
-
])
|
|
88
|
-
], 2),
|
|
89
|
-
__props.actions.length ? (openBlock(), createElementBlock("div", {
|
|
90
|
-
key: 0,
|
|
91
|
-
class: normalizeClass(_ctx.$style.actions)
|
|
92
|
-
}, [
|
|
93
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action) => {
|
|
94
|
-
return openBlock(), createElementBlock(Fragment, { key: action }, [
|
|
95
|
-
action === "action" ? renderSlot(_ctx.$slots, "action", {
|
|
96
|
-
key: 0,
|
|
97
|
-
data: item,
|
|
98
|
-
index
|
|
99
|
-
}) : (openBlock(), createBlock(Component$3, mergeProps({
|
|
100
|
-
key: 1,
|
|
101
|
-
ref_for: true
|
|
102
|
-
}, actionsMapping[action], {
|
|
103
|
-
confirm: action === "remove" ? __props.confirmParams(item) : void 0,
|
|
104
|
-
class: action === "remove" ? _ctx.$style.remove : void 0,
|
|
105
|
-
link: "",
|
|
106
|
-
icon: { type: "el", name: actionsMapping[action].icon },
|
|
107
|
-
stop: "",
|
|
108
|
-
onClick: ($event) => emits(action, item.value, item)
|
|
109
|
-
}), null, 16, ["confirm", "class", "icon", "onClick"]))
|
|
110
|
-
], 64);
|
|
111
|
-
}), 128))
|
|
112
|
-
], 2)) : createCommentVNode("", true)
|
|
128
|
+
})
|
|
129
|
+
])
|
|
113
130
|
], 10, _hoisted_1);
|
|
114
131
|
}), 128))
|
|
115
132
|
], 512), [
|
|
@@ -138,21 +155,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
155
|
}
|
|
139
156
|
});
|
|
140
157
|
|
|
141
|
-
/* unplugin-vue-components disabled */const item = "
|
|
142
|
-
const actions = "
|
|
143
|
-
const active = "
|
|
144
|
-
const label = "
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
const scrollbar = "_scrollbar_1xtjk_61";
|
|
158
|
+
/* unplugin-vue-components disabled */const item = "_item_lodh1_1";
|
|
159
|
+
const actions = "_actions_lodh1_16";
|
|
160
|
+
const active = "_active_lodh1_20";
|
|
161
|
+
const label = "_label_lodh1_25";
|
|
162
|
+
const remove = "_remove_lodh1_47";
|
|
163
|
+
const empty = "_empty_lodh1_51";
|
|
164
|
+
const loading = "_loading_lodh1_52";
|
|
165
|
+
const scrollbar = "_scrollbar_lodh1_60";
|
|
150
166
|
const style0 = {
|
|
151
167
|
item: item,
|
|
152
168
|
actions: actions,
|
|
153
169
|
active: active,
|
|
154
170
|
label: label,
|
|
155
|
-
icon: icon,
|
|
156
171
|
remove: remove,
|
|
157
172
|
empty: empty,
|
|
158
173
|
loading: loading,
|
|
@@ -2,12 +2,40 @@ import { IExplorerListItem, IExplorerListProps } from './explorer-list';
|
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
5
|
-
|
|
6
|
-
data:
|
|
5
|
+
item?(_: {
|
|
6
|
+
data: {
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: string | undefined;
|
|
9
|
+
value: string | number;
|
|
10
|
+
original?: any;
|
|
11
|
+
};
|
|
12
|
+
index: number;
|
|
13
|
+
}): any;
|
|
14
|
+
label?(_: {
|
|
15
|
+
data: {
|
|
16
|
+
label: string;
|
|
17
|
+
icon?: string | undefined;
|
|
18
|
+
value: string | number;
|
|
19
|
+
original?: any;
|
|
20
|
+
};
|
|
7
21
|
index: number;
|
|
8
22
|
}): any;
|
|
9
23
|
action?(_: {
|
|
10
|
-
data:
|
|
24
|
+
data: {
|
|
25
|
+
label: string;
|
|
26
|
+
icon?: string | undefined;
|
|
27
|
+
value: string | number;
|
|
28
|
+
original?: any;
|
|
29
|
+
};
|
|
30
|
+
index: number;
|
|
31
|
+
}): any;
|
|
32
|
+
'extra-label'?(_: {
|
|
33
|
+
data: {
|
|
34
|
+
label: string;
|
|
35
|
+
icon?: string | undefined;
|
|
36
|
+
value: string | number;
|
|
37
|
+
original?: any;
|
|
38
|
+
};
|
|
11
39
|
index: number;
|
|
12
40
|
}): any;
|
|
13
41
|
};
|
|
@@ -37,6 +65,7 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerListProps,
|
|
|
37
65
|
emptyText: string;
|
|
38
66
|
highlightCurrent: boolean;
|
|
39
67
|
actions: ("create" | "modify" | "remove" | "up" | "down" | "action")[];
|
|
68
|
+
deepWatch: boolean;
|
|
40
69
|
confirmParams: (item: IExplorerListItem) => import('../button/button').IButtonProps["confirm"];
|
|
41
70
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
42
71
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* source: src/components/explorer-list/explorer-list.vue */
|
|
2
|
-
.
|
|
2
|
+
._item_lodh1_1 {
|
|
3
3
|
padding: 4px 8px;
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
display: flex;
|
|
@@ -11,48 +11,48 @@
|
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
line-height: 1;
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
._item_lodh1_1:hover {
|
|
15
15
|
background-color: var(--el-color-primary-light-9);
|
|
16
16
|
}
|
|
17
|
-
.
|
|
17
|
+
._item_lodh1_1:hover ._actions_lodh1_16 {
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
align-items: flex-start;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
._item_lodh1_1._active_lodh1_20 {
|
|
22
22
|
color: var(--el-color-primary);
|
|
23
23
|
background-color: var(--el-color-primary-light-9);
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
._label_lodh1_25 {
|
|
26
26
|
overflow: hidden;
|
|
27
27
|
text-overflow: ellipsis;
|
|
28
28
|
white-space: nowrap;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
._label_lodh1_25 .iconify {
|
|
31
31
|
margin-right: 4px;
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
._actions_lodh1_16 {
|
|
34
34
|
display: none;
|
|
35
35
|
column-gap: 4px;
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
._actions_lodh1_16 > button {
|
|
38
38
|
margin-left: 0 !important;
|
|
39
39
|
font-size: 1.2em;
|
|
40
40
|
border: 1px solid var(--el-border-color-light) !important;
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
._actions_lodh1_16 > button:hover {
|
|
43
43
|
border-color: var(--el-border-color-dark) !important;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
._remove_lodh1_47 {
|
|
46
46
|
transform: translateY(-1px);
|
|
47
47
|
}
|
|
48
|
-
.
|
|
49
|
-
.
|
|
48
|
+
._empty_lodh1_51,
|
|
49
|
+
._loading_lodh1_52 {
|
|
50
50
|
padding: 4px 8px;
|
|
51
51
|
display: flex;
|
|
52
52
|
align-items: center;
|
|
53
53
|
column-gap: 4px;
|
|
54
54
|
color: var(--el-text-color-secondary);
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
._scrollbar_lodh1_60 {
|
|
57
57
|
margin: 0 -8px;
|
|
58
58
|
}
|
|
@@ -5,7 +5,7 @@ import { IButtonProps } from '../button/button';
|
|
|
5
5
|
export interface IExplorerTreeProps {
|
|
6
6
|
data?: TreeComponentProps['data'];
|
|
7
7
|
actions?: ('create' | 'modify' | 'remove' | 'up' | 'down' | 'action')[];
|
|
8
|
-
treeProps?: TreeComponentProps
|
|
8
|
+
treeProps?: Partial<TreeComponentProps>;
|
|
9
9
|
emptyText?: string;
|
|
10
10
|
defaultExpandAll?: boolean;
|
|
11
11
|
pending?: boolean;
|
|
@@ -14,6 +14,7 @@ export interface IExplorerTreeProps {
|
|
|
14
14
|
confirmParams?: (node: Node) => IButtonProps['confirm'];
|
|
15
15
|
filterMethod?: TreeComponentProps['filterNodeMethod'];
|
|
16
16
|
highlightCurrent?: boolean;
|
|
17
|
+
deepWatch?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export interface IExplorerTreeEmits {
|
|
19
20
|
(e: 'nodeClick', value: string | number, node: Node, instance: ComponentInternalInstance | null, event: MouseEvent): void;
|
|
@@ -3,7 +3,7 @@ import '../../chunk/Gk1J52Yw.mjs';
|
|
|
3
3
|
import { E as ElTree } from '../../chunk/eqwEsspo.mjs';
|
|
4
4
|
import '../../chunk/DBf73TLo.mjs';
|
|
5
5
|
import '../../chunk/DbhQlaOz.mjs';
|
|
6
|
-
import { defineComponent, useTemplateRef, computed, watch, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createVNode, mergeProps, unref,
|
|
6
|
+
import { defineComponent, useTemplateRef, ref, computed, watch, onBeforeUnmount, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createVNode, mergeProps, unref, renderSlot, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, vShow } from 'vue';
|
|
7
7
|
import { Loading } from '@element-plus/icons-vue';
|
|
8
8
|
import { C as Component$3 } from '../button/button.mjs';
|
|
9
9
|
import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
|
|
@@ -27,7 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
return { msg: `确定要删除 ${node.data.label} 吗?` };
|
|
28
28
|
} },
|
|
29
29
|
filterMethod: {},
|
|
30
|
-
highlightCurrent: { type: Boolean, default: true }
|
|
30
|
+
highlightCurrent: { type: Boolean, default: true },
|
|
31
|
+
deepWatch: { type: Boolean, default: false }
|
|
31
32
|
},
|
|
32
33
|
emits: ["nodeClick", "create", "modify", "remove", "up", "down"],
|
|
33
34
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -42,8 +43,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
43
|
up: { title: "上移", type: "success", icon: "Top" },
|
|
43
44
|
down: { title: "下移", type: "success", icon: "Bottom" }
|
|
44
45
|
};
|
|
46
|
+
const treeData = ref();
|
|
45
47
|
const treeProps = computed(() => ({
|
|
46
|
-
data: props.data,
|
|
47
48
|
emptyText: props.emptyText,
|
|
48
49
|
defaultExpandAll: props.defaultExpandAll,
|
|
49
50
|
expandOnClickNode: false,
|
|
@@ -61,15 +62,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
62
|
function handleNodeClick(data, node, instance, event) {
|
|
62
63
|
emits("nodeClick", data.value, node, instance, event);
|
|
63
64
|
}
|
|
64
|
-
watch(filterKeyword, (value) =>
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
const filterWatch = watch(filterKeyword, (value) => treeRef.value?.filter(value));
|
|
66
|
+
const propsWatch = watch(() => props.data, (value) => {
|
|
67
|
+
treeData.value = value;
|
|
68
|
+
}, { immediate: true, deep: props.deepWatch });
|
|
67
69
|
__expose({
|
|
68
70
|
getTreeRef: () => treeRef.value,
|
|
69
71
|
setActive: (value, shouldAutoExpandParent = true) => {
|
|
70
72
|
treeRef.value?.setCurrentKey(value, shouldAutoExpandParent);
|
|
71
73
|
}
|
|
72
74
|
});
|
|
75
|
+
onBeforeUnmount(() => {
|
|
76
|
+
filterWatch.stop();
|
|
77
|
+
propsWatch.stop();
|
|
78
|
+
});
|
|
73
79
|
return (_ctx, _cache) => {
|
|
74
80
|
const _component_ElTree = ElTree;
|
|
75
81
|
const _component_ElIcon = ElIcon;
|
|
@@ -80,59 +86,68 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
86
|
default: withCtx(() => [
|
|
81
87
|
withDirectives(createVNode(_component_ElTree, mergeProps({
|
|
82
88
|
ref_key: "treeRef",
|
|
83
|
-
ref: treeRef
|
|
89
|
+
ref: treeRef,
|
|
90
|
+
data: unref(treeData)
|
|
84
91
|
}, { ..._ctx.$attrs, ...unref(treeProps) }, {
|
|
85
92
|
class: _ctx.$style.tree,
|
|
86
93
|
"filter-node-method": filterNode,
|
|
87
94
|
onNodeClick: handleNodeClick
|
|
88
95
|
}), {
|
|
89
96
|
default: withCtx(({ node }) => [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
renderSlot(_ctx.$slots, "node", {
|
|
98
|
+
data: node.data,
|
|
99
|
+
index: node.index
|
|
100
|
+
}, () => [
|
|
93
101
|
createElementVNode("div", {
|
|
94
|
-
class: normalizeClass(_ctx.$style.
|
|
102
|
+
class: normalizeClass(_ctx.$style.node)
|
|
95
103
|
}, [
|
|
96
|
-
|
|
104
|
+
createElementVNode("div", {
|
|
105
|
+
class: normalizeClass(_ctx.$style.label)
|
|
106
|
+
}, [
|
|
107
|
+
renderSlot(_ctx.$slots, "label", {
|
|
108
|
+
data: node.data,
|
|
109
|
+
index: node.index
|
|
110
|
+
}, () => [
|
|
111
|
+
node.data.icon ? (openBlock(), createBlock(Component$2, {
|
|
112
|
+
key: 0,
|
|
113
|
+
name: node.data.icon
|
|
114
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
115
|
+
createTextVNode(toDisplayString(node.data.label), 1)
|
|
116
|
+
])
|
|
117
|
+
], 2),
|
|
118
|
+
__props.actions.length ? (openBlock(), createElementBlock("div", {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: normalizeClass(["vc-actions", [_ctx.$style.actions]])
|
|
121
|
+
}, [
|
|
122
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action) => {
|
|
123
|
+
return openBlock(), createElementBlock(Fragment, { key: action }, [
|
|
124
|
+
action === "action" ? renderSlot(_ctx.$slots, "action", {
|
|
125
|
+
key: 0,
|
|
126
|
+
data: node.data,
|
|
127
|
+
index: node.index
|
|
128
|
+
}) : (openBlock(), createBlock(Component$3, mergeProps({
|
|
129
|
+
key: 1,
|
|
130
|
+
ref_for: true
|
|
131
|
+
}, actionsMapping[action], {
|
|
132
|
+
confirm: action === "remove" ? __props.confirmParams(node) : void 0,
|
|
133
|
+
class: action === "remove" ? _ctx.$style.remove : void 0,
|
|
134
|
+
link: "",
|
|
135
|
+
icon: { type: "el", name: actionsMapping[action].icon },
|
|
136
|
+
stop: "",
|
|
137
|
+
onClick: ($event) => emits(action, node.data.value, node)
|
|
138
|
+
}), null, 16, ["confirm", "class", "icon", "onClick"]))
|
|
139
|
+
], 64);
|
|
140
|
+
}), 128))
|
|
141
|
+
], 2)) : createCommentVNode("", true),
|
|
142
|
+
renderSlot(_ctx.$slots, "extra-label", {
|
|
97
143
|
data: node.data,
|
|
98
144
|
index: node.index
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
name: node.data.icon,
|
|
103
|
-
class: normalizeClass(_ctx.$style.icon)
|
|
104
|
-
}, null, 8, ["name", "class"])) : createCommentVNode("", true),
|
|
105
|
-
createTextVNode(toDisplayString(node.data.label), 1)
|
|
106
|
-
])
|
|
107
|
-
], 2),
|
|
108
|
-
__props.actions.length ? (openBlock(), createElementBlock("div", {
|
|
109
|
-
key: 0,
|
|
110
|
-
class: normalizeClass(["vc-actions", [_ctx.$style.actions]])
|
|
111
|
-
}, [
|
|
112
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action) => {
|
|
113
|
-
return openBlock(), createElementBlock(Fragment, { key: action }, [
|
|
114
|
-
action === "action" ? renderSlot(_ctx.$slots, "action", {
|
|
115
|
-
key: 0,
|
|
116
|
-
data: node.data,
|
|
117
|
-
index: node.index
|
|
118
|
-
}) : (openBlock(), createBlock(Component$3, mergeProps({
|
|
119
|
-
key: 1,
|
|
120
|
-
ref_for: true
|
|
121
|
-
}, actionsMapping[action], {
|
|
122
|
-
confirm: action === "remove" ? __props.confirmParams(node) : void 0,
|
|
123
|
-
class: action === "remove" ? _ctx.$style.remove : void 0,
|
|
124
|
-
link: "",
|
|
125
|
-
icon: { type: "el", name: actionsMapping[action].icon },
|
|
126
|
-
stop: "",
|
|
127
|
-
onClick: ($event) => emits(action, node.data.value, node)
|
|
128
|
-
}), null, 16, ["confirm", "class", "icon", "onClick"]))
|
|
129
|
-
], 64);
|
|
130
|
-
}), 128))
|
|
131
|
-
], 2)) : createCommentVNode("", true)
|
|
132
|
-
], 2)
|
|
145
|
+
})
|
|
146
|
+
], 2)
|
|
147
|
+
])
|
|
133
148
|
]),
|
|
134
149
|
_: 3
|
|
135
|
-
}, 16, ["class"]), [
|
|
150
|
+
}, 16, ["data", "class"]), [
|
|
136
151
|
[vShow, !__props.loading && !__props.pending]
|
|
137
152
|
]),
|
|
138
153
|
__props.loading ? (openBlock(), createElementBlock("div", {
|
|
@@ -154,19 +169,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
154
169
|
}
|
|
155
170
|
});
|
|
156
171
|
|
|
157
|
-
/* unplugin-vue-components disabled */const tree = "
|
|
158
|
-
const node = "
|
|
159
|
-
const label = "
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
const scrollbar = "_scrollbar_4juik_73";
|
|
172
|
+
/* unplugin-vue-components disabled */const tree = "_tree_185uk_1";
|
|
173
|
+
const node = "_node_185uk_27";
|
|
174
|
+
const label = "_label_185uk_37";
|
|
175
|
+
const actions = "_actions_185uk_47";
|
|
176
|
+
const remove = "_remove_185uk_60";
|
|
177
|
+
const loading = "_loading_185uk_64";
|
|
178
|
+
const scrollbar = "_scrollbar_185uk_72";
|
|
165
179
|
const style0 = {
|
|
166
180
|
tree: tree,
|
|
167
181
|
node: node,
|
|
168
182
|
label: label,
|
|
169
|
-
icon: icon,
|
|
170
183
|
actions: actions,
|
|
171
184
|
remove: remove,
|
|
172
185
|
loading: loading,
|
|
@@ -5,7 +5,11 @@ import { IExplorerTreeProps } from './explorer-tree';
|
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
7
|
slots: {
|
|
8
|
-
|
|
8
|
+
node?(_: {
|
|
9
|
+
data: any;
|
|
10
|
+
index: any;
|
|
11
|
+
}): any;
|
|
12
|
+
label?(_: {
|
|
9
13
|
data: any;
|
|
10
14
|
index: any;
|
|
11
15
|
}): any;
|
|
@@ -13,6 +17,10 @@ declare function __VLS_template(): {
|
|
|
13
17
|
data: any;
|
|
14
18
|
index: any;
|
|
15
19
|
}): any;
|
|
20
|
+
'extra-label'?(_: {
|
|
21
|
+
data: any;
|
|
22
|
+
index: any;
|
|
23
|
+
}): any;
|
|
16
24
|
};
|
|
17
25
|
refs: {
|
|
18
26
|
treeRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
|
@@ -2053,6 +2061,7 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerTreeProps,
|
|
|
2053
2061
|
highlightCurrent: boolean;
|
|
2054
2062
|
defaultExpandAll: boolean;
|
|
2055
2063
|
actions: ("create" | "modify" | "remove" | "up" | "down" | "action")[];
|
|
2064
|
+
deepWatch: boolean;
|
|
2056
2065
|
confirmParams: (node: Node) => import('../button/button').IButtonProps["confirm"];
|
|
2057
2066
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
2058
2067
|
treeRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/* source: src/components/explorer-tree/explorer-tree.vue */
|
|
2
|
-
.
|
|
2
|
+
._tree_185uk_1 .el-tree-node__content {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
}
|
|
6
|
-
.
|
|
6
|
+
._tree_185uk_1 .el-tree-node__content:hover {
|
|
7
7
|
background-color: var(--el-color-primary-light-9);
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
._tree_185uk_1 .el-tree-node__content:hover .vc-actions {
|
|
10
10
|
display: inline-flex;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
._tree_185uk_1 .el-tree-node:focus > .el-tree-node__content {
|
|
13
13
|
background-color: var(--el-color-primary-light-9);
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
._tree_185uk_1 .is-current > .el-tree-node__content {
|
|
16
16
|
color: var(--el-color-primary);
|
|
17
17
|
background-color: var(--el-color-primary-light-9);
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
._tree_185uk_1 .el-tree__empty-block {
|
|
20
20
|
text-align: left;
|
|
21
21
|
min-height: unset;
|
|
22
22
|
padding: 4px 8px;
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
._tree_185uk_1 .el-tree__empty-text {
|
|
25
25
|
position: static;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
._node_185uk_27 {
|
|
28
28
|
display: flex;
|
|
29
29
|
justify-content: space-between;
|
|
30
30
|
align-items: center;
|
|
@@ -33,37 +33,37 @@
|
|
|
33
33
|
box-sizing: border-box;
|
|
34
34
|
width: 100px;
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
._label_185uk_37 {
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
text-overflow: ellipsis;
|
|
39
39
|
white-space: nowrap;
|
|
40
40
|
transform: translateY(-1px);
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
._label_185uk_37 .iconify {
|
|
43
43
|
margin-right: 4px;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
._actions_185uk_47 {
|
|
46
46
|
display: none;
|
|
47
47
|
column-gap: 4px;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
._actions_185uk_47 > button {
|
|
50
50
|
margin-left: 0 !important;
|
|
51
51
|
font-size: 1.2em;
|
|
52
52
|
border: 1px solid var(--el-border-color-light) !important;
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
._actions_185uk_47 > button:hover {
|
|
55
55
|
border-color: var(--el-border-color-dark) !important;
|
|
56
56
|
}
|
|
57
|
-
.
|
|
57
|
+
._remove_185uk_60 {
|
|
58
58
|
transform: translateY(-1px);
|
|
59
59
|
}
|
|
60
|
-
.
|
|
60
|
+
._loading_185uk_64 {
|
|
61
61
|
padding: 4px 8px;
|
|
62
62
|
display: flex;
|
|
63
63
|
align-items: center;
|
|
64
64
|
column-gap: 4px;
|
|
65
65
|
color: var(--el-text-color-secondary);
|
|
66
66
|
}
|
|
67
|
-
.
|
|
67
|
+
._scrollbar_185uk_72 {
|
|
68
68
|
margin: 0 -8px;
|
|
69
69
|
}
|
package/dist/es/index.mjs
CHANGED
|
@@ -156,7 +156,7 @@ const __vite_glob_0_47 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
|
|
|
156
156
|
default: _sfc_main$8
|
|
157
157
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
158
158
|
|
|
159
|
-
const version = "1.10.
|
|
159
|
+
const version = "1.10.2";
|
|
160
160
|
|
|
161
161
|
const modules = /* #__PURE__ */ Object.assign({"./components/awesome-icon/awesome-icon.vue": __vite_glob_0_0,"./components/backbottom/backbottom.vue": __vite_glob_0_1,"./components/button/button.vue": __vite_glob_0_2,"./components/chat-container/chat-container.vue": __vite_glob_0_3,"./components/choice-boolean/choice-boolean.vue": __vite_glob_0_4,"./components/choice/choice.vue": __vite_glob_0_5,"./components/color-switch/color-switch.vue": __vite_glob_0_6,"./components/config-provider/config-provider.vue": __vite_glob_0_7,"./components/cropper/cropper.vue": __vite_glob_0_8,"./components/currency/currency.vue": __vite_glob_0_9,"./components/dark-switch/dark-switch.vue": __vite_glob_0_10,"./components/daterange-picker/daterange-picker.vue": __vite_glob_0_11,"./components/dialog-camera-upload/dialog-camera-upload.vue": __vite_glob_0_12,"./components/dialog-map-point/dialog-map-point.vue": __vite_glob_0_13,"./components/dialog-upload-images/dialog-upload-images.vue": __vite_glob_0_14,"./components/dialog/dialog.vue": __vite_glob_0_15,"./components/drag-verify/drag-verify.vue": __vite_glob_0_16,"./components/drawer/drawer.vue": __vite_glob_0_17,"./components/easy-pagination/easy-pagination.vue": __vite_glob_0_18,"./components/el-icon/el-icon.vue": __vite_glob_0_19,"./components/explorer-column-table/explorer-column-table.vue": __vite_glob_0_20,"./components/explorer-container/explorer-container.vue": __vite_glob_0_21,"./components/explorer-filter/explorer-filter.vue": __vite_glob_0_22,"./components/explorer-footer/explorer-footer.vue": __vite_glob_0_23,"./components/explorer-form/explorer-form.vue": __vite_glob_0_24,"./components/explorer-list/explorer-list.vue": __vite_glob_0_25,"./components/explorer-modal-form/explorer-modal-form.vue": __vite_glob_0_26,"./components/explorer-panel/explorer-panel.vue": __vite_glob_0_27,"./components/explorer-query/explorer-query.vue": __vite_glob_0_28,"./components/explorer-table/explorer-table.vue": __vite_glob_0_29,"./components/explorer-tools/explorer-tools.vue": __vite_glob_0_30,"./components/explorer-tree/explorer-tree.vue": __vite_glob_0_31,"./components/explorer/explorer.vue": __vite_glob_0_32,"./components/flag/flag.vue": __vite_glob_0_33,"./components/icon-picker/icon-picker.vue": __vite_glob_0_34,"./components/icon/icon.vue": __vite_glob_0_35,"./components/iconify-icon/iconify-icon.vue": __vite_glob_0_36,"./components/image/image.vue": __vite_glob_0_37,"./components/input-number/input-number.vue": __vite_glob_0_38,"./components/input/input.vue": __vite_glob_0_39,"./components/pca-picker/pca-picker.vue": __vite_glob_0_40,"./components/qr-code/qr-code.vue": __vite_glob_0_41,"./components/screenfull/screenfull.vue": __vite_glob_0_42,"./components/scrollbar/scrollbar.vue": __vite_glob_0_43,"./components/select/select.vue": __vite_glob_0_44,"./components/single-player/single-player.vue": __vite_glob_0_45,"./components/splitter-panel/splitter-panel.vue": __vite_glob_0_46,"./components/splitter/splitter.vue": __vite_glob_0_47,"./components/svg-icon/svg-icon.vue": __vite_glob_0_48,"./components/switch/switch.vue": __vite_glob_0_49,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_50,"./components/tags/tags.vue": __vite_glob_0_51,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_52,"./components/thousand-input/thousand-input.vue": __vite_glob_0_53,"./components/tinymce/tinymce.vue": __vite_glob_0_54,"./components/transfer-panel/transfer-panel.vue": __vite_glob_0_55,"./components/transfer/transfer.vue": __vite_glob_0_56,"./components/tree-picker/tree-picker.vue": __vite_glob_0_57,"./components/upload-file/upload-file.vue": __vite_glob_0_58});
|
|
162
162
|
const upper = (_, letter) => letter.toUpperCase();
|
package/dist/index.css
CHANGED
|
@@ -693,7 +693,7 @@ div._main_k37nc_1 ._header_k37nc_48 {
|
|
|
693
693
|
margin: 0 -8px;
|
|
694
694
|
}
|
|
695
695
|
/* source: src/components/explorer-list/explorer-list.vue */
|
|
696
|
-
.
|
|
696
|
+
._item_lodh1_1 {
|
|
697
697
|
padding: 4px 8px;
|
|
698
698
|
cursor: pointer;
|
|
699
699
|
display: flex;
|
|
@@ -705,49 +705,49 @@ div._main_k37nc_1 ._header_k37nc_48 {
|
|
|
705
705
|
box-sizing: border-box;
|
|
706
706
|
line-height: 1;
|
|
707
707
|
}
|
|
708
|
-
.
|
|
708
|
+
._item_lodh1_1:hover {
|
|
709
709
|
background-color: var(--el-color-primary-light-9);
|
|
710
710
|
}
|
|
711
|
-
.
|
|
711
|
+
._item_lodh1_1:hover ._actions_lodh1_16 {
|
|
712
712
|
display: inline-flex;
|
|
713
713
|
align-items: flex-start;
|
|
714
714
|
}
|
|
715
|
-
.
|
|
715
|
+
._item_lodh1_1._active_lodh1_20 {
|
|
716
716
|
color: var(--el-color-primary);
|
|
717
717
|
background-color: var(--el-color-primary-light-9);
|
|
718
718
|
}
|
|
719
|
-
.
|
|
719
|
+
._label_lodh1_25 {
|
|
720
720
|
overflow: hidden;
|
|
721
721
|
text-overflow: ellipsis;
|
|
722
722
|
white-space: nowrap;
|
|
723
723
|
}
|
|
724
|
-
.
|
|
724
|
+
._label_lodh1_25 .iconify {
|
|
725
725
|
margin-right: 4px;
|
|
726
726
|
}
|
|
727
|
-
.
|
|
727
|
+
._actions_lodh1_16 {
|
|
728
728
|
display: none;
|
|
729
729
|
column-gap: 4px;
|
|
730
730
|
}
|
|
731
|
-
.
|
|
731
|
+
._actions_lodh1_16 > button {
|
|
732
732
|
margin-left: 0 !important;
|
|
733
733
|
font-size: 1.2em;
|
|
734
734
|
border: 1px solid var(--el-border-color-light) !important;
|
|
735
735
|
}
|
|
736
|
-
.
|
|
736
|
+
._actions_lodh1_16 > button:hover {
|
|
737
737
|
border-color: var(--el-border-color-dark) !important;
|
|
738
738
|
}
|
|
739
|
-
.
|
|
739
|
+
._remove_lodh1_47 {
|
|
740
740
|
transform: translateY(-1px);
|
|
741
741
|
}
|
|
742
|
-
.
|
|
743
|
-
.
|
|
742
|
+
._empty_lodh1_51,
|
|
743
|
+
._loading_lodh1_52 {
|
|
744
744
|
padding: 4px 8px;
|
|
745
745
|
display: flex;
|
|
746
746
|
align-items: center;
|
|
747
747
|
column-gap: 4px;
|
|
748
748
|
color: var(--el-text-color-secondary);
|
|
749
749
|
}
|
|
750
|
-
.
|
|
750
|
+
._scrollbar_lodh1_60 {
|
|
751
751
|
margin: 0 -8px;
|
|
752
752
|
}
|
|
753
753
|
/* source: src/components/explorer-modal-form/explorer-modal-form.vue */
|
|
@@ -899,32 +899,32 @@ div._divider_8k9xf_21 {
|
|
|
899
899
|
z-index: 9999 !important;
|
|
900
900
|
}
|
|
901
901
|
/* source: src/components/explorer-tree/explorer-tree.vue */
|
|
902
|
-
.
|
|
902
|
+
._tree_185uk_1 .el-tree-node__content {
|
|
903
903
|
display: flex;
|
|
904
904
|
align-items: center;
|
|
905
905
|
}
|
|
906
|
-
.
|
|
906
|
+
._tree_185uk_1 .el-tree-node__content:hover {
|
|
907
907
|
background-color: var(--el-color-primary-light-9);
|
|
908
908
|
}
|
|
909
|
-
.
|
|
909
|
+
._tree_185uk_1 .el-tree-node__content:hover .vc-actions {
|
|
910
910
|
display: inline-flex;
|
|
911
911
|
}
|
|
912
|
-
.
|
|
912
|
+
._tree_185uk_1 .el-tree-node:focus > .el-tree-node__content {
|
|
913
913
|
background-color: var(--el-color-primary-light-9);
|
|
914
914
|
}
|
|
915
|
-
.
|
|
915
|
+
._tree_185uk_1 .is-current > .el-tree-node__content {
|
|
916
916
|
color: var(--el-color-primary);
|
|
917
917
|
background-color: var(--el-color-primary-light-9);
|
|
918
918
|
}
|
|
919
|
-
.
|
|
919
|
+
._tree_185uk_1 .el-tree__empty-block {
|
|
920
920
|
text-align: left;
|
|
921
921
|
min-height: unset;
|
|
922
922
|
padding: 4px 8px;
|
|
923
923
|
}
|
|
924
|
-
.
|
|
924
|
+
._tree_185uk_1 .el-tree__empty-text {
|
|
925
925
|
position: static;
|
|
926
926
|
}
|
|
927
|
-
.
|
|
927
|
+
._node_185uk_27 {
|
|
928
928
|
display: flex;
|
|
929
929
|
justify-content: space-between;
|
|
930
930
|
align-items: center;
|
|
@@ -933,38 +933,38 @@ div._divider_8k9xf_21 {
|
|
|
933
933
|
box-sizing: border-box;
|
|
934
934
|
width: 100px;
|
|
935
935
|
}
|
|
936
|
-
.
|
|
936
|
+
._label_185uk_37 {
|
|
937
937
|
overflow: hidden;
|
|
938
938
|
text-overflow: ellipsis;
|
|
939
939
|
white-space: nowrap;
|
|
940
940
|
transform: translateY(-1px);
|
|
941
941
|
}
|
|
942
|
-
.
|
|
942
|
+
._label_185uk_37 .iconify {
|
|
943
943
|
margin-right: 4px;
|
|
944
944
|
}
|
|
945
|
-
.
|
|
945
|
+
._actions_185uk_47 {
|
|
946
946
|
display: none;
|
|
947
947
|
column-gap: 4px;
|
|
948
948
|
}
|
|
949
|
-
.
|
|
949
|
+
._actions_185uk_47 > button {
|
|
950
950
|
margin-left: 0 !important;
|
|
951
951
|
font-size: 1.2em;
|
|
952
952
|
border: 1px solid var(--el-border-color-light) !important;
|
|
953
953
|
}
|
|
954
|
-
.
|
|
954
|
+
._actions_185uk_47 > button:hover {
|
|
955
955
|
border-color: var(--el-border-color-dark) !important;
|
|
956
956
|
}
|
|
957
|
-
.
|
|
957
|
+
._remove_185uk_60 {
|
|
958
958
|
transform: translateY(-1px);
|
|
959
959
|
}
|
|
960
|
-
.
|
|
960
|
+
._loading_185uk_64 {
|
|
961
961
|
padding: 4px 8px;
|
|
962
962
|
display: flex;
|
|
963
963
|
align-items: center;
|
|
964
964
|
column-gap: 4px;
|
|
965
965
|
color: var(--el-text-color-secondary);
|
|
966
966
|
}
|
|
967
|
-
.
|
|
967
|
+
._scrollbar_185uk_72 {
|
|
968
968
|
margin: 0 -8px;
|
|
969
969
|
}
|
|
970
970
|
/* source: src/components/explorer/explorer.vue */
|