@xn-lib/component 0.1.41 → 0.1.42
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/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.iife.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/cascader/index.vue.d.ts +2 -2
- package/dist/types/editable-textarea/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/select-input/index.vue.d.ts +1 -1
- package/dist/types/select-panel/index.d.ts +5 -0
- package/dist/types/select-panel/index.vue.d.ts +99 -0
- package/dist/types/select-panel/props.d.ts +40 -0
- package/dist/types/text-rule-config/index.vue.d.ts +3 -3
- package/dist/types/text-rule-config/props.d.ts +2 -2
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/text-rule-config.d.ts +14 -0
- package/package.json +1 -1
|
@@ -287,10 +287,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
287
287
|
}>, {
|
|
288
288
|
readonly disabled: boolean;
|
|
289
289
|
readonly filter: import("../types/cascader").Filter;
|
|
290
|
-
readonly showCheckbox: boolean;
|
|
291
290
|
readonly modelValue: CascaderValue | null;
|
|
292
291
|
readonly size: "small" | "default" | "large";
|
|
292
|
+
readonly showCheckbox: boolean;
|
|
293
293
|
readonly onLoad: import("../types/cascader").OnLoad;
|
|
294
|
+
readonly placeholder: string;
|
|
294
295
|
readonly getColumnStyle: (detail: {
|
|
295
296
|
level: number;
|
|
296
297
|
}) => string | Record<string, any>;
|
|
@@ -300,7 +301,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
300
301
|
readonly labelField: string;
|
|
301
302
|
readonly separator: string;
|
|
302
303
|
readonly options: CascaderOption[];
|
|
303
|
-
readonly placeholder: string;
|
|
304
304
|
readonly clearable: boolean;
|
|
305
305
|
readonly filterable: boolean;
|
|
306
306
|
readonly expandTrigger: import("../types/cascader").ExpandTrigger;
|
|
@@ -177,9 +177,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
177
177
|
}>, {
|
|
178
178
|
readonly disabled: boolean;
|
|
179
179
|
readonly modelValue: import("../types").EditableTextareaModelValue;
|
|
180
|
+
readonly placeholder: string;
|
|
180
181
|
readonly maxHeight: number;
|
|
181
182
|
readonly onEnter: import("../types").KeyboardEventHandler;
|
|
182
|
-
readonly placeholder: string;
|
|
183
183
|
readonly maxlength: number;
|
|
184
184
|
readonly readonly: boolean;
|
|
185
185
|
readonly autoHeight: boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ import XnTable from './table/index';
|
|
|
14
14
|
import XnModal from './modal/index';
|
|
15
15
|
import XnSelectInput from './select-input/index';
|
|
16
16
|
import XnListCard from './list-card/index';
|
|
17
|
-
|
|
17
|
+
import XnSelectPanel from './select-panel/index';
|
|
18
|
+
export { XnCascader, XnTag, XnTransfer, XnVirtualList, XnEllipsis, XnEditableText, XnEditableTextarea, XnTimeRangePicker, XnTextRuleConfig, XnFormList, XnTable, XnModal, XnSelectInput, XnListCard, XnSelectPanel };
|
|
18
19
|
export declare const components: Record<string, Component>;
|
|
19
20
|
export type { CascaderProps } from './cascader/props';
|
|
20
21
|
export type { TagProps } from './tag/props';
|
|
@@ -23,10 +24,12 @@ export type { EditableTextProps } from './editable-text/props';
|
|
|
23
24
|
export type { EditableTextareaProps } from './editable-textarea/props';
|
|
24
25
|
export type { TimeRangePickerProps, TimeRangeValue, TimeRange } from './time-range-picker/props';
|
|
25
26
|
export type { TextRuleConfigProps } from './text-rule-config/props';
|
|
27
|
+
export type { WildcardOption } from './types/text-rule-config';
|
|
26
28
|
export type { FormListProps, FormListRow, FormListDefaultRow } from './form-list/props';
|
|
27
29
|
export type { SelectInputProps } from './select-input/props';
|
|
28
30
|
export type { SelectInputValue, SelectInputInst } from './types/select-input';
|
|
29
31
|
export type { ListCardProps } from './list-card/props';
|
|
32
|
+
export type { SelectPanelProps } from './select-panel/props';
|
|
30
33
|
export { useFormList, useFormListActions, useFormListLayout, useFormListRowForms, useFormListUidSync, generateUid, cssLength, getFormListRowKey, ensureRowUids, stripUidRow } from './form-list/index';
|
|
31
34
|
export type { FormListExpose, FormListSubmitRow, RowKeyOptions, UseFormListOptions, UseFormListReturn } from './form-list/index';
|
|
32
35
|
export * from './types';
|
|
@@ -51,8 +51,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
51
51
|
onChange?: ((val: SelectInputValue) => any) | undefined;
|
|
52
52
|
}>, {
|
|
53
53
|
readonly modelValue: import("./props").SelectInputValue;
|
|
54
|
-
readonly options: any[];
|
|
55
54
|
readonly placeholder: string;
|
|
55
|
+
readonly options: any[];
|
|
56
56
|
readonly stripWhitespace: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
58
58
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
readonly modelValue: {
|
|
3
|
+
readonly type: import("vue").PropType<any[]>;
|
|
4
|
+
readonly default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
readonly max: {
|
|
7
|
+
readonly type: NumberConstructor;
|
|
8
|
+
readonly default: undefined;
|
|
9
|
+
};
|
|
10
|
+
readonly itemKey: {
|
|
11
|
+
readonly type: import("vue").PropType<string | ((item: any) => any)>;
|
|
12
|
+
readonly default: "id";
|
|
13
|
+
};
|
|
14
|
+
readonly itemLabel: {
|
|
15
|
+
readonly type: import("vue").PropType<string | ((item: any) => string)>;
|
|
16
|
+
readonly default: "label";
|
|
17
|
+
};
|
|
18
|
+
readonly showClear: {
|
|
19
|
+
readonly type: BooleanConstructor;
|
|
20
|
+
readonly default: true;
|
|
21
|
+
};
|
|
22
|
+
readonly showRefresh: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: false;
|
|
25
|
+
};
|
|
26
|
+
readonly emptyText: {
|
|
27
|
+
readonly type: StringConstructor;
|
|
28
|
+
readonly default: "暂无数据";
|
|
29
|
+
};
|
|
30
|
+
readonly title: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: "已选";
|
|
33
|
+
};
|
|
34
|
+
readonly maxHeight: {
|
|
35
|
+
readonly type: import("vue").PropType<number | string>;
|
|
36
|
+
readonly default: undefined;
|
|
37
|
+
};
|
|
38
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
"update:modelValue": (value: any[]) => any;
|
|
40
|
+
change: (value: any[]) => any;
|
|
41
|
+
remove: (item: any, index: number) => any;
|
|
42
|
+
clear: () => any;
|
|
43
|
+
refresh: () => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
readonly modelValue: {
|
|
46
|
+
readonly type: import("vue").PropType<any[]>;
|
|
47
|
+
readonly default: () => never[];
|
|
48
|
+
};
|
|
49
|
+
readonly max: {
|
|
50
|
+
readonly type: NumberConstructor;
|
|
51
|
+
readonly default: undefined;
|
|
52
|
+
};
|
|
53
|
+
readonly itemKey: {
|
|
54
|
+
readonly type: import("vue").PropType<string | ((item: any) => any)>;
|
|
55
|
+
readonly default: "id";
|
|
56
|
+
};
|
|
57
|
+
readonly itemLabel: {
|
|
58
|
+
readonly type: import("vue").PropType<string | ((item: any) => string)>;
|
|
59
|
+
readonly default: "label";
|
|
60
|
+
};
|
|
61
|
+
readonly showClear: {
|
|
62
|
+
readonly type: BooleanConstructor;
|
|
63
|
+
readonly default: true;
|
|
64
|
+
};
|
|
65
|
+
readonly showRefresh: {
|
|
66
|
+
readonly type: BooleanConstructor;
|
|
67
|
+
readonly default: false;
|
|
68
|
+
};
|
|
69
|
+
readonly emptyText: {
|
|
70
|
+
readonly type: StringConstructor;
|
|
71
|
+
readonly default: "暂无数据";
|
|
72
|
+
};
|
|
73
|
+
readonly title: {
|
|
74
|
+
readonly type: StringConstructor;
|
|
75
|
+
readonly default: "已选";
|
|
76
|
+
};
|
|
77
|
+
readonly maxHeight: {
|
|
78
|
+
readonly type: import("vue").PropType<number | string>;
|
|
79
|
+
readonly default: undefined;
|
|
80
|
+
};
|
|
81
|
+
}>> & Readonly<{
|
|
82
|
+
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
83
|
+
onChange?: ((value: any[]) => any) | undefined;
|
|
84
|
+
onRemove?: ((item: any, index: number) => any) | undefined;
|
|
85
|
+
onClear?: (() => any) | undefined;
|
|
86
|
+
onRefresh?: (() => any) | undefined;
|
|
87
|
+
}>, {
|
|
88
|
+
readonly title: string;
|
|
89
|
+
readonly modelValue: any[];
|
|
90
|
+
readonly maxHeight: string | number;
|
|
91
|
+
readonly emptyText: string;
|
|
92
|
+
readonly itemKey: string | ((item: any) => any);
|
|
93
|
+
readonly max: number;
|
|
94
|
+
readonly itemLabel: string | ((item: any) => string);
|
|
95
|
+
readonly showClear: boolean;
|
|
96
|
+
readonly showRefresh: boolean;
|
|
97
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
98
|
+
declare const _default: typeof __VLS_export;
|
|
99
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const selectPanelProps: {
|
|
3
|
+
readonly modelValue: {
|
|
4
|
+
readonly type: PropType<any[]>;
|
|
5
|
+
readonly default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
readonly max: {
|
|
8
|
+
readonly type: NumberConstructor;
|
|
9
|
+
readonly default: undefined;
|
|
10
|
+
};
|
|
11
|
+
readonly itemKey: {
|
|
12
|
+
readonly type: PropType<string | ((item: any) => any)>;
|
|
13
|
+
readonly default: "id";
|
|
14
|
+
};
|
|
15
|
+
readonly itemLabel: {
|
|
16
|
+
readonly type: PropType<string | ((item: any) => string)>;
|
|
17
|
+
readonly default: "label";
|
|
18
|
+
};
|
|
19
|
+
readonly showClear: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: true;
|
|
22
|
+
};
|
|
23
|
+
readonly showRefresh: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: false;
|
|
26
|
+
};
|
|
27
|
+
readonly emptyText: {
|
|
28
|
+
readonly type: StringConstructor;
|
|
29
|
+
readonly default: "暂无数据";
|
|
30
|
+
};
|
|
31
|
+
readonly title: {
|
|
32
|
+
readonly type: StringConstructor;
|
|
33
|
+
readonly default: "已选";
|
|
34
|
+
};
|
|
35
|
+
readonly maxHeight: {
|
|
36
|
+
readonly type: PropType<number | string>;
|
|
37
|
+
readonly default: undefined;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type SelectPanelProps = ExtractPropTypes<typeof selectPanelProps>;
|
|
@@ -11,7 +11,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
11
11
|
readonly default: 3;
|
|
12
12
|
};
|
|
13
13
|
readonly wildcards: {
|
|
14
|
-
readonly type: import("vue").PropType<import("..").
|
|
14
|
+
readonly type: import("vue").PropType<import("..").WildcardOption[]>;
|
|
15
15
|
readonly default: () => never[];
|
|
16
16
|
};
|
|
17
17
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -30,7 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
30
30
|
readonly default: 3;
|
|
31
31
|
};
|
|
32
32
|
readonly wildcards: {
|
|
33
|
-
readonly type: import("vue").PropType<import("..").
|
|
33
|
+
readonly type: import("vue").PropType<import("..").WildcardOption[]>;
|
|
34
34
|
readonly default: () => never[];
|
|
35
35
|
};
|
|
36
36
|
}>> & Readonly<{
|
|
@@ -39,7 +39,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
39
39
|
}>, {
|
|
40
40
|
readonly placeholder: string;
|
|
41
41
|
readonly rows: number;
|
|
42
|
-
readonly wildcards: import("..").
|
|
42
|
+
readonly wildcards: import("..").WildcardOption[];
|
|
43
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
44
|
declare const _default: typeof __VLS_export;
|
|
45
45
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import type { WildcardOption } from '../types';
|
|
3
3
|
export declare const textRuleConfigProps: {
|
|
4
4
|
readonly modelValue: {
|
|
5
5
|
readonly type: StringConstructor;
|
|
@@ -13,7 +13,7 @@ export declare const textRuleConfigProps: {
|
|
|
13
13
|
readonly default: 3;
|
|
14
14
|
};
|
|
15
15
|
readonly wildcards: {
|
|
16
|
-
readonly type: PropType<
|
|
16
|
+
readonly type: PropType<WildcardOption[]>;
|
|
17
17
|
readonly default: () => never[];
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -3,6 +3,7 @@ export * from './tag';
|
|
|
3
3
|
export * from './transfer';
|
|
4
4
|
export * from './virtual-list';
|
|
5
5
|
export * from './editable-textarea';
|
|
6
|
+
export * from './text-rule-config';
|
|
6
7
|
export * from './table';
|
|
7
8
|
export type DefaultType = 'success' | 'info' | 'warning' | 'danger' | 'primary' | 'default';
|
|
8
9
|
export type DefaultSize = 'small' | 'default' | 'large';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface WildcardOption {
|
|
2
|
+
/** 显示文案 */
|
|
3
|
+
label: string;
|
|
4
|
+
/** 插入值(无 onClick 时直接插入) */
|
|
5
|
+
value: string;
|
|
6
|
+
/** 提示信息 */
|
|
7
|
+
tip?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 点击交互回调,不传则直接插入 value
|
|
10
|
+
* 传入后,点击通配符不会直接插入,而是调用此函数
|
|
11
|
+
* 调用方在回调内自行处理交互(弹窗、选择器等),完成后调用 done(最终插入值) 完成插入
|
|
12
|
+
*/
|
|
13
|
+
onClick?: (done: (value: string) => void) => void;
|
|
14
|
+
}
|