@dazhicheng/ui 1.5.106 → 1.5.108
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/components/tt-panel-select/index.d.ts +15 -0
- package/dist/components/tt-panel-select/src/components/Panel.vue.d.ts +33 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelSelectData.d.ts +28 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelSelectData.shared.d.ts +1 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelSelectSelection.d.ts +20 -0
- package/dist/components/tt-panel-select/src/index.vue.d.ts +14 -0
- package/dist/components/tt-panel-select/src/props.d.ts +41 -0
- package/dist/components/tt-upload/index.d.ts +2 -2
- package/dist/components/tt-upload/src/TtUpload.d.ts +2 -2
- package/dist/components/tt-upload/src/typing.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9782 -9255
- package/dist/{index.modern-xkd4Z3Qx.js → index.modern-JWUyik9a.js} +7 -7
- package/dist/plugins.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as TtPanelSelectConstructor } from './src/index.vue';
|
|
2
|
+
export declare const TtPanelSelect: import('../../../../utils/src').SFCWithInstall<import('vue').DefineComponent<{
|
|
3
|
+
modelValue?: import('./src/props').PanelSelectModelValue;
|
|
4
|
+
} & import('./src/props').PanelContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: import('./src/props').PanelSelectModelValue) => any;
|
|
6
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
7
|
+
modelValue?: import('./src/props').PanelSelectModelValue;
|
|
8
|
+
} & import('./src/props').PanelContainerProps> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: import('./src/props').PanelSelectModelValue) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
multiple: boolean;
|
|
12
|
+
showNav: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>> & Record<string, any>;
|
|
14
|
+
export type TtPanelSelectProps = InstanceType<typeof TtPanelSelectConstructor>["$props"];
|
|
15
|
+
export default TtPanelSelect;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PanelContainerProps, PanelSelectModelValue, PanelSelectValue } from '../props';
|
|
2
|
+
import { PanelTreeNode } from '../hooks/usePanelSelectData';
|
|
3
|
+
type __VLS_Props = PanelContainerProps;
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: PanelSelectModelValue;
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
8
|
+
reload: () => Promise<void>;
|
|
9
|
+
getOptions: () => PanelTreeNode[];
|
|
10
|
+
getValue: () => PanelSelectModelValue;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: PanelSelectModelValue) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: PanelSelectModelValue) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
options: import('../props').PanelSelectOption[];
|
|
17
|
+
params: import('../../../../../../utils/src').Recordable;
|
|
18
|
+
immediate: boolean;
|
|
19
|
+
multiple: boolean;
|
|
20
|
+
resultField: string;
|
|
21
|
+
afterFetch: import('../../../../../../utils/src').AnyPromiseFunction<any, any>;
|
|
22
|
+
beforeFetch: import('../../../../../../utils/src').AnyPromiseFunction<any, any>;
|
|
23
|
+
labelField: string;
|
|
24
|
+
childrenField: string;
|
|
25
|
+
valueField: string;
|
|
26
|
+
disabledField: string;
|
|
27
|
+
parentField: string;
|
|
28
|
+
showNav: boolean;
|
|
29
|
+
rootParentValue: PanelSelectValue | null;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
|
+
middleContainerRef: HTMLDivElement;
|
|
32
|
+
}, HTMLDivElement>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PanelContainerProps, PanelSelectOption, PanelSelectValue } from '../props';
|
|
2
|
+
export type PanelTreeNode = PanelSelectOption & {
|
|
3
|
+
label: string;
|
|
4
|
+
value: PanelSelectValue;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
children?: PanelTreeNode[];
|
|
7
|
+
parentValue?: PanelSelectValue | null;
|
|
8
|
+
level: number;
|
|
9
|
+
path: PanelTreeNode[];
|
|
10
|
+
raw: PanelSelectOption;
|
|
11
|
+
};
|
|
12
|
+
export type OptionGroup = {
|
|
13
|
+
value: PanelSelectValue;
|
|
14
|
+
label: string;
|
|
15
|
+
options: PanelTreeNode[];
|
|
16
|
+
};
|
|
17
|
+
export declare function usePanelSelectData(props: PanelContainerProps): {
|
|
18
|
+
loading: import('vue').Ref<boolean, boolean>;
|
|
19
|
+
fetchApi: () => Promise<void>;
|
|
20
|
+
treeOptions: import('vue').ComputedRef<PanelTreeNode[]>;
|
|
21
|
+
navTreeOptions: import('vue').ComputedRef<PanelTreeNode[]>;
|
|
22
|
+
navNodes: import('vue').ComputedRef<PanelTreeNode[]>;
|
|
23
|
+
leafNodes: import('vue').ComputedRef<PanelTreeNode[]>;
|
|
24
|
+
filterNodes: <T extends {
|
|
25
|
+
label: string;
|
|
26
|
+
}>(nodes: T[], keyword: string) => T[];
|
|
27
|
+
buildOptionGroups: (nodes: PanelTreeNode[], keyword: string) => OptionGroup[];
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePanelSelectData(): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref, WritableComputedRef } from 'vue';
|
|
2
|
+
import { OptionGroup, PanelTreeNode } from './usePanelSelectData';
|
|
3
|
+
import { PanelSelectModelValue, PanelSelectValue } from '../props';
|
|
4
|
+
type UsePanelSelectSelectionParams = {
|
|
5
|
+
multiple: Readonly<Ref<boolean>>;
|
|
6
|
+
modelValue: Ref<PanelSelectModelValue>;
|
|
7
|
+
selectedValues: WritableComputedRef<PanelSelectValue[]>;
|
|
8
|
+
leafNodes: Readonly<Ref<PanelTreeNode[]>>;
|
|
9
|
+
};
|
|
10
|
+
export declare function usePanelSelectSelection(params: UsePanelSelectSelectionParams): {
|
|
11
|
+
selectedOptions: import('vue').ComputedRef<PanelTreeNode[]>;
|
|
12
|
+
isAllChecked: import('vue').ComputedRef<boolean>;
|
|
13
|
+
isIndeterminate: import('vue').ComputedRef<boolean>;
|
|
14
|
+
isGroupChecked: (group: OptionGroup) => boolean;
|
|
15
|
+
isGroupIndeterminate: (group: OptionGroup) => boolean;
|
|
16
|
+
handleGroupCheck: (group: OptionGroup, checked: boolean) => void;
|
|
17
|
+
handleCheckAll: (checked: boolean) => void;
|
|
18
|
+
removeSelected: (value: PanelSelectValue) => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PanelContainerProps, PanelSelectModelValue } from './props';
|
|
2
|
+
type __VLS_Props = PanelContainerProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: PanelSelectModelValue;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: PanelSelectModelValue) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: PanelSelectModelValue) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
multiple: boolean;
|
|
12
|
+
showNav: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AnyPromiseFunction, Recordable } from '../../../../../utils/src';
|
|
2
|
+
export type PanelSelectValue = string | number;
|
|
3
|
+
export type PanelSelectModelValue = PanelSelectValue | PanelSelectValue[] | undefined;
|
|
4
|
+
export interface PanelSelectOption extends Recordable {
|
|
5
|
+
label?: string;
|
|
6
|
+
value?: PanelSelectValue;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
children?: PanelSelectOption[];
|
|
9
|
+
}
|
|
10
|
+
export interface PanelContainerProps {
|
|
11
|
+
/** 是否展示左侧导航栏 */
|
|
12
|
+
showNav?: boolean;
|
|
13
|
+
/** 是否多选 */
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
/** 远程加载数据 */
|
|
16
|
+
api?: (arg?: any) => Promise<PanelSelectOption[] | Recordable>;
|
|
17
|
+
/** 传递给 api 的参数 */
|
|
18
|
+
params?: Recordable;
|
|
19
|
+
/** 从 api 返回结果中提取数组的字段名 */
|
|
20
|
+
resultField?: string;
|
|
21
|
+
/** 直接传入的数据,支持树结构或平铺结构 */
|
|
22
|
+
options?: PanelSelectOption[];
|
|
23
|
+
/** label 字段名 */
|
|
24
|
+
labelField?: string;
|
|
25
|
+
/** value 字段名 */
|
|
26
|
+
valueField?: string;
|
|
27
|
+
/** disabled 字段名 */
|
|
28
|
+
disabledField?: string;
|
|
29
|
+
/** children 字段名,传树结构时使用 */
|
|
30
|
+
childrenField?: string;
|
|
31
|
+
/** parent 字段名,传平铺结构时用于转树 */
|
|
32
|
+
parentField?: string;
|
|
33
|
+
/** 根节点 parent 值 */
|
|
34
|
+
rootParentValue?: PanelSelectValue | null;
|
|
35
|
+
/** 是否立即请求远程数据 */
|
|
36
|
+
immediate?: boolean;
|
|
37
|
+
/** 请求前处理参数 */
|
|
38
|
+
beforeFetch?: AnyPromiseFunction<any, any>;
|
|
39
|
+
/** 请求后处理返回值 */
|
|
40
|
+
afterFetch?: AnyPromiseFunction<any, any>;
|
|
41
|
+
}
|
|
@@ -39,7 +39,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
39
39
|
};
|
|
40
40
|
readonly maxSize: {
|
|
41
41
|
readonly type: import('vue').PropType<number>;
|
|
42
|
-
readonly default:
|
|
42
|
+
readonly default: undefined;
|
|
43
43
|
};
|
|
44
44
|
readonly showFileList: {
|
|
45
45
|
readonly type: import('vue').PropType<boolean>;
|
|
@@ -229,7 +229,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
229
229
|
};
|
|
230
230
|
readonly maxSize: {
|
|
231
231
|
readonly type: import('vue').PropType<number>;
|
|
232
|
-
readonly default:
|
|
232
|
+
readonly default: undefined;
|
|
233
233
|
};
|
|
234
234
|
readonly showFileList: {
|
|
235
235
|
readonly type: import('vue').PropType<boolean>;
|
|
@@ -39,7 +39,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
39
39
|
};
|
|
40
40
|
readonly maxSize: {
|
|
41
41
|
readonly type: import('vue').PropType<number>;
|
|
42
|
-
readonly default:
|
|
42
|
+
readonly default: undefined;
|
|
43
43
|
};
|
|
44
44
|
readonly showFileList: {
|
|
45
45
|
readonly type: import('vue').PropType<boolean>;
|
|
@@ -229,7 +229,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
229
229
|
};
|
|
230
230
|
readonly maxSize: {
|
|
231
231
|
readonly type: import('vue').PropType<number>;
|
|
232
|
-
readonly default:
|
|
232
|
+
readonly default: undefined;
|
|
233
233
|
};
|
|
234
234
|
readonly showFileList: {
|
|
235
235
|
readonly type: import('vue').PropType<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './components/tt-upload';
|
|
|
21
21
|
export * from './components/tt-nav-anchor';
|
|
22
22
|
export * from './components/tt-api-component';
|
|
23
23
|
export * from './components/tt-log';
|
|
24
|
+
export * from './components/tt-panel-select';
|
|
24
25
|
export { useFormSchemasLink } from './hooks/useFormSchemasLink';
|
|
25
26
|
export { useFormat } from './hooks/useFormat';
|
|
26
27
|
export { useLoading } from './hooks/useLoading';
|