@minilo/ui 0.0.7 → 0.0.8
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/package.json +2 -2
- package/minilo/dist/index.css +0 -1
- package/minilo/dist/index.full.js +0 -8393
- package/minilo/dist/index.full.min.js +0 -2
- package/minilo/dist/index.full.min.js.map +0 -1
- package/minilo/dist/index.full.min.mjs +0 -2
- package/minilo/dist/index.full.min.mjs.map +0 -1
- package/minilo/dist/index.full.mjs +0 -8373
- package/minilo/es/components/button/index.d.ts +0 -47
- package/minilo/es/components/button/index.mjs +0 -6
- package/minilo/es/components/button/index.vue.d.ts +0 -29
- package/minilo/es/components/button/index.vue.mjs +0 -5
- package/minilo/es/components/button/index.vue2.mjs +0 -67
- package/minilo/es/components/button/type.d.ts +0 -10
- package/minilo/es/components/chart/index.d.ts +0 -49
- package/minilo/es/components/chart/index.mjs +0 -6
- package/minilo/es/components/chart/index.vue.d.ts +0 -33
- package/minilo/es/components/chart/index.vue.mjs +0 -5
- package/minilo/es/components/chart/index.vue2.mjs +0 -124
- package/minilo/es/components/chart/type.d.ts +0 -7
- package/minilo/es/components/detail/index.d.ts +0 -37
- package/minilo/es/components/detail/index.mjs +0 -6
- package/minilo/es/components/detail/index.vue.d.ts +0 -23
- package/minilo/es/components/detail/index.vue.mjs +0 -5
- package/minilo/es/components/detail/index.vue2.mjs +0 -194
- package/minilo/es/components/detail/renderLabel.vue.d.ts +0 -8
- package/minilo/es/components/detail/renderLabel.vue.mjs +0 -5
- package/minilo/es/components/detail/renderLabel.vue2.mjs +0 -23
- package/minilo/es/components/detail/renderTooltip.vue.d.ts +0 -8
- package/minilo/es/components/detail/renderTooltip.vue.mjs +0 -5
- package/minilo/es/components/detail/renderTooltip.vue2.mjs +0 -23
- package/minilo/es/components/detail/type.d.ts +0 -27
- package/minilo/es/components/image-upload-pro/index.d.ts +0 -544
- package/minilo/es/components/image-upload-pro/index.mjs +0 -7
- package/minilo/es/components/image-upload-pro/index.vue.d.ts +0 -546
- package/minilo/es/components/image-upload-pro/index.vue.mjs +0 -5
- package/minilo/es/components/image-upload-pro/index.vue2.mjs +0 -657
- package/minilo/es/components/image-upload-pro/type.d.ts +0 -147
- package/minilo/es/components/image-upload-pro/type.mjs +0 -81
- package/minilo/es/components/index.d.ts +0 -11
- package/minilo/es/components/index.mjs +0 -14
- package/minilo/es/components/number-range-input/index.d.ts +0 -41
- package/minilo/es/components/number-range-input/index.mjs +0 -6
- package/minilo/es/components/number-range-input/index.vue.d.ts +0 -33
- package/minilo/es/components/number-range-input/index.vue.mjs +0 -5
- package/minilo/es/components/number-range-input/index.vue2.mjs +0 -150
- package/minilo/es/components/number-range-input/props.d.ts +0 -10
- package/minilo/es/components/search/index.d.ts +0 -488
- package/minilo/es/components/search/index.mjs +0 -6
- package/minilo/es/components/search/index.vue.d.ts +0 -554
- package/minilo/es/components/search/index.vue.mjs +0 -5
- package/minilo/es/components/search/index.vue2.mjs +0 -297
- package/minilo/es/components/search/props.d.ts +0 -107
- package/minilo/es/components/search/props.mjs +0 -55
- package/minilo/es/components/search-table/index.mjs +0 -6
- package/minilo/es/components/search-table/index.vue.d.ts +0 -189
- package/minilo/es/components/search-table/index.vue.mjs +0 -5
- package/minilo/es/components/search-table/index.vue2.mjs +0 -198
- package/minilo/es/components/search-table/props.d.ts +0 -69
- package/minilo/es/components/search-table/props.mjs +0 -69
- package/minilo/es/components/search-table/render.d.ts +0 -11
- package/minilo/es/components/search-table/render.mjs +0 -19
- package/minilo/es/components/tree-select/index.d.ts +0 -34
- package/minilo/es/components/tree-select/index.mjs +0 -6
- package/minilo/es/components/tree-select/index.vue.d.ts +0 -23
- package/minilo/es/components/tree-select/index.vue.mjs +0 -5
- package/minilo/es/components/tree-select/index.vue2.mjs +0 -229
- package/minilo/es/components/tree-select/type.d.ts +0 -34
- package/minilo/es/components/tree-select-dialog/index.d.ts +0 -64
- package/minilo/es/components/tree-select-dialog/index.mjs +0 -7
- package/minilo/es/components/tree-select-dialog/index.vue.d.ts +0 -26
- package/minilo/es/components/tree-select-dialog/index.vue.mjs +0 -5
- package/minilo/es/components/tree-select-dialog/index.vue2.mjs +0 -145
- package/minilo/es/components/tree-select-dialog/type.d.ts +0 -9
- package/minilo/es/components/tree-select-dialog/type.mjs +0 -24
- package/minilo/es/components/tree-select-drawer/index.d.ts +0 -69
- package/minilo/es/components/tree-select-drawer/index.mjs +0 -7
- package/minilo/es/components/tree-select-drawer/index.vue.d.ts +0 -26
- package/minilo/es/components/tree-select-drawer/index.vue.mjs +0 -5
- package/minilo/es/components/tree-select-drawer/index.vue2.mjs +0 -151
- package/minilo/es/components/tree-select-drawer/type.d.ts +0 -10
- package/minilo/es/components/tree-select-drawer/type.mjs +0 -20
- package/minilo/es/components/virtual-list/index.d.ts +0 -59
- package/minilo/es/components/virtual-list/index.mjs +0 -6
- package/minilo/es/components/virtual-list/index.vue.d.ts +0 -39
- package/minilo/es/components/virtual-list/index.vue.mjs +0 -5
- package/minilo/es/components/virtual-list/index.vue2.mjs +0 -423
- package/minilo/es/components/virtual-list/type.d.ts +0 -20
- package/minilo/es/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.26_typescript@5.9.3_/node_modules/@element-plus/icons-vue/dist/index.mjs +0 -41
- package/minilo/es/node_modules/.pnpm/@vueuse_core@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/index.mjs +0 -73
- package/minilo/es/node_modules/.pnpm/@vueuse_shared@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs +0 -76
- package/minilo/es/packages/utils/dist/func/common.mjs +0 -14
- package/minilo/es/packages/utils/dist/request/index.mjs +0 -105
- package/minilo/es/resolver/index.d.ts +0 -8
- package/minilo/es/resolver/index.mjs +0 -26
- package/minilo/es/utils/index.d.ts +0 -28
- package/minilo/es/utils/index.mjs +0 -30
- package/minilo/lib/components/button/index.d.ts +0 -47
- package/minilo/lib/components/button/index.js +0 -11
- package/minilo/lib/components/button/index.vue.d.ts +0 -29
- package/minilo/lib/components/button/index.vue.js +0 -9
- package/minilo/lib/components/button/index.vue2.js +0 -71
- package/minilo/lib/components/button/type.d.ts +0 -10
- package/minilo/lib/components/chart/index.d.ts +0 -49
- package/minilo/lib/components/chart/index.js +0 -11
- package/minilo/lib/components/chart/index.vue.d.ts +0 -33
- package/minilo/lib/components/chart/index.vue.js +0 -9
- package/minilo/lib/components/chart/index.vue2.js +0 -128
- package/minilo/lib/components/chart/type.d.ts +0 -7
- package/minilo/lib/components/detail/index.d.ts +0 -37
- package/minilo/lib/components/detail/index.js +0 -11
- package/minilo/lib/components/detail/index.vue.d.ts +0 -23
- package/minilo/lib/components/detail/index.vue.js +0 -9
- package/minilo/lib/components/detail/index.vue2.js +0 -198
- package/minilo/lib/components/detail/renderLabel.vue.d.ts +0 -8
- package/minilo/lib/components/detail/renderLabel.vue.js +0 -9
- package/minilo/lib/components/detail/renderLabel.vue2.js +0 -27
- package/minilo/lib/components/detail/renderTooltip.vue.d.ts +0 -8
- package/minilo/lib/components/detail/renderTooltip.vue.js +0 -9
- package/minilo/lib/components/detail/renderTooltip.vue2.js +0 -27
- package/minilo/lib/components/detail/type.d.ts +0 -27
- package/minilo/lib/components/image-upload-pro/index.d.ts +0 -544
- package/minilo/lib/components/image-upload-pro/index.js +0 -13
- package/minilo/lib/components/image-upload-pro/index.vue.d.ts +0 -546
- package/minilo/lib/components/image-upload-pro/index.vue.js +0 -9
- package/minilo/lib/components/image-upload-pro/index.vue2.js +0 -661
- package/minilo/lib/components/image-upload-pro/type.d.ts +0 -147
- package/minilo/lib/components/image-upload-pro/type.js +0 -83
- package/minilo/lib/components/index.d.ts +0 -11
- package/minilo/lib/components/index.js +0 -33
- package/minilo/lib/components/number-range-input/index.d.ts +0 -41
- package/minilo/lib/components/number-range-input/index.js +0 -11
- package/minilo/lib/components/number-range-input/index.vue.d.ts +0 -33
- package/minilo/lib/components/number-range-input/index.vue.js +0 -9
- package/minilo/lib/components/number-range-input/index.vue2.js +0 -154
- package/minilo/lib/components/number-range-input/props.d.ts +0 -10
- package/minilo/lib/components/search/index.d.ts +0 -488
- package/minilo/lib/components/search/index.js +0 -11
- package/minilo/lib/components/search/index.vue.d.ts +0 -554
- package/minilo/lib/components/search/index.vue.js +0 -9
- package/minilo/lib/components/search/index.vue2.js +0 -301
- package/minilo/lib/components/search/props.d.ts +0 -107
- package/minilo/lib/components/search/props.js +0 -58
- package/minilo/lib/components/search-table/index.js +0 -11
- package/minilo/lib/components/search-table/index.vue.d.ts +0 -189
- package/minilo/lib/components/search-table/index.vue.js +0 -9
- package/minilo/lib/components/search-table/index.vue2.js +0 -202
- package/minilo/lib/components/search-table/props.d.ts +0 -69
- package/minilo/lib/components/search-table/props.js +0 -72
- package/minilo/lib/components/search-table/render.d.ts +0 -11
- package/minilo/lib/components/search-table/render.js +0 -23
- package/minilo/lib/components/tree-select/index.d.ts +0 -34
- package/minilo/lib/components/tree-select/index.js +0 -11
- package/minilo/lib/components/tree-select/index.vue.d.ts +0 -23
- package/minilo/lib/components/tree-select/index.vue.js +0 -9
- package/minilo/lib/components/tree-select/index.vue2.js +0 -233
- package/minilo/lib/components/tree-select/type.d.ts +0 -34
- package/minilo/lib/components/tree-select-dialog/index.d.ts +0 -64
- package/minilo/lib/components/tree-select-dialog/index.js +0 -13
- package/minilo/lib/components/tree-select-dialog/index.vue.d.ts +0 -26
- package/minilo/lib/components/tree-select-dialog/index.vue.js +0 -9
- package/minilo/lib/components/tree-select-dialog/index.vue2.js +0 -149
- package/minilo/lib/components/tree-select-dialog/type.d.ts +0 -9
- package/minilo/lib/components/tree-select-dialog/type.js +0 -26
- package/minilo/lib/components/tree-select-drawer/index.d.ts +0 -69
- package/minilo/lib/components/tree-select-drawer/index.js +0 -13
- package/minilo/lib/components/tree-select-drawer/index.vue.d.ts +0 -26
- package/minilo/lib/components/tree-select-drawer/index.vue.js +0 -9
- package/minilo/lib/components/tree-select-drawer/index.vue2.js +0 -155
- package/minilo/lib/components/tree-select-drawer/type.d.ts +0 -10
- package/minilo/lib/components/tree-select-drawer/type.js +0 -22
- package/minilo/lib/components/virtual-list/index.d.ts +0 -59
- package/minilo/lib/components/virtual-list/index.js +0 -11
- package/minilo/lib/components/virtual-list/index.vue.d.ts +0 -39
- package/minilo/lib/components/virtual-list/index.vue.js +0 -9
- package/minilo/lib/components/virtual-list/index.vue2.js +0 -427
- package/minilo/lib/components/virtual-list/type.d.ts +0 -20
- package/minilo/lib/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.26_typescript@5.9.3_/node_modules/@element-plus/icons-vue/dist/index.js +0 -44
- package/minilo/lib/node_modules/.pnpm/@vueuse_core@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/index.js +0 -84
- package/minilo/lib/node_modules/.pnpm/@vueuse_shared@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/index.js +0 -83
- package/minilo/lib/packages/utils/dist/func/common.js +0 -16
- package/minilo/lib/packages/utils/dist/request/index.js +0 -115
- package/minilo/lib/resolver/index.d.ts +0 -8
- package/minilo/lib/resolver/index.js +0 -28
- package/minilo/lib/utils/index.d.ts +0 -28
- package/minilo/lib/utils/index.js +0 -34
- package/minilo/theme-chalk/index.css +0 -1
- package/minilo/theme-chalk/ml-button.css +0 -1
- package/minilo/theme-chalk/ml-chart.css +0 -1
- package/minilo/theme-chalk/ml-detail.css +0 -1
- package/minilo/theme-chalk/ml-image-upload-pro.css +0 -1
- package/minilo/theme-chalk/ml-number-range-input.css +0 -1
- package/minilo/theme-chalk/ml-search-table.css +0 -1
- package/minilo/theme-chalk/ml-search.css +0 -1
- package/minilo/theme-chalk/ml-tree-select-dialog.css +0 -0
- package/minilo/theme-chalk/ml-tree-select-drawer.css +0 -0
- package/minilo/theme-chalk/ml-tree-select.css +0 -1
- package/minilo/theme-chalk/ml-virtual-list.css +0 -1
- package/minilo/theme-chalk/src/button.scss +0 -22
- package/minilo/theme-chalk/src/chart.scss +0 -11
- package/minilo/theme-chalk/src/default/variable.scss +0 -1
- package/minilo/theme-chalk/src/detail.scss +0 -9
- package/minilo/theme-chalk/src/image-upload-pro.scss +0 -70
- package/minilo/theme-chalk/src/index.scss +0 -14
- package/minilo/theme-chalk/src/mixins/mixin.scss +0 -273
- package/minilo/theme-chalk/src/number-range-input.scss +0 -9
- package/minilo/theme-chalk/src/search-table.scss +0 -47
- package/minilo/theme-chalk/src/search.scss +0 -20
- package/minilo/theme-chalk/src/tree-select-dialog.scss +0 -0
- package/minilo/theme-chalk/src/tree-select-drawer.scss +0 -0
- package/minilo/theme-chalk/src/tree-select.scss +0 -47
- package/minilo/theme-chalk/src/virtual-list.scss +0 -49
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface TreeSelectProps<T = any> {
|
|
2
|
-
treeData: T[];
|
|
3
|
-
treeProps?: Record<string, any>;
|
|
4
|
-
multiple?: boolean;
|
|
5
|
-
defaultExpandAll?: boolean;
|
|
6
|
-
defaultSelectedKeys?: any[];
|
|
7
|
-
nodeKey?: string;
|
|
8
|
-
showSearch?: boolean;
|
|
9
|
-
expandOnClickNode?: boolean;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface TreeSelectExpose {
|
|
13
|
-
reset: () => void;
|
|
14
|
-
getSelectedData: () => any;
|
|
15
|
-
getSelectedKeys: () => any[];
|
|
16
|
-
getCheckedNodes: () => any[];
|
|
17
|
-
getCheckedKeys: () => any[];
|
|
18
|
-
getHalfCheckedNodes: () => any[];
|
|
19
|
-
getHalfCheckedKeys: () => any[];
|
|
20
|
-
getCurrentKey: () => string | number | undefined;
|
|
21
|
-
getCurrentNode: () => any;
|
|
22
|
-
setCheckedKeys: (keys: any[]) => void;
|
|
23
|
-
setCheckedNodes: (nodes: any[]) => void;
|
|
24
|
-
setCurrentKey: (key: string | number | undefined) => void;
|
|
25
|
-
setCurrentNode: (node: any) => void;
|
|
26
|
-
getNode: (key: string | number) => any;
|
|
27
|
-
filter: (value: string) => void;
|
|
28
|
-
updateKeyChildren: (key: string | number, children: any[]) => void;
|
|
29
|
-
remove: (node: any) => void;
|
|
30
|
-
append: (data: any, parentNode?: any) => void;
|
|
31
|
-
insertBefore: (data: any, refNode: any) => void;
|
|
32
|
-
insertAfter: (data: any, refNode: any) => void;
|
|
33
|
-
input: (value: string) => void;
|
|
34
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export declare const MlTreeSelectDialog: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
2
|
-
slots: {};
|
|
3
|
-
attrs: any;
|
|
4
|
-
emit: (((evt: "input", value: string) => void) & ((evt: "confirm", selectedData: T | T[]) => void) & ((evt: "close") => void)) & ((evt: "update:modelValue", value: boolean) => void);
|
|
5
|
-
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
-
props: {
|
|
7
|
-
readonly onInput?: (value: string) => any;
|
|
8
|
-
readonly "onUpdate:modelValue"?: (value: boolean) => any;
|
|
9
|
-
readonly onClose?: () => any;
|
|
10
|
-
readonly onConfirm?: (selectedData: T | T[]) => any;
|
|
11
|
-
modelValue?: boolean;
|
|
12
|
-
treeData: T[];
|
|
13
|
-
treeProps?: Record<string, any>;
|
|
14
|
-
multiple?: boolean;
|
|
15
|
-
defaultExpandAll?: boolean;
|
|
16
|
-
defaultSelectedKeys?: any[];
|
|
17
|
-
nodeKey?: string;
|
|
18
|
-
showSearch?: boolean;
|
|
19
|
-
expandOnClickNode?: boolean;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
title?: string;
|
|
22
|
-
width?: string;
|
|
23
|
-
readonly center?: boolean;
|
|
24
|
-
readonly appendTo?: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | ((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement))[], unknown, unknown>) | ((new (...args: any[]) => string | HTMLElement) | (() => import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | ((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement))[], unknown, unknown>))[], unknown, unknown>;
|
|
25
|
-
readonly showClose?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
26
|
-
readonly appendToBody?: boolean;
|
|
27
|
-
readonly destroyOnClose?: boolean;
|
|
28
|
-
readonly closeOnClickModal?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
29
|
-
readonly closeOnPressEscape?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
30
|
-
readonly lockScroll?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
31
|
-
readonly modal?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
32
|
-
readonly modalPenetrable?: boolean;
|
|
33
|
-
readonly openDelay?: number;
|
|
34
|
-
readonly closeDelay?: number;
|
|
35
|
-
readonly trapFocus?: boolean;
|
|
36
|
-
readonly headerAriaLevel?: string;
|
|
37
|
-
readonly fullscreen?: boolean;
|
|
38
|
-
readonly ariaLevel?: string;
|
|
39
|
-
readonly top?: string;
|
|
40
|
-
readonly overflow?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
41
|
-
readonly transition?: undefined;
|
|
42
|
-
readonly zIndex?: number;
|
|
43
|
-
readonly draggable?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
44
|
-
readonly beforeClose?: import('element-plus').DialogBeforeCloseFn;
|
|
45
|
-
readonly modalClass?: string;
|
|
46
|
-
readonly headerClass?: string;
|
|
47
|
-
readonly bodyClass?: string;
|
|
48
|
-
readonly footerClass?: string;
|
|
49
|
-
readonly alignCenter?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
50
|
-
readonly closeIcon?: unknown;
|
|
51
|
-
} & import('vue').PublicProps;
|
|
52
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
53
|
-
input: (value: string) => void;
|
|
54
|
-
searchText: import('vue').Ref<string, string>;
|
|
55
|
-
treeRef: import('vue').Ref<import('..').TreeSelectExpose, import('..').TreeSelectExpose>;
|
|
56
|
-
}>): void;
|
|
57
|
-
attrs: any;
|
|
58
|
-
slots: {};
|
|
59
|
-
emit: (((evt: "input", value: string) => void) & ((evt: "confirm", selectedData: T | T[]) => void) & ((evt: "close") => void)) & ((evt: "update:modelValue", value: boolean) => void);
|
|
60
|
-
}>) => import('vue').VNode & {
|
|
61
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
62
|
-
};
|
|
63
|
-
export default MlTreeSelectDialog;
|
|
64
|
-
export * from './type';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { TreeSelectDialogProps } from './type';
|
|
2
|
-
import { TreeSelectExpose } from '../tree-select/type';
|
|
3
|
-
declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
-
readonly onInput?: (value: string) => any;
|
|
6
|
-
readonly "onUpdate:modelValue"?: (value: boolean) => any;
|
|
7
|
-
readonly onConfirm?: (selectedData: T | T[]) => any;
|
|
8
|
-
readonly onClose?: () => any;
|
|
9
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onInput" | "onUpdate:modelValue" | "onClose" | "onConfirm"> & ({
|
|
10
|
-
modelValue?: boolean;
|
|
11
|
-
} & TreeSelectDialogProps<T>) & Partial<{}>> & import('vue').PublicProps;
|
|
12
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
13
|
-
input: (value: string) => void;
|
|
14
|
-
searchText: import('vue').Ref<string, string>;
|
|
15
|
-
treeRef: import('vue').Ref<TreeSelectExpose, TreeSelectExpose>;
|
|
16
|
-
}>): void;
|
|
17
|
-
attrs: any;
|
|
18
|
-
slots: {};
|
|
19
|
-
emit: (((evt: "input", value: string) => void) & ((evt: "confirm", selectedData: T | T[]) => void) & ((evt: "close") => void)) & ((evt: "update:modelValue", value: boolean) => void);
|
|
20
|
-
}>) => import('vue').VNode & {
|
|
21
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|
|
24
|
-
type __VLS_PrettifyLocal<T> = {
|
|
25
|
-
[K in keyof T]: T[K];
|
|
26
|
-
} & {};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useAttrs, computed, ref, watch, resolveComponent, createBlock, openBlock, mergeProps, unref, withCtx, createVNode, toHandlers } from 'vue';
|
|
2
|
-
import { MlTreeSelect } from '../tree-select/index.mjs';
|
|
3
|
-
import { dialogPropKeys } from './type.mjs';
|
|
4
|
-
import { bem } from '../../utils/index.mjs';
|
|
5
|
-
|
|
6
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
...{
|
|
8
|
-
name: "MlTreeSelectDialog"
|
|
9
|
-
},
|
|
10
|
-
__name: "index",
|
|
11
|
-
props: /* @__PURE__ */ mergeModels({
|
|
12
|
-
treeData: { type: Array, required: true },
|
|
13
|
-
treeProps: { type: Object, required: false, default: () => ({ label: "label", children: "children" }) },
|
|
14
|
-
multiple: { type: Boolean, required: false, default: false },
|
|
15
|
-
defaultExpandAll: { type: Boolean, required: false, default: true },
|
|
16
|
-
defaultSelectedKeys: { type: Array, required: false, default: () => [] },
|
|
17
|
-
nodeKey: { type: String, required: false, default: "id" },
|
|
18
|
-
showSearch: { type: Boolean, required: false, default: true },
|
|
19
|
-
expandOnClickNode: { type: Boolean, required: false },
|
|
20
|
-
placeholder: { type: String, required: false },
|
|
21
|
-
title: { type: String, required: false, default: "\u6811\u5F62\u9009\u62E9" },
|
|
22
|
-
width: { type: String, required: false, default: "500px" },
|
|
23
|
-
appendToBody: { type: Boolean, required: false },
|
|
24
|
-
appendTo: { type: null, required: false },
|
|
25
|
-
beforeClose: { type: null, required: false },
|
|
26
|
-
destroyOnClose: { type: Boolean, required: false },
|
|
27
|
-
closeOnClickModal: { type: Boolean, required: false },
|
|
28
|
-
closeOnPressEscape: { type: Boolean, required: false },
|
|
29
|
-
lockScroll: { type: Boolean, required: false },
|
|
30
|
-
modal: { type: Boolean, required: false },
|
|
31
|
-
modalPenetrable: { type: Boolean, required: false },
|
|
32
|
-
openDelay: { type: Number, required: false },
|
|
33
|
-
closeDelay: { type: Number, required: false },
|
|
34
|
-
top: { type: null, required: false },
|
|
35
|
-
modelValue: { type: Boolean, required: false },
|
|
36
|
-
modalClass: { type: String, required: false },
|
|
37
|
-
headerClass: { type: String, required: false },
|
|
38
|
-
bodyClass: { type: String, required: false },
|
|
39
|
-
footerClass: { type: String, required: false },
|
|
40
|
-
zIndex: { type: null, required: false },
|
|
41
|
-
trapFocus: { type: Boolean, required: false },
|
|
42
|
-
headerAriaLevel: { type: String, required: false },
|
|
43
|
-
transition: { type: null, required: false },
|
|
44
|
-
center: { type: Boolean, required: false },
|
|
45
|
-
alignCenter: { type: Boolean, required: false },
|
|
46
|
-
closeIcon: { type: null, required: false },
|
|
47
|
-
draggable: { type: Boolean, required: false },
|
|
48
|
-
overflow: { type: Boolean, required: false },
|
|
49
|
-
fullscreen: { type: Boolean, required: false },
|
|
50
|
-
showClose: { type: Boolean, required: false },
|
|
51
|
-
ariaLevel: { type: String, required: false }
|
|
52
|
-
}, {
|
|
53
|
-
"modelValue": { type: Boolean, ...{ default: false } },
|
|
54
|
-
"modelModifiers": {}
|
|
55
|
-
}),
|
|
56
|
-
emits: /* @__PURE__ */ mergeModels(["confirm", "close", "input"], ["update:modelValue"]),
|
|
57
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
58
|
-
const visible = useModel(__props, "modelValue");
|
|
59
|
-
const props = __props;
|
|
60
|
-
const emit = __emit;
|
|
61
|
-
const attrs = useAttrs();
|
|
62
|
-
const dialogAttrs = computed(() => {
|
|
63
|
-
const result = {
|
|
64
|
-
title: props.title,
|
|
65
|
-
width: props.width
|
|
66
|
-
};
|
|
67
|
-
Object.keys(attrs).forEach((key) => {
|
|
68
|
-
if (dialogPropKeys.includes(key)) {
|
|
69
|
-
result[key] = attrs[key];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
return result;
|
|
73
|
-
});
|
|
74
|
-
const treeSelectAttrs = computed(() => {
|
|
75
|
-
const result = {
|
|
76
|
-
treeData: props.treeData,
|
|
77
|
-
treeProps: props.treeProps,
|
|
78
|
-
multiple: props.multiple,
|
|
79
|
-
defaultExpandAll: props.defaultExpandAll,
|
|
80
|
-
defaultSelectedKeys: props.defaultSelectedKeys,
|
|
81
|
-
nodeKey: props.nodeKey,
|
|
82
|
-
showSearch: props.showSearch
|
|
83
|
-
};
|
|
84
|
-
Object.keys(attrs).forEach((key) => {
|
|
85
|
-
if (!dialogPropKeys.includes(key) && !key.startsWith("on")) {
|
|
86
|
-
result[key] = attrs[key];
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
return result;
|
|
90
|
-
});
|
|
91
|
-
const treeSelectRef = ref();
|
|
92
|
-
const searchText = ref("");
|
|
93
|
-
watch(visible, (val) => {
|
|
94
|
-
if (!val) {
|
|
95
|
-
searchText.value = "";
|
|
96
|
-
if (treeSelectRef.value) {
|
|
97
|
-
treeSelectRef.value.reset();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
const handleBeforeClose = () => {
|
|
102
|
-
visible.value = false;
|
|
103
|
-
};
|
|
104
|
-
const handleConfirm = (selectedData) => {
|
|
105
|
-
emit("confirm", selectedData);
|
|
106
|
-
visible.value = false;
|
|
107
|
-
};
|
|
108
|
-
const handleCancel = () => {
|
|
109
|
-
visible.value = false;
|
|
110
|
-
};
|
|
111
|
-
__expose({
|
|
112
|
-
input: (value) => emit("input", value),
|
|
113
|
-
searchText,
|
|
114
|
-
treeRef: treeSelectRef
|
|
115
|
-
});
|
|
116
|
-
return (_ctx, _cache) => {
|
|
117
|
-
const _component_el_dialog = resolveComponent("el-dialog");
|
|
118
|
-
return openBlock(), createBlock(_component_el_dialog, mergeProps({
|
|
119
|
-
modelValue: visible.value,
|
|
120
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => visible.value = $event)
|
|
121
|
-
}, dialogAttrs.value, {
|
|
122
|
-
class: unref(bem)("tree-select-dialog"),
|
|
123
|
-
"before-close": handleBeforeClose,
|
|
124
|
-
onClose: _cache[2] || (_cache[2] = ($event) => emit("close"))
|
|
125
|
-
}), {
|
|
126
|
-
default: withCtx(() => [
|
|
127
|
-
createVNode(unref(MlTreeSelect), mergeProps({
|
|
128
|
-
ref_key: "treeSelectRef",
|
|
129
|
-
ref: treeSelectRef,
|
|
130
|
-
"search-text": searchText.value,
|
|
131
|
-
"onUpdate:searchText": _cache[0] || (_cache[0] = ($event) => searchText.value = $event),
|
|
132
|
-
"tree-data": props.treeData
|
|
133
|
-
}, treeSelectAttrs.value, toHandlers(_ctx.$attrs), {
|
|
134
|
-
onConfirm: handleConfirm,
|
|
135
|
-
onCancel: handleCancel
|
|
136
|
-
}), null, 16, ["search-text", "tree-data"])
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
/* STABLE */
|
|
140
|
-
}, 16, ["modelValue", "class"]);
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
export { _sfc_main as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TreeSelectProps } from '../tree-select/type';
|
|
2
|
-
import { DialogProps } from 'element-plus';
|
|
3
|
-
export interface DialogContainerProps extends Partial<DialogProps> {
|
|
4
|
-
title?: string;
|
|
5
|
-
width?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface TreeSelectDialogProps<T = any> extends TreeSelectProps<T>, DialogContainerProps {
|
|
8
|
-
}
|
|
9
|
-
export declare const dialogPropKeys: string[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const dialogPropKeys = [
|
|
2
|
-
"title",
|
|
3
|
-
"width",
|
|
4
|
-
"fullscreen",
|
|
5
|
-
"top",
|
|
6
|
-
"modal",
|
|
7
|
-
"modalClass",
|
|
8
|
-
"appendToBody",
|
|
9
|
-
"appendTo",
|
|
10
|
-
"lockScroll",
|
|
11
|
-
"closeOnClickModal",
|
|
12
|
-
"closeOnPressEscape",
|
|
13
|
-
"showClose",
|
|
14
|
-
"draggable",
|
|
15
|
-
"overflow",
|
|
16
|
-
"center",
|
|
17
|
-
"alignCenter",
|
|
18
|
-
"destroyOnClose",
|
|
19
|
-
"closeIcon",
|
|
20
|
-
"zIndex",
|
|
21
|
-
"headerAriaLevel"
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
export { dialogPropKeys };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export declare const MlTreeSelectDrawer: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
2
|
-
slots: {};
|
|
3
|
-
attrs: any;
|
|
4
|
-
emit: (((evt: "input", value: string) => void) & ((evt: "confirm", selectedData: T | T[]) => void) & ((evt: "close") => void)) & ((evt: "update:modelValue", value: boolean) => void);
|
|
5
|
-
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
-
props: {
|
|
7
|
-
readonly onInput?: (value: string) => any;
|
|
8
|
-
readonly "onUpdate:modelValue"?: (value: boolean) => any;
|
|
9
|
-
readonly onClose?: () => any;
|
|
10
|
-
readonly onConfirm?: (selectedData: T | T[]) => any;
|
|
11
|
-
modelValue?: boolean;
|
|
12
|
-
treeData: T[];
|
|
13
|
-
treeProps?: Record<string, any>;
|
|
14
|
-
multiple?: boolean;
|
|
15
|
-
defaultExpandAll?: boolean;
|
|
16
|
-
defaultSelectedKeys?: any[];
|
|
17
|
-
nodeKey?: string;
|
|
18
|
-
showSearch?: boolean;
|
|
19
|
-
expandOnClickNode?: boolean;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
title?: string;
|
|
22
|
-
size?: string | number;
|
|
23
|
-
direction?: "rtl" | "ltr" | "ttb" | "btt";
|
|
24
|
-
readonly center?: boolean;
|
|
25
|
-
readonly appendTo?: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | ((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement))[], unknown, unknown>) | ((new (...args: any[]) => string | HTMLElement) | (() => import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | ((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement))[], unknown, unknown>))[], unknown, unknown>;
|
|
26
|
-
readonly resizable?: boolean;
|
|
27
|
-
readonly showClose?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
28
|
-
readonly appendToBody?: boolean;
|
|
29
|
-
readonly destroyOnClose?: boolean;
|
|
30
|
-
readonly closeOnClickModal?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
31
|
-
readonly closeOnPressEscape?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
32
|
-
readonly lockScroll?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
33
|
-
readonly modal?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
34
|
-
readonly modalPenetrable?: boolean;
|
|
35
|
-
readonly openDelay?: number;
|
|
36
|
-
readonly closeDelay?: number;
|
|
37
|
-
readonly trapFocus?: boolean;
|
|
38
|
-
readonly headerAriaLevel?: string;
|
|
39
|
-
readonly fullscreen?: boolean;
|
|
40
|
-
readonly ariaLevel?: string;
|
|
41
|
-
readonly withHeader?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
42
|
-
readonly modalFade?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
43
|
-
readonly top?: string;
|
|
44
|
-
readonly overflow?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
45
|
-
readonly transition?: undefined;
|
|
46
|
-
readonly width?: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
47
|
-
readonly zIndex?: number;
|
|
48
|
-
readonly draggable?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
49
|
-
readonly beforeClose?: import('element-plus').DialogBeforeCloseFn;
|
|
50
|
-
readonly modalClass?: string;
|
|
51
|
-
readonly headerClass?: string;
|
|
52
|
-
readonly bodyClass?: string;
|
|
53
|
-
readonly footerClass?: string;
|
|
54
|
-
readonly alignCenter?: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
55
|
-
readonly closeIcon?: unknown;
|
|
56
|
-
} & import('vue').PublicProps;
|
|
57
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
58
|
-
input: (value: string) => void;
|
|
59
|
-
searchText: import('vue').Ref<string, string>;
|
|
60
|
-
treeRef: import('vue').Ref<import('..').TreeSelectExpose, import('..').TreeSelectExpose>;
|
|
61
|
-
}>): void;
|
|
62
|
-
attrs: any;
|
|
63
|
-
slots: {};
|
|
64
|
-
emit: (((evt: "input", value: string) => void) & ((evt: "confirm", selectedData: T | T[]) => void) & ((evt: "close") => void)) & ((evt: "update:modelValue", value: boolean) => void);
|
|
65
|
-
}>) => import('vue').VNode & {
|
|
66
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
67
|
-
};
|
|
68
|
-
export default MlTreeSelectDrawer;
|
|
69
|
-
export * from './type';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { TreeSelectDrawerProps } from './type';
|
|
2
|
-
import { TreeSelectExpose } from '../tree-select/type';
|
|
3
|
-
declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
-
readonly onInput?: (value: string) => any;
|
|
6
|
-
readonly "onUpdate:modelValue"?: (value: boolean) => any;
|
|
7
|
-
readonly onConfirm?: (selectedData: T | T[]) => any;
|
|
8
|
-
readonly onClose?: () => any;
|
|
9
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onInput" | "onUpdate:modelValue" | "onClose" | "onConfirm"> & ({
|
|
10
|
-
modelValue?: boolean;
|
|
11
|
-
} & TreeSelectDrawerProps<T>) & Partial<{}>> & import('vue').PublicProps;
|
|
12
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
13
|
-
input: (value: string) => void;
|
|
14
|
-
searchText: import('vue').Ref<string, string>;
|
|
15
|
-
treeRef: import('vue').Ref<TreeSelectExpose, TreeSelectExpose>;
|
|
16
|
-
}>): void;
|
|
17
|
-
attrs: any;
|
|
18
|
-
slots: {};
|
|
19
|
-
emit: (((evt: "input", value: string) => void) & ((evt: "confirm", selectedData: T | T[]) => void) & ((evt: "close") => void)) & ((evt: "update:modelValue", value: boolean) => void);
|
|
20
|
-
}>) => import('vue').VNode & {
|
|
21
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|
|
24
|
-
type __VLS_PrettifyLocal<T> = {
|
|
25
|
-
[K in keyof T]: T[K];
|
|
26
|
-
} & {};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useAttrs, computed, ref, watch, resolveComponent, createBlock, openBlock, mergeProps, unref, withCtx, createVNode, toHandlers } from 'vue';
|
|
2
|
-
import { drawerPropKeys } from './type.mjs';
|
|
3
|
-
import _sfc_main$1 from '../tree-select/index.vue2.mjs';
|
|
4
|
-
import { bem } from '../../utils/index.mjs';
|
|
5
|
-
|
|
6
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
...{
|
|
8
|
-
name: "MlTreeSelectDrawer"
|
|
9
|
-
},
|
|
10
|
-
__name: "index",
|
|
11
|
-
props: /* @__PURE__ */ mergeModels({
|
|
12
|
-
treeData: { type: Array, required: true },
|
|
13
|
-
treeProps: { type: Object, required: false, default: () => ({ label: "label", children: "children" }) },
|
|
14
|
-
multiple: { type: Boolean, required: false, default: false },
|
|
15
|
-
defaultExpandAll: { type: Boolean, required: false, default: true },
|
|
16
|
-
defaultSelectedKeys: { type: Array, required: false, default: () => [] },
|
|
17
|
-
nodeKey: { type: String, required: false, default: "id" },
|
|
18
|
-
showSearch: { type: Boolean, required: false, default: true },
|
|
19
|
-
expandOnClickNode: { type: Boolean, required: false },
|
|
20
|
-
placeholder: { type: String, required: false },
|
|
21
|
-
title: { type: String, required: false, default: "\u6811\u5F62\u9009\u62E9" },
|
|
22
|
-
size: { type: [String, Number], required: false, default: "400px" },
|
|
23
|
-
direction: { type: String, required: false, default: "rtl" },
|
|
24
|
-
resizable: { type: Boolean, required: false },
|
|
25
|
-
withHeader: { type: Boolean, required: false },
|
|
26
|
-
modalFade: { type: Boolean, required: false },
|
|
27
|
-
headerAriaLevel: { type: String, required: false },
|
|
28
|
-
appendToBody: { type: Boolean, required: false },
|
|
29
|
-
appendTo: { type: null, required: false },
|
|
30
|
-
beforeClose: { type: null, required: false },
|
|
31
|
-
destroyOnClose: { type: Boolean, required: false },
|
|
32
|
-
closeOnClickModal: { type: Boolean, required: false },
|
|
33
|
-
closeOnPressEscape: { type: Boolean, required: false },
|
|
34
|
-
lockScroll: { type: Boolean, required: false },
|
|
35
|
-
modal: { type: Boolean, required: false },
|
|
36
|
-
modalPenetrable: { type: Boolean, required: false },
|
|
37
|
-
openDelay: { type: Number, required: false },
|
|
38
|
-
closeDelay: { type: Number, required: false },
|
|
39
|
-
top: { type: null, required: false },
|
|
40
|
-
modelValue: { type: Boolean, required: false },
|
|
41
|
-
modalClass: { type: String, required: false },
|
|
42
|
-
headerClass: { type: String, required: false },
|
|
43
|
-
bodyClass: { type: String, required: false },
|
|
44
|
-
footerClass: { type: String, required: false },
|
|
45
|
-
width: { type: null, required: false },
|
|
46
|
-
zIndex: { type: null, required: false },
|
|
47
|
-
trapFocus: { type: Boolean, required: false },
|
|
48
|
-
transition: { type: null, required: false },
|
|
49
|
-
center: { type: Boolean, required: false },
|
|
50
|
-
alignCenter: { type: Boolean, required: false },
|
|
51
|
-
closeIcon: { type: null, required: false },
|
|
52
|
-
draggable: { type: Boolean, required: false },
|
|
53
|
-
overflow: { type: Boolean, required: false },
|
|
54
|
-
fullscreen: { type: Boolean, required: false },
|
|
55
|
-
showClose: { type: Boolean, required: false },
|
|
56
|
-
ariaLevel: { type: String, required: false }
|
|
57
|
-
}, {
|
|
58
|
-
"modelValue": { type: Boolean, ...{ default: false } },
|
|
59
|
-
"modelModifiers": {}
|
|
60
|
-
}),
|
|
61
|
-
emits: /* @__PURE__ */ mergeModels(["confirm", "close", "input"], ["update:modelValue"]),
|
|
62
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
63
|
-
const visible = useModel(__props, "modelValue");
|
|
64
|
-
const props = __props;
|
|
65
|
-
const emit = __emit;
|
|
66
|
-
const attrs = useAttrs();
|
|
67
|
-
const drawerAttrs = computed(() => {
|
|
68
|
-
const result = {
|
|
69
|
-
title: props.title,
|
|
70
|
-
size: props.size,
|
|
71
|
-
direction: props.direction
|
|
72
|
-
};
|
|
73
|
-
Object.keys(attrs).forEach((key) => {
|
|
74
|
-
if (drawerPropKeys.includes(key)) {
|
|
75
|
-
result[key] = attrs[key];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
return result;
|
|
79
|
-
});
|
|
80
|
-
const treeSelectAttrs = computed(() => {
|
|
81
|
-
const result = {
|
|
82
|
-
treeProps: props.treeProps,
|
|
83
|
-
multiple: props.multiple,
|
|
84
|
-
defaultExpandAll: props.defaultExpandAll,
|
|
85
|
-
defaultSelectedKeys: props.defaultSelectedKeys,
|
|
86
|
-
nodeKey: props.nodeKey,
|
|
87
|
-
showSearch: props.showSearch
|
|
88
|
-
};
|
|
89
|
-
Object.keys(attrs).forEach((key) => {
|
|
90
|
-
if (!drawerPropKeys.includes(key) && !key.startsWith("on")) {
|
|
91
|
-
result[key] = attrs[key];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
return result;
|
|
95
|
-
});
|
|
96
|
-
const treeSelectRef = ref();
|
|
97
|
-
const searchText = ref("");
|
|
98
|
-
watch(visible, (val) => {
|
|
99
|
-
if (!val) {
|
|
100
|
-
searchText.value = "";
|
|
101
|
-
if (treeSelectRef.value) {
|
|
102
|
-
treeSelectRef.value.reset();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
const handleBeforeClose = (done) => {
|
|
107
|
-
visible.value = false;
|
|
108
|
-
done();
|
|
109
|
-
};
|
|
110
|
-
const handleConfirm = (selectedData) => {
|
|
111
|
-
emit("confirm", selectedData);
|
|
112
|
-
visible.value = false;
|
|
113
|
-
};
|
|
114
|
-
const handleCancel = () => {
|
|
115
|
-
visible.value = false;
|
|
116
|
-
};
|
|
117
|
-
__expose({
|
|
118
|
-
input: (value) => emit("input", value),
|
|
119
|
-
searchText,
|
|
120
|
-
treeRef: treeSelectRef
|
|
121
|
-
});
|
|
122
|
-
return (_ctx, _cache) => {
|
|
123
|
-
const _component_el_drawer = resolveComponent("el-drawer");
|
|
124
|
-
return openBlock(), createBlock(_component_el_drawer, mergeProps({
|
|
125
|
-
modelValue: visible.value,
|
|
126
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => visible.value = $event)
|
|
127
|
-
}, drawerAttrs.value, {
|
|
128
|
-
class: unref(bem)("tree-select-drawer"),
|
|
129
|
-
"before-close": handleBeforeClose,
|
|
130
|
-
onClose: _cache[2] || (_cache[2] = ($event) => emit("close"))
|
|
131
|
-
}), {
|
|
132
|
-
default: withCtx(() => [
|
|
133
|
-
createVNode(_sfc_main$1, mergeProps({
|
|
134
|
-
ref_key: "treeSelectRef",
|
|
135
|
-
ref: treeSelectRef,
|
|
136
|
-
"search-text": searchText.value,
|
|
137
|
-
"onUpdate:searchText": _cache[0] || (_cache[0] = ($event) => searchText.value = $event),
|
|
138
|
-
"tree-data": __props.treeData
|
|
139
|
-
}, treeSelectAttrs.value, toHandlers(_ctx.$attrs), {
|
|
140
|
-
onConfirm: handleConfirm,
|
|
141
|
-
onCancel: handleCancel
|
|
142
|
-
}), null, 16, ["search-text", "tree-data"])
|
|
143
|
-
]),
|
|
144
|
-
_: 1
|
|
145
|
-
/* STABLE */
|
|
146
|
-
}, 16, ["modelValue", "class"]);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
export { _sfc_main as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TreeSelectProps } from '../tree-select/type';
|
|
2
|
-
import { DrawerProps } from 'element-plus';
|
|
3
|
-
export interface DrawerContainerProps extends Partial<DrawerProps> {
|
|
4
|
-
title?: string;
|
|
5
|
-
size?: string | number;
|
|
6
|
-
direction?: 'rtl' | 'ltr' | 'ttb' | 'btt';
|
|
7
|
-
}
|
|
8
|
-
export interface TreeSelectDrawerProps<T = any> extends TreeSelectProps<T>, DrawerContainerProps {
|
|
9
|
-
}
|
|
10
|
-
export declare const drawerPropKeys: string[];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const drawerPropKeys = [
|
|
2
|
-
"title",
|
|
3
|
-
"size",
|
|
4
|
-
"direction",
|
|
5
|
-
"appendToBody",
|
|
6
|
-
"appendTo",
|
|
7
|
-
"modal",
|
|
8
|
-
"modalClass",
|
|
9
|
-
"lockScroll",
|
|
10
|
-
"closeOnClickModal",
|
|
11
|
-
"closeOnPressEscape",
|
|
12
|
-
"showClose",
|
|
13
|
-
"withHeader",
|
|
14
|
-
"openDelay",
|
|
15
|
-
"closeDelay",
|
|
16
|
-
"destroyOnClose",
|
|
17
|
-
"zIndex"
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
export { drawerPropKeys };
|