xrk-components 2.0.0-beta.99 → 3.0.0
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/lib/index.css +296 -185
- package/lib/index.esm.js +540 -207
- package/lib/index.umd.js +540 -207
- package/lib/packages/base/date-picker/index.d.ts +15 -2
- package/lib/packages/base/dialog/hooks/use-resize.d.ts +6 -0
- package/lib/packages/base/form/index.d.ts +2 -2
- package/lib/packages/base/input/index.d.ts +2 -2
- package/lib/packages/base/layout/index.d.ts +4 -4
- package/lib/packages/base/table/table-column.d.ts +3 -0
- package/lib/packages/base/table/types/type.d.ts +7 -7
- package/lib/packages/hooks/use-default-props.d.ts +2 -0
- package/lib/packages/xrk/search/hooks/use-resize.d.ts +2 -0
- package/lib/packages/xrk/search/index.d.ts +4 -0
- package/lib/packages/xrk/search/search.d.ts +8 -0
- package/lib/packages/xrk/slide-verify/index.d.ts +2 -2
- package/lib/packages/xrk/table/hooks/use-resize.d.ts +1 -0
- package/lib/packages/xrk/table/hooks/use-table.d.ts +1 -0
- package/lib/packages/xrk/table/index.d.ts +7 -0
- package/package.json +1 -1
|
@@ -13,8 +13,21 @@ export interface BaseDatePickerProps extends BaseDatePickerListener {
|
|
|
13
13
|
format?: string;
|
|
14
14
|
popperClass?: string;
|
|
15
15
|
rangeSeparator?: string;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* 默认显示时间,用于时间选择器或者范围时间选择器,当用户未手动选择时间时,选择器会默认显示该时间。
|
|
18
|
+
*
|
|
19
|
+
* 注意事项:
|
|
20
|
+
* 1. 此值仅用于初始化显示,不会自动同步到 modelValue
|
|
21
|
+
* 2. 当组件绑定值为数组([]),但接口需要分离的 startDt/endDt 参数时,
|
|
22
|
+
* 需要在接口处理函数(如 translators\getListAjax)中将 value[0] 赋给 startDt,value[1] 赋给 endDt
|
|
23
|
+
* 3. 推荐后端统一使用数组格式接收时间范围参数
|
|
24
|
+
*
|
|
25
|
+
* 数据处理建议:
|
|
26
|
+
* - 方案一:在外部 change 事件中处理无默认值的情况
|
|
27
|
+
* - 方案二(推荐):统一在接口处理函数中进行数据转换,确保初始化和变更时都能正确处理
|
|
28
|
+
*/
|
|
29
|
+
defaultValue?: Date | Array<Date | string>;
|
|
30
|
+
defaultTime?: Date | Array<Date | string>;
|
|
18
31
|
valueFormat?: string;
|
|
19
32
|
unlinkPanels?: boolean;
|
|
20
33
|
prefixIcon?: string | Component;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleValue, DefineComponent } from 'vue';
|
|
2
2
|
import { ComponentsProps } from '../../xrk/search/types/type';
|
|
3
3
|
declare type RuleType = 'string' | 'number' | 'boolean' | 'method' | 'regexp' | 'integer' | 'float' | 'array' | 'object' | 'enum' | 'date' | 'url' | 'hex' | 'email' | 'pattern' | 'any';
|
|
4
4
|
interface ValidateOption {
|
|
@@ -136,7 +136,7 @@ export declare type BaseFormItemProps<K = Arrayable<string>, T extends keyof Com
|
|
|
136
136
|
/**
|
|
137
137
|
* 内部组件配置
|
|
138
138
|
*/
|
|
139
|
-
style?:
|
|
139
|
+
style?: StyleValue;
|
|
140
140
|
type?: T;
|
|
141
141
|
config?: ComponentsProps[T]['config'];
|
|
142
142
|
listener?: ComponentsProps[T]['listener'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, StyleValue, DefineComponent } from 'vue';
|
|
2
2
|
export interface BaseInputProps extends BaseInputListener {
|
|
3
3
|
useToolTip?: boolean;
|
|
4
4
|
textOverflowShow?: boolean;
|
|
@@ -33,7 +33,7 @@ export interface BaseInputProps extends BaseInputListener {
|
|
|
33
33
|
label?: string;
|
|
34
34
|
tabindex?: string | number;
|
|
35
35
|
validateEvent?: boolean;
|
|
36
|
-
inputStyle?:
|
|
36
|
+
inputStyle?: StyleValue;
|
|
37
37
|
/**
|
|
38
38
|
* type = 'text' | 'textarea' 才生效
|
|
39
39
|
* 可输入的文字类型,默认是 汉字、英文字母、数字、_、·、()、()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleValue, DefineComponent } from 'vue';
|
|
2
2
|
export declare type BaseLayoutMenuProps = {
|
|
3
3
|
menus: {
|
|
4
4
|
name: string;
|
|
@@ -25,13 +25,13 @@ export declare type BaseLayoutHeaderProps = {
|
|
|
25
25
|
export declare type BaseLayoutBodyProps = {
|
|
26
26
|
breadcrumbData?: any[];
|
|
27
27
|
hideBreadcrumb?: boolean;
|
|
28
|
-
contentStyle?:
|
|
28
|
+
contentStyle?: StyleValue;
|
|
29
29
|
};
|
|
30
30
|
export declare const BaseLayoutFlexContent: DefineComponent<{
|
|
31
|
-
contentStyle?:
|
|
31
|
+
contentStyle?: StyleValue | undefined;
|
|
32
32
|
fix?: boolean | undefined;
|
|
33
33
|
}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
34
|
-
contentStyle?:
|
|
34
|
+
contentStyle?: StyleValue | undefined;
|
|
35
35
|
fix?: boolean | undefined;
|
|
36
36
|
}>, {}>;
|
|
37
37
|
export declare const BaseLayoutHeader: DefineComponent<BaseLayoutHeaderProps, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<BaseLayoutHeaderProps>, {}>;
|
|
@@ -30,6 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
minWidth: {
|
|
31
31
|
type: (StringConstructor | NumberConstructor)[];
|
|
32
32
|
required: false;
|
|
33
|
+
default: any;
|
|
33
34
|
};
|
|
34
35
|
fixed: {
|
|
35
36
|
type: (StringConstructor | BooleanConstructor)[];
|
|
@@ -185,6 +186,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
185
186
|
minWidth: {
|
|
186
187
|
type: (StringConstructor | NumberConstructor)[];
|
|
187
188
|
required: false;
|
|
189
|
+
default: any;
|
|
188
190
|
};
|
|
189
191
|
fixed: {
|
|
190
192
|
type: (StringConstructor | BooleanConstructor)[];
|
|
@@ -310,6 +312,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
310
312
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
311
313
|
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
312
314
|
}, {
|
|
315
|
+
minWidth: string | number;
|
|
313
316
|
showOverflowTooltip: boolean;
|
|
314
317
|
formatter: Function;
|
|
315
318
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseToolTipProps } from 'packages/types';
|
|
2
2
|
import { ElTable } from 'element-plus';
|
|
3
|
-
import { ComputedRef,
|
|
3
|
+
import { ComputedRef, StyleValue, Ref, VNode } from 'vue';
|
|
4
4
|
declare type CI<T> = {
|
|
5
5
|
column: TableColumnCtx<T>;
|
|
6
6
|
$index: number;
|
|
@@ -65,7 +65,7 @@ export declare type RowClassNameType<T extends Record<string, any> = any> = (inf
|
|
|
65
65
|
export declare type RowStyleType<T extends Record<string, any> = any> = (info: {
|
|
66
66
|
row: T;
|
|
67
67
|
rowIndex: string | number;
|
|
68
|
-
}) =>
|
|
68
|
+
}) => StyleValue;
|
|
69
69
|
export declare type CellClassNameType<T extends Record<string, any> = any> = (info: {
|
|
70
70
|
row: T;
|
|
71
71
|
column: TableColumnCtx<T>;
|
|
@@ -77,7 +77,7 @@ export declare type CellStyleType<T extends Record<string, any> = any> = (info:
|
|
|
77
77
|
column: TableColumnCtx<T>;
|
|
78
78
|
rowIndex: string | number;
|
|
79
79
|
columnIndex: string | number;
|
|
80
|
-
}) =>
|
|
80
|
+
}) => StyleValue;
|
|
81
81
|
export declare type BaseTableSortInfoType<T extends Record<string, any> = any> = {
|
|
82
82
|
column: TableColumnCtx<T>;
|
|
83
83
|
prop: keyof T;
|
|
@@ -102,13 +102,13 @@ export declare type BaseTableProps<T extends Record<string, any> = any> = {
|
|
|
102
102
|
size?: 'large' | 'default' | 'small';
|
|
103
103
|
fit?: boolean;
|
|
104
104
|
rowClassName?: RowClassNameType<T>;
|
|
105
|
-
rowStyle?: RowStyleType<T> |
|
|
105
|
+
rowStyle?: RowStyleType<T> | StyleValue;
|
|
106
106
|
cellClassName?: CellClassNameType<T>;
|
|
107
|
-
cellStyle?: CellStyleType<T> |
|
|
107
|
+
cellStyle?: CellStyleType<T> | StyleValue;
|
|
108
108
|
headerRowClassName?: RowClassNameType<T>;
|
|
109
|
-
headerRowStyle?: RowStyleType<T> |
|
|
109
|
+
headerRowStyle?: RowStyleType<T> | StyleValue;
|
|
110
110
|
headerCellClassName?: CellClassNameType<T>;
|
|
111
|
-
headerCellStyle?: CellStyleType<T> |
|
|
111
|
+
headerCellStyle?: CellStyleType<T> | StyleValue;
|
|
112
112
|
rowKey?: ((row: T) => string) | string;
|
|
113
113
|
treeProps?: {
|
|
114
114
|
hasChildren?: string;
|
|
@@ -5,6 +5,7 @@ export declare type DefaultProps = {
|
|
|
5
5
|
};
|
|
6
6
|
'table-column'?: {
|
|
7
7
|
align?: 'left' | 'right' | 'center';
|
|
8
|
+
minWidth?: string | number;
|
|
8
9
|
};
|
|
9
10
|
'date-picker'?: {
|
|
10
11
|
shortcuts?: Array<{
|
|
@@ -22,6 +23,7 @@ export declare const useGetGlobalDefaultProps: (componentPropsKey: keyof Default
|
|
|
22
23
|
useBaseClass?: boolean | undefined;
|
|
23
24
|
} | {
|
|
24
25
|
align?: "left" | "right" | "center" | undefined;
|
|
26
|
+
minWidth?: string | number | undefined;
|
|
25
27
|
} | {
|
|
26
28
|
shortcuts?: {
|
|
27
29
|
text: string;
|
|
@@ -41,6 +41,10 @@ export declare type XrkSearchProps<T extends Record<string, any> = any> = {
|
|
|
41
41
|
* 未实现
|
|
42
42
|
*/
|
|
43
43
|
syncSearchToQuery?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 自定义列数
|
|
46
|
+
*/
|
|
47
|
+
fixedColumnsNum?: number;
|
|
44
48
|
};
|
|
45
49
|
export declare type XrkSearchRef<T extends Record<string, any> = any> = {
|
|
46
50
|
/**
|
|
@@ -35,6 +35,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
type: BooleanConstructor;
|
|
36
36
|
required: false;
|
|
37
37
|
};
|
|
38
|
+
fixedColumnsNum: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
required: false;
|
|
41
|
+
};
|
|
38
42
|
}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
43
|
[key: string]: any;
|
|
40
44
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -74,6 +78,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
78
|
type: BooleanConstructor;
|
|
75
79
|
required: false;
|
|
76
80
|
};
|
|
81
|
+
fixedColumnsNum: {
|
|
82
|
+
type: NumberConstructor;
|
|
83
|
+
required: false;
|
|
84
|
+
};
|
|
77
85
|
}>> & {
|
|
78
86
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
79
87
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleValue, DefineComponent } from 'vue';
|
|
2
2
|
export declare type XrkSlideVerifyProps = {
|
|
3
3
|
options: {
|
|
4
4
|
errorAnimationDuration?: number;
|
|
@@ -34,7 +34,7 @@ export declare type XrkSlideVerifyProps = {
|
|
|
34
34
|
}) => Promise<void>;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
boxStyle?:
|
|
37
|
+
boxStyle?: StyleValue;
|
|
38
38
|
};
|
|
39
39
|
export declare type XrkSlideVerifyRef = {
|
|
40
40
|
show: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useResponsiveHeight: (config: any) => void;
|
|
@@ -41,6 +41,13 @@ export declare type XrkTableRef<S extends Record<string, any> = any, T extends R
|
|
|
41
41
|
* 回到第一页,并刷新列表,可传入自定义参数(只会作用与这次列表获取,相同变量会被search组件设置的值覆盖)
|
|
42
42
|
*/
|
|
43
43
|
initList: (customQuery?: S) => Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* 获取当前列表data数据,用于动态修改。注意组件是否渲染完毕且数据是否加载完毕
|
|
46
|
+
*/
|
|
44
47
|
getTableData: () => Ref<Array<Record<string, any>>>;
|
|
48
|
+
/**
|
|
49
|
+
* 获取当前列表搜索数据
|
|
50
|
+
*/
|
|
51
|
+
getCurrentParams: () => Record<string, any>;
|
|
45
52
|
};
|
|
46
53
|
export declare const XrkTable: DefineComponent<XrkTableProps<any, any>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<XrkTableProps<any, any>>, {}>;
|