@dazhicheng/ui 1.5.53 → 1.5.55
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/form-render/FormLabel.vue.d.ts +1 -0
- package/dist/components/tt-form/src/form-render/rootWrapperClass.d.ts +16 -0
- package/dist/components/tt-form/src/group-form/types.d.ts +3 -10
- package/dist/components/tt-form/src/group-form/utils.d.ts +7 -0
- package/dist/index.js +4090 -4063
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ interface Props {
|
|
|
22
22
|
toolTipText?: CustomRenderType;
|
|
23
23
|
}
|
|
24
24
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
25
|
+
toolTip: TtTextProps;
|
|
25
26
|
helpTrigger: "hover" | "click" | "focus" | "contextmenu";
|
|
26
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
28
|
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FormLayout, WrapperClassType } from '../types';
|
|
2
|
+
export declare const FORM_RENDER_DEFAULT_WRAPPER_CLASS: WrapperClassType;
|
|
3
|
+
/**
|
|
4
|
+
* 计算表单根级字段容器 class,与 `form.vue` 中 `wrapperClass` 计算属性逻辑一致(flex / inline / grid / gap)。
|
|
5
|
+
*
|
|
6
|
+
* @param {object} options - 布局与栅格配置
|
|
7
|
+
* @param {FormLayout | string} [options.layout] - 布局方向
|
|
8
|
+
* @param {boolean} [options.compact] - 紧凑模式时横向间距更小
|
|
9
|
+
* @param {WrapperClassType} [options.wrapperClass] - 栅格与扩展 class;缺省为 FORM_RENDER_DEFAULT_WRAPPER_CLASS
|
|
10
|
+
* @returns {string} 合并后的 class 字符串
|
|
11
|
+
*/
|
|
12
|
+
export declare function getFormRootWrapperClass(options: {
|
|
13
|
+
layout?: FormLayout | string;
|
|
14
|
+
compact?: boolean;
|
|
15
|
+
wrapperClass?: WrapperClassType;
|
|
16
|
+
}): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormActions, FormCommonConfig,
|
|
1
|
+
import { FormActions, FormCommonConfig, FormSchema, FormSlotSchema, 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>);
|
|
@@ -102,20 +102,13 @@ export interface LazyFormFieldProps {
|
|
|
102
102
|
skeletonAnimated?: boolean;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
106
|
-
* 类型复用 UseGroupFormOptions 中的同名字段。
|
|
105
|
+
* 分组表单根组件 props:`formApi` 为必传数据入口;
|
|
107
106
|
*/
|
|
108
|
-
export type GroupFormSectionProps = Partial<Pick<UseGroupFormOptions, "virtual" | "scrollToFirstError" | "containerHeight" | "rootMargin" | "estimateFieldHeight">> & {
|
|
107
|
+
export type GroupFormSectionProps = Partial<Pick<UseGroupFormOptions, "virtual" | "scrollToFirstError" | "containerHeight" | "rootMargin" | "estimateFieldHeight" | "wrapperClass" | "layout" | "compact" | "commonConfig" | "actionWrapperClass" | "showCollapseButton" | "collapsed" | "collapsedRows" | "collapseTriggerResize" | "submitOnChange" | "submitOnEnter" | "fieldMappingTime" | "arrayToStringFields">> & {
|
|
109
108
|
/** 表单 API(必传,所有内部数据的入口) */
|
|
110
109
|
formApi: GroupFormApi;
|
|
111
110
|
/** 模板侧覆盖:导航锚点配置(与 store.navAnchorProps 合并,模板优先) */
|
|
112
111
|
navAnchorProps?: GroupFormNavAnchorProps;
|
|
113
|
-
/** 模板侧覆盖:布局方向 */
|
|
114
|
-
layout?: FormLayout;
|
|
115
|
-
/** 模板侧覆盖:紧凑模式 */
|
|
116
|
-
compact?: boolean;
|
|
117
|
-
/** 模板侧覆盖:通用配置(与 store.commonConfig 合并) */
|
|
118
|
-
commonConfig?: FormCommonConfig;
|
|
119
112
|
};
|
|
120
113
|
/** GroupSection 递归组件 props */
|
|
121
114
|
export interface GroupSectionProps {
|
|
@@ -24,6 +24,13 @@ export declare function isRowSchema(schema: GroupFormSchema): schema is FormRowS
|
|
|
24
24
|
* if (isSlotSchema(item)) console.log(item.content);
|
|
25
25
|
*/
|
|
26
26
|
export declare function isSlotSchema(schema: GroupFormSchema): schema is FormSlotSchema;
|
|
27
|
+
/**
|
|
28
|
+
* 为 v-for 生成稳定的 :key,根据 schema 类型选择最合适的标识
|
|
29
|
+
* @param {GroupFormSchema} schema - 分组表单 schema 节点
|
|
30
|
+
* @param {number} idx - 节点在列表中的索引(仅在无唯一标识时作为回退)
|
|
31
|
+
* @returns {string} 用于 :key 的字符串
|
|
32
|
+
*/
|
|
33
|
+
export declare function getSchemaKey(schema: GroupFormSchema, idx: number): string;
|
|
27
34
|
/**
|
|
28
35
|
* 递归展平分组 schema,提取所有字段 schema(忽略分组结构)
|
|
29
36
|
* @param {GroupFormSchema[]} schemas - 分组 schema 数组,可包含分组与字段的混合结构
|