@wfrog/vc-ui 1.10.3 → 1.10.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/es/components/explorer-list/explorer-list.d.ts +1 -2
- package/dist/es/components/explorer-list/explorer-list.mjs +2 -10
- package/dist/es/components/explorer-list/explorer-list.vue.d.ts +5 -31
- package/dist/es/components/explorer-tree/explorer-tree.d.ts +0 -1
- package/dist/es/components/explorer-tree/explorer-tree.mjs +4 -10
- package/dist/es/components/explorer-tree/explorer-tree.vue.d.ts +2 -3
- package/dist/es/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export interface IExplorerListItem<T = any> {
|
|
|
8
8
|
}
|
|
9
9
|
export interface IExplorerListProps {
|
|
10
10
|
modelValue?: (string | number)[] | undefined;
|
|
11
|
-
data
|
|
11
|
+
data: IExplorerListItem[];
|
|
12
12
|
actions?: ('create' | 'modify' | 'remove' | 'up' | 'down' | 'action')[];
|
|
13
13
|
filterMethod?: (keyword: string, item: IExplorerListItem) => boolean;
|
|
14
14
|
emptyText?: string;
|
|
@@ -16,7 +16,6 @@ export interface IExplorerListProps {
|
|
|
16
16
|
loading?: boolean;
|
|
17
17
|
loadingText?: string;
|
|
18
18
|
highlightCurrent?: boolean;
|
|
19
|
-
deepWatch?: boolean;
|
|
20
19
|
showCheckbox?: boolean;
|
|
21
20
|
confirmParams?: (item: IExplorerListItem) => IButtonProps['confirm'];
|
|
22
21
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import '../../chunk/Gk1J52Yw.mjs';
|
|
3
3
|
import { E as ElCheckboxGroup, a as ElCheckbox } from '../../chunk/DBf73TLo.mjs';
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { defineComponent, ref, computed,
|
|
5
|
+
import { defineComponent, ref, computed, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createElementVNode, createVNode, unref, isRef, Fragment, renderList, renderSlot, createTextVNode, toDisplayString, mergeProps, vShow } from 'vue';
|
|
6
6
|
import { Loading } from '@element-plus/icons-vue';
|
|
7
7
|
import { C as Component$3 } from '../button/button.mjs';
|
|
8
8
|
import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
|
|
@@ -25,7 +25,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
loading: { type: Boolean },
|
|
26
26
|
loadingText: { default: "数据加载中..." },
|
|
27
27
|
highlightCurrent: { type: Boolean, default: true },
|
|
28
|
-
deepWatch: { type: Boolean, default: false },
|
|
29
28
|
showCheckbox: { type: Boolean },
|
|
30
29
|
confirmParams: { type: Function, default: (item) => {
|
|
31
30
|
return { msg: `确定要删除 ${item.label} 吗?` };
|
|
@@ -48,14 +47,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
47
|
const filterMethod = props.filterMethod || ((keyword, item) => {
|
|
49
48
|
return item.label.toLowerCase().includes(keyword.toLowerCase());
|
|
50
49
|
});
|
|
51
|
-
const listData = ref([]);
|
|
52
50
|
const myData = computed(() => {
|
|
53
|
-
return filterKeyword.value ?
|
|
51
|
+
return filterKeyword.value ? props.data.filter((item) => filterMethod(filterKeyword.value, item)) : props.data;
|
|
54
52
|
});
|
|
55
53
|
const isEmpty = computed(() => myData.value.length === 0);
|
|
56
|
-
const propsWatch = watch(() => props.data, (value) => {
|
|
57
|
-
listData.value = value;
|
|
58
|
-
}, { immediate: true, deep: props.deepWatch });
|
|
59
54
|
function handleClick(item, e) {
|
|
60
55
|
if (!props.highlightCurrent) {
|
|
61
56
|
return;
|
|
@@ -68,9 +63,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
68
63
|
actived.value = value;
|
|
69
64
|
}
|
|
70
65
|
});
|
|
71
|
-
onBeforeUnmount(() => {
|
|
72
|
-
propsWatch.stop();
|
|
73
|
-
});
|
|
74
66
|
return (_ctx, _cache) => {
|
|
75
67
|
const _component_el_checkbox = ElCheckbox;
|
|
76
68
|
const _component_el_checkbox_group = ElCheckboxGroup;
|
|
@@ -3,48 +3,23 @@ declare function __VLS_template(): {
|
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
5
5
|
item?(_: {
|
|
6
|
-
data:
|
|
7
|
-
label: string;
|
|
8
|
-
icon?: string | undefined;
|
|
9
|
-
value: string | number;
|
|
10
|
-
original?: any;
|
|
11
|
-
};
|
|
6
|
+
data: IExplorerListItem<any>;
|
|
12
7
|
index: number;
|
|
13
8
|
}): any;
|
|
14
9
|
label?(_: {
|
|
15
|
-
data:
|
|
16
|
-
label: string;
|
|
17
|
-
icon?: string | undefined;
|
|
18
|
-
value: string | number;
|
|
19
|
-
original?: any;
|
|
20
|
-
};
|
|
10
|
+
data: IExplorerListItem<any>;
|
|
21
11
|
index: number;
|
|
22
12
|
}): any;
|
|
23
13
|
label?(_: {
|
|
24
|
-
data:
|
|
25
|
-
label: string;
|
|
26
|
-
icon?: string | undefined;
|
|
27
|
-
value: string | number;
|
|
28
|
-
original?: any;
|
|
29
|
-
};
|
|
14
|
+
data: IExplorerListItem<any>;
|
|
30
15
|
index: number;
|
|
31
16
|
}): any;
|
|
32
17
|
action?(_: {
|
|
33
|
-
data:
|
|
34
|
-
label: string;
|
|
35
|
-
icon?: string | undefined;
|
|
36
|
-
value: string | number;
|
|
37
|
-
original?: any;
|
|
38
|
-
};
|
|
18
|
+
data: IExplorerListItem<any>;
|
|
39
19
|
index: number;
|
|
40
20
|
}): any;
|
|
41
21
|
'extra-label'?(_: {
|
|
42
|
-
data:
|
|
43
|
-
label: string;
|
|
44
|
-
icon?: string | undefined;
|
|
45
|
-
value: string | number;
|
|
46
|
-
original?: any;
|
|
47
|
-
};
|
|
22
|
+
data: IExplorerListItem<any>;
|
|
48
23
|
index: number;
|
|
49
24
|
}): any;
|
|
50
25
|
};
|
|
@@ -78,7 +53,6 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerListProps,
|
|
|
78
53
|
emptyText: string;
|
|
79
54
|
highlightCurrent: boolean;
|
|
80
55
|
actions: ("create" | "modify" | "remove" | "up" | "down" | "action")[];
|
|
81
|
-
deepWatch: boolean;
|
|
82
56
|
confirmParams: (item: IExplorerListItem) => import('../button/button').IButtonProps["confirm"];
|
|
83
57
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
84
58
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -14,7 +14,6 @@ export interface IExplorerTreeProps {
|
|
|
14
14
|
confirmParams?: (node: Node) => IButtonProps['confirm'];
|
|
15
15
|
filterMethod?: TreeComponentProps['filterNodeMethod'];
|
|
16
16
|
highlightCurrent?: boolean;
|
|
17
|
-
deepWatch?: boolean;
|
|
18
17
|
}
|
|
19
18
|
export interface IExplorerTreeEmits {
|
|
20
19
|
(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,
|
|
6
|
+
import { defineComponent, useTemplateRef, 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,8 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
return { msg: `确定要删除 ${node.data.label} 吗?` };
|
|
28
28
|
} },
|
|
29
29
|
filterMethod: {},
|
|
30
|
-
highlightCurrent: { type: Boolean, default: true }
|
|
31
|
-
deepWatch: { type: Boolean, default: false }
|
|
30
|
+
highlightCurrent: { type: Boolean, default: true }
|
|
32
31
|
},
|
|
33
32
|
emits: ["nodeClick", "create", "modify", "remove", "up", "down"],
|
|
34
33
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -43,7 +42,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
42
|
up: { title: "上移", type: "success", icon: "Top" },
|
|
44
43
|
down: { title: "下移", type: "success", icon: "Bottom" }
|
|
45
44
|
};
|
|
46
|
-
const treeData = ref();
|
|
47
45
|
const treeProps = computed(() => ({
|
|
48
46
|
emptyText: props.emptyText,
|
|
49
47
|
defaultExpandAll: props.defaultExpandAll,
|
|
@@ -63,18 +61,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
61
|
emits("nodeClick", data.value, node, instance, event);
|
|
64
62
|
}
|
|
65
63
|
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 });
|
|
69
64
|
__expose({
|
|
70
|
-
|
|
65
|
+
treeRef,
|
|
71
66
|
setActive: (value, shouldAutoExpandParent = true) => {
|
|
72
67
|
treeRef.value?.setCurrentKey(value, shouldAutoExpandParent);
|
|
73
68
|
}
|
|
74
69
|
});
|
|
75
70
|
onBeforeUnmount(() => {
|
|
76
71
|
filterWatch.stop();
|
|
77
|
-
propsWatch.stop();
|
|
78
72
|
});
|
|
79
73
|
return (_ctx, _cache) => {
|
|
80
74
|
const _component_ElTree = ElTree;
|
|
@@ -87,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
81
|
withDirectives(createVNode(_component_ElTree, mergeProps({
|
|
88
82
|
ref_key: "treeRef",
|
|
89
83
|
ref: treeRef,
|
|
90
|
-
data:
|
|
84
|
+
data: __props.data
|
|
91
85
|
}, { ..._ctx.$attrs, ...unref(treeProps) }, {
|
|
92
86
|
class: _ctx.$style.tree,
|
|
93
87
|
"filter-node-method": filterNode,
|
|
@@ -1034,7 +1034,7 @@ declare function __VLS_template(): {
|
|
|
1034
1034
|
};
|
|
1035
1035
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
1036
1036
|
declare const __VLS_component: import('vue').DefineComponent<IExplorerTreeProps, {
|
|
1037
|
-
|
|
1037
|
+
treeRef: Readonly<globalThis.ShallowRef<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
|
1038
1038
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').TreeData) | (() => import('element-plus').TreeData) | ((new (...args: any[]) => import('element-plus').TreeData) | (() => import('element-plus').TreeData))[], unknown, unknown, () => never[], boolean>;
|
|
1039
1039
|
readonly emptyText: {
|
|
1040
1040
|
readonly type: import('vue').PropType<string>;
|
|
@@ -2039,7 +2039,7 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerTreeProps,
|
|
|
2039
2039
|
readonly expandOnClickNode: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
2040
2040
|
readonly showCheckbox: boolean;
|
|
2041
2041
|
readonly highlightCurrent: boolean;
|
|
2042
|
-
}> | null
|
|
2042
|
+
}> | null>>;
|
|
2043
2043
|
setActive: (value: string | number | null, shouldAutoExpandParent?: boolean) => void;
|
|
2044
2044
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
2045
2045
|
create: (value: string | number, node: Node) => any;
|
|
@@ -2061,7 +2061,6 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerTreeProps,
|
|
|
2061
2061
|
highlightCurrent: boolean;
|
|
2062
2062
|
defaultExpandAll: boolean;
|
|
2063
2063
|
actions: ("create" | "modify" | "remove" | "up" | "down" | "action")[];
|
|
2064
|
-
deepWatch: boolean;
|
|
2065
2064
|
confirmParams: (node: Node) => import('../button/button').IButtonProps["confirm"];
|
|
2066
2065
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
2067
2066
|
treeRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
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.4";
|
|
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();
|