🐛(component): table

修复table 布局问题
column 新增minWidth和ellipsisTooltip属性

ISSUES CLOSED: https://gitee.com/layui/layui-vue/issues/I58DWF
This commit is contained in:
dingyongya
2022-05-21 17:11:28 +08:00
parent 0d3a7e4f89
commit 5b64cad09c
158 changed files with 42149 additions and 12 deletions

29
types/module/type/form.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
import type { ValidateCallback, ValidateError, ValidateMessages } from 'async-validator';
export declare const layFormKey = "LayForm";
export interface LayFormContext {
model: modelType;
required?: boolean;
requiredErrorMessage?: string;
validateMessage: ValidateMessages;
rules?: Record<string, unknown>;
useCN: boolean;
requiredIcons?: string;
addField: (field: LayFormItemContext) => void;
}
export interface LayFormItemContext {
prop?: string;
$el: HTMLDivElement;
required?: boolean;
rules?: Record<string, unknown>;
validate(callback?: ValidateCallback): void;
clearValidate(): void;
}
export declare type modelType = {
[key: string]: any;
};
export declare interface FormCallback {
(isValid?: boolean, model?: modelType, errors?: ValidateError[] | null): void;
}
export declare interface FieldValidateError extends ValidateError {
label?: string;
}

3
types/module/type/index.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from './public';
export * from './select';
export * from './form';

14
types/module/type/public.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
import type { App, DefineComponent, Ref } from 'vue';
export declare type StringObject = Record<string, unknown>;
export declare type UnknownObject = Record<string | number, unknown>;
export declare type UnknownFunction = (...arg: unknown[]) => unknown;
export declare type IDefineComponent<Props = UnknownObject> = DefineComponent<Props> & {
install: (app: App, options?: InstallOptions) => void;
};
export interface InstallOptions extends StringObject {
pagination?: null;
menu?: null;
}
export declare type Nullable<T> = T | null;
export declare type MaybeRef<T> = Ref<T> | T;
export declare type Recordable = Record<string, any>;

10
types/module/type/select.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
export declare type SelectValueType = string | string[] | number | number[] | null;
export interface SelectItem {
value?: SelectValueType;
label?: null | string | string[];
disabled?: boolean;
multiple?: boolean;
}
export interface SelectItemHandle {
(selectItem: SelectItem, isChecked?: boolean): void;
}