@dazhicheng/ui 1.5.167 → 1.5.169
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-form/src/group-form/GroupForm.vue.d.ts +5 -5
- package/dist/components/tt-form/src/group-form/GroupSection.vue.d.ts +6 -1
- package/dist/components/tt-form/src/group-form/types.d.ts +2 -2
- package/dist/components/tt-form/src/types.d.ts +5 -1
- package/dist/components/tt-nav-anchor/index.d.ts +55 -10
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.d.ts +25 -2
- package/dist/components/tt-nav-anchor/src/types.d.ts +8 -1
- package/dist/index.js +9314 -9163
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NavAnchorItem } from '../../../tt-nav-anchor';
|
|
1
2
|
import { GroupFormSectionProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* @description 滚动到指定分组(通过 data-group-key 定位 DOM)。
|
|
@@ -10,7 +11,9 @@ import { GroupFormSectionProps } from './types';
|
|
|
10
11
|
declare function scrollToGroup(key: string): void;
|
|
11
12
|
declare function __VLS_template(): {
|
|
12
13
|
attrs: Partial<{}>;
|
|
13
|
-
slots:
|
|
14
|
+
slots: Partial<Record<number, (_: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
}) => any>>;
|
|
14
17
|
refs: {
|
|
15
18
|
scrollRef: HTMLDivElement;
|
|
16
19
|
};
|
|
@@ -19,10 +22,7 @@ declare function __VLS_template(): {
|
|
|
19
22
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
23
|
declare const __VLS_component: import('vue').DefineComponent<GroupFormSectionProps, {
|
|
21
24
|
scrollToGroup: typeof scrollToGroup;
|
|
22
|
-
navItems: import('vue').ComputedRef<
|
|
23
|
-
key: string;
|
|
24
|
-
title: string;
|
|
25
|
-
}[]>;
|
|
25
|
+
navItems: import('vue').ComputedRef<NavAnchorItem[]>;
|
|
26
26
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<GroupFormSectionProps> & Readonly<{}>, {
|
|
27
27
|
commonConfig: import('../types').FormCommonConfig;
|
|
28
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { GroupSectionProps } from './types';
|
|
2
|
-
declare function __VLS_template():
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<Record<string, (scope: Record<string, unknown>) => unknown>> & Record<string, (scope: Record<string, unknown>) => unknown>;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: any;
|
|
7
|
+
};
|
|
3
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
4
9
|
declare const __VLS_component: import('vue').DefineComponent<GroupSectionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
10
|
toggleCollapse: (key: string) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormActions, FormCommonConfig, FormSchema, FormSlotSchema, TtFormProps, WrapperClassType } from '../types';
|
|
1
|
+
import { FormActions, FormCommonConfig, FormSchema, FormSlotSchema, CustomRenderType, TtFormProps, WrapperClassType } from '../types';
|
|
2
2
|
import { TtNavAnchorProps } from '../../../tt-nav-anchor';
|
|
3
3
|
import { GroupFormApi } from './groupFormApi';
|
|
4
4
|
export type CollapsibleType = boolean | ((values: Record<string, any>, actions: FormActions) => boolean | PromiseLike<boolean>);
|
|
@@ -11,7 +11,7 @@ export interface FormGroupSchema {
|
|
|
11
11
|
/** 分组唯一标识 */
|
|
12
12
|
key: string;
|
|
13
13
|
/** 分组标题 */
|
|
14
|
-
title:
|
|
14
|
+
title: CustomRenderType;
|
|
15
15
|
/** 是否可折叠,支持布尔值或函数 (values, actions) => boolean | Promise<boolean> */
|
|
16
16
|
collapsible?: CollapsibleType;
|
|
17
17
|
/** 初始是否折叠 */
|
|
@@ -122,7 +122,7 @@ export interface ArraySchemaContext {
|
|
|
122
122
|
export type FormActions = FormContext<GenericObject> & {
|
|
123
123
|
arrayAction?: FormArrayActions;
|
|
124
124
|
};
|
|
125
|
-
export type CustomRenderType = ((value: Partial<Record<string, any>>, actions: FormActions) => Component |
|
|
125
|
+
export type CustomRenderType = ((value: Partial<Record<string, any>>, actions: FormActions) => Component | VNodeChild) | string;
|
|
126
126
|
export type FormSchemaRuleType = "required" | "selectRequired" | null | (Record<never, never> & string) | ZodTypeAny;
|
|
127
127
|
type FormItemDependenciesCondition<T = boolean | PromiseLike<boolean>> = (value: Partial<Record<string, any>>, actions: FormActions) => T;
|
|
128
128
|
type FormItemDependenciesConditionWithRules = (value: Partial<Record<string, any>>, actions: FormActions) => FormSchemaRuleType | PromiseLike<FormSchemaRuleType>;
|
|
@@ -327,6 +327,10 @@ export interface FormSlotScope {
|
|
|
327
327
|
/** 表单操作方法(validate / resetForm / getValues 等) */
|
|
328
328
|
formActions: FormActions;
|
|
329
329
|
}
|
|
330
|
+
export type FormActionSlotScope = Omit<FormSlotScope, "formActions"> & {
|
|
331
|
+
/** 表单操作方法(validate / resetForm / getValues 等) */
|
|
332
|
+
action: FormSlotScope["formActions"];
|
|
333
|
+
};
|
|
330
334
|
/**
|
|
331
335
|
* Extra slot props exposed for `useArraySchema: true` fields.
|
|
332
336
|
*/
|
|
@@ -1,10 +1,52 @@
|
|
|
1
|
-
export declare const TtNavAnchor: import('../../../../utils/src').SFCWithInstall<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const TtNavAnchor: import('../../../../utils/src').SFCWithInstall<{
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').TtNavAnchorProps> & Readonly<{
|
|
3
|
+
onChange?: ((key: string) => any) | undefined;
|
|
4
|
+
"onUpdate:modelValue"?: ((key: string) => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
change: (key: string) => any;
|
|
7
|
+
"update:modelValue": (key: string) => any;
|
|
8
|
+
}, import('vue').PublicProps, {
|
|
9
|
+
title: string;
|
|
10
|
+
top: number | string;
|
|
11
|
+
bottom: number | string;
|
|
12
|
+
left: number | string;
|
|
13
|
+
right: number | string;
|
|
14
|
+
modelValue: string;
|
|
15
|
+
position: "fixed" | "static" | "sticky";
|
|
16
|
+
badgeCounts: Record<string, number>;
|
|
17
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
18
|
+
navRef: HTMLDivElement;
|
|
19
|
+
headerRef: HTMLDivElement;
|
|
20
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
21
|
+
P: {};
|
|
22
|
+
B: {};
|
|
23
|
+
D: {};
|
|
24
|
+
C: {};
|
|
25
|
+
M: {};
|
|
26
|
+
Defaults: {};
|
|
27
|
+
}, Readonly<import('.').TtNavAnchorProps> & Readonly<{
|
|
28
|
+
onChange?: ((key: string) => any) | undefined;
|
|
29
|
+
"onUpdate:modelValue"?: ((key: string) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, {
|
|
31
|
+
title: string;
|
|
32
|
+
top: number | string;
|
|
33
|
+
bottom: number | string;
|
|
34
|
+
left: number | string;
|
|
35
|
+
right: number | string;
|
|
36
|
+
modelValue: string;
|
|
37
|
+
position: "fixed" | "static" | "sticky";
|
|
38
|
+
badgeCounts: Record<string, number>;
|
|
39
|
+
}>;
|
|
40
|
+
__isFragment?: never;
|
|
41
|
+
__isTeleport?: never;
|
|
42
|
+
__isSuspense?: never;
|
|
43
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('.').TtNavAnchorProps> & Readonly<{
|
|
5
44
|
onChange?: ((key: string) => any) | undefined;
|
|
6
45
|
"onUpdate:modelValue"?: ((key: string) => any) | undefined;
|
|
7
|
-
}>, {
|
|
46
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
47
|
+
change: (key: string) => any;
|
|
48
|
+
"update:modelValue": (key: string) => any;
|
|
49
|
+
}, string, {
|
|
8
50
|
title: string;
|
|
9
51
|
top: number | string;
|
|
10
52
|
bottom: number | string;
|
|
@@ -13,9 +55,12 @@ export declare const TtNavAnchor: import('../../../../utils/src').SFCWithInstall
|
|
|
13
55
|
modelValue: string;
|
|
14
56
|
position: "fixed" | "static" | "sticky";
|
|
15
57
|
badgeCounts: Record<string, number>;
|
|
16
|
-
}, {},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
58
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
59
|
+
$slots: Readonly<{
|
|
60
|
+
description?: (scope: import('.').NavAnchorItemScope) => import('vue').VNodeChild;
|
|
61
|
+
}> & {
|
|
62
|
+
description?: (scope: import('.').NavAnchorItemScope) => import('vue').VNodeChild;
|
|
63
|
+
};
|
|
64
|
+
})> & Record<string, any>;
|
|
65
|
+
export type { NavAnchorItem, NavAnchorItemScope, NavAnchorTitle, NavAnchorTitleRender, NavAnchorTitleRenderResult, TtNavAnchorProps, } from './src/types';
|
|
21
66
|
export default TtNavAnchor;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { VNodeChild } from 'vue';
|
|
2
|
+
import { NavAnchorItemScope, TtNavAnchorProps } from './types';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly<{
|
|
6
|
+
/** 自定义导航项标题下方内容 */
|
|
7
|
+
description?: (scope: NavAnchorItemScope) => VNodeChild;
|
|
8
|
+
}> & {
|
|
9
|
+
/** 自定义导航项标题下方内容 */
|
|
10
|
+
description?: (scope: NavAnchorItemScope) => VNodeChild;
|
|
11
|
+
};
|
|
12
|
+
refs: {
|
|
13
|
+
navRef: HTMLDivElement;
|
|
14
|
+
headerRef: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<TtNavAnchorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
20
|
change: (key: string) => any;
|
|
4
21
|
"update:modelValue": (key: string) => any;
|
|
5
22
|
}, string, import('vue').PublicProps, Readonly<TtNavAnchorProps> & Readonly<{
|
|
@@ -18,4 +35,10 @@ declare const _default: import('vue').DefineComponent<TtNavAnchorProps, {}, {},
|
|
|
18
35
|
navRef: HTMLDivElement;
|
|
19
36
|
headerRef: HTMLDivElement;
|
|
20
37
|
}, any>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
39
|
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { Component, VNodeChild } from 'vue';
|
|
2
|
+
export type NavAnchorTitleRenderResult = Component | VNodeChild;
|
|
3
|
+
export type NavAnchorTitleRender = (row: NavAnchorItem) => NavAnchorTitleRenderResult;
|
|
4
|
+
export type NavAnchorTitle = string | NavAnchorTitleRender;
|
|
5
|
+
export interface NavAnchorItemScope {
|
|
6
|
+
row: NavAnchorItem;
|
|
7
|
+
}
|
|
1
8
|
/** 导航项 */
|
|
2
9
|
export interface NavAnchorItem {
|
|
3
10
|
/** 唯一标识,同时用于定位锚点元素 [data-group-key="xxx"] */
|
|
4
11
|
key: string;
|
|
5
12
|
/** 显示标题 */
|
|
6
|
-
title:
|
|
13
|
+
title: NavAnchorTitle;
|
|
7
14
|
}
|
|
8
15
|
/** 导航锚点组件 props */
|
|
9
16
|
export interface TtNavAnchorProps {
|