@dazhicheng/ui 1.5.121 → 1.5.123
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/FormArrayRegister.d.ts +1 -0
- package/dist/components/tt-form/src/formApi.d.ts +18 -0
- package/dist/components/tt-form/src/group-form/groupFormApi.d.ts +19 -0
- package/dist/components/tt-form/src/hooks/useSelectCollapse.d.ts +2 -4
- package/dist/components/tt-form/src/types.d.ts +2 -1
- package/dist/components/tt-form/src/utils/array-path.d.ts +8 -0
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.d.ts +1 -1
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +1 -1
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.d.ts +1 -1
- package/dist/components/tt-panel-select/src/hooks/usePanelData.d.ts +1 -1
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.d.ts +1 -1
- package/dist/index.js +2595 -2487
- package/package.json +2 -1
- /package/dist/components/tt-panel-select/src/{props.d.ts → types.d.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { FieldEntry } from '../types/forms';
|
|
3
3
|
import { FormSchema } from '../types';
|
|
4
|
+
import { Recordable } from '../../../../../../utils/src';
|
|
4
5
|
declare const FormArrayRegister: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
6
|
fieldName: {
|
|
6
7
|
type: PropType<string>;
|
|
@@ -206,6 +206,24 @@ export declare class FormApi {
|
|
|
206
206
|
* @param indexB 第二个索引位置
|
|
207
207
|
*/
|
|
208
208
|
swap: (name: string, indexA: number, indexB: number) => void | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* @description 获取嵌套数组路径下的操作器
|
|
211
|
+
* @param parentPath 父数组路径(如 actions.data)
|
|
212
|
+
* @param index 父数组索引
|
|
213
|
+
* @param childField 子数组字段名(如 skills)
|
|
214
|
+
*/
|
|
215
|
+
at: <TValue = unknown>(parentPath: string, index: number, childField: string) => {
|
|
216
|
+
path: string;
|
|
217
|
+
get: () => Readonly<FieldArrayContext<TValue>> | undefined;
|
|
218
|
+
push: (value: TValue) => void | undefined;
|
|
219
|
+
remove: (idx: number) => void | undefined;
|
|
220
|
+
replace: (values: TValue[]) => void | undefined;
|
|
221
|
+
update: (idx: number, value: TValue) => void | undefined;
|
|
222
|
+
insert: (idx: number, value: TValue) => void | undefined;
|
|
223
|
+
prepend: (value: TValue) => void | undefined;
|
|
224
|
+
move: (oldIdx: number, newIdx: number) => void | undefined;
|
|
225
|
+
swap: (indexA: number, indexB: number) => void | undefined;
|
|
226
|
+
};
|
|
209
227
|
};
|
|
210
228
|
private _getArrayFieldActions;
|
|
211
229
|
}
|
|
@@ -280,6 +280,25 @@ export declare class GroupFormApi extends FormApi {
|
|
|
280
280
|
prepend: <TValue = unknown>(name: string, value: TValue) => void;
|
|
281
281
|
move: (name: string, oldIdx: number, newIdx: number) => void;
|
|
282
282
|
swap: (name: string, indexA: number, indexB: number) => void;
|
|
283
|
+
/**
|
|
284
|
+
* @description 获取嵌套数组路径下的操作器
|
|
285
|
+
* @param parentPath 父数组路径
|
|
286
|
+
* @param index 父数组索引
|
|
287
|
+
* @param childField 子数组字段名
|
|
288
|
+
* @returns 嵌套数组操作器
|
|
289
|
+
*/
|
|
290
|
+
at: <TValue = unknown>(parentPath: string, index: number, childField: string) => {
|
|
291
|
+
path: string;
|
|
292
|
+
get: () => Readonly<import('../types').FieldArrayContext<TValue>> | undefined;
|
|
293
|
+
push: (value: TValue) => void;
|
|
294
|
+
remove: (idx: number) => void;
|
|
295
|
+
replace: (values: TValue[]) => void;
|
|
296
|
+
update: (idx: number, value: TValue) => void;
|
|
297
|
+
insert: (idx: number, value: TValue) => void;
|
|
298
|
+
prepend: (value: TValue) => void;
|
|
299
|
+
move: (oldIdx: number, newIdx: number) => void;
|
|
300
|
+
swap: (indexA: number, indexB: number) => void;
|
|
301
|
+
};
|
|
283
302
|
};
|
|
284
303
|
unmount(): void;
|
|
285
304
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { MaybeRef,
|
|
1
|
+
import { MaybeRef, ShallowRef, ComputedRef, Component } from 'vue';
|
|
2
2
|
import { BaseFormComponentMap } from '../types';
|
|
3
|
-
import { TtApiComponent } from '../../../tt-api-component';
|
|
4
|
-
import { ElSelect, ElSelectV2 } from 'element-plus';
|
|
5
3
|
type CollapseOptions = {
|
|
6
4
|
componentProps: MaybeRef<any>;
|
|
7
5
|
component: keyof BaseFormComponentMap | Component;
|
|
8
6
|
selectWrapRef: Readonly<ShallowRef<HTMLElement | null>>;
|
|
9
|
-
selectRef:
|
|
7
|
+
selectRef: any;
|
|
10
8
|
};
|
|
11
9
|
export declare function useSelectCollapseOptions(data: ComputedRef<CollapseOptions>): {
|
|
12
10
|
selectComponentProps: ComputedRef<any>;
|
|
@@ -6,6 +6,7 @@ import { TtTextProps } from '../../tt-text';
|
|
|
6
6
|
import { TtSelectProp } from '../../tt-select';
|
|
7
7
|
import { TtUploadProps } from '../../tt-upload';
|
|
8
8
|
import { Props as TtApiComponentProps } from '../../tt-api-component';
|
|
9
|
+
import { Recordable } from '../../../../../utils/src';
|
|
9
10
|
import { FieldEntry, FieldArrayContext } from './types/forms';
|
|
10
11
|
import { PanelContainerProps } from '../../tt-panel-select';
|
|
11
12
|
import { FormApi } from './formApi';
|
|
@@ -245,7 +246,7 @@ export interface FormSchema<T extends BaseFormComponentType = BaseFormComponentT
|
|
|
245
246
|
* @example arraySchema: []
|
|
246
247
|
* @example arraySchema: (entry, index) => []
|
|
247
248
|
*/
|
|
248
|
-
arraySchema?: FormSchema[] | ((entry: FieldEntry
|
|
249
|
+
arraySchema?: FormSchema[] | ((entry: FieldEntry<Recordable>, currentIndex: number) => FormSchema[]);
|
|
249
250
|
}
|
|
250
251
|
/** 插槽 scope 参数,传递给渲染函数或具名插槽 */
|
|
251
252
|
export interface FormSlotScope {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nextTick } from 'vue';
|
|
2
|
-
import { PanelSelectValue, PanelMiddleProps } from '../
|
|
2
|
+
import { PanelSelectValue, PanelMiddleProps } from '../types';
|
|
3
3
|
declare function scrollToGroup(groupValue: PanelSelectValue): Promise<void>;
|
|
4
4
|
declare const _default: import('vue').DefineComponent<PanelMiddleProps, {
|
|
5
5
|
scrollToGroup: typeof scrollToGroup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref, WritableComputedRef } from 'vue';
|
|
2
|
-
import { PanelSelectModelValue, PanelSelectValue } from '../
|
|
2
|
+
import { PanelSelectModelValue, PanelSelectValue } from '../types';
|
|
3
3
|
import { OptionGroup, PanelTreeNode } from './usePanelData';
|
|
4
4
|
type UsePanelSelectSelectionParams = {
|
|
5
5
|
multiple: Readonly<Ref<boolean>>;
|