@xn-lib/component 0.1.13 → 0.1.15
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 +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.iife.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/editable-text/index.d.ts +5 -0
- package/dist/types/editable-text/index.vue.d.ts +129 -0
- package/dist/types/editable-text/props.d.ts +81 -0
- package/dist/types/ellipsis/index.d.ts +5 -0
- package/dist/types/ellipsis/index.vue.d.ts +76 -0
- package/dist/types/ellipsis/props.d.ts +46 -0
- package/dist/types/index.d.ts +5 -1
- package/package.json +4 -3
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
display?: (props: typeof __VLS_1) => any;
|
|
4
|
+
} & {
|
|
5
|
+
'edit-icon'?: (props: typeof __VLS_3) => any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
readonly modelValue: {
|
|
9
|
+
readonly type: StringConstructor;
|
|
10
|
+
readonly default: "";
|
|
11
|
+
};
|
|
12
|
+
readonly disabled: {
|
|
13
|
+
readonly type: BooleanConstructor;
|
|
14
|
+
readonly default: false;
|
|
15
|
+
};
|
|
16
|
+
readonly placeholder: {
|
|
17
|
+
readonly type: StringConstructor;
|
|
18
|
+
readonly default: "请输入";
|
|
19
|
+
};
|
|
20
|
+
readonly showEditIcon: {
|
|
21
|
+
readonly type: BooleanConstructor;
|
|
22
|
+
readonly default: true;
|
|
23
|
+
};
|
|
24
|
+
readonly editIcon: {
|
|
25
|
+
readonly type: StringConstructor;
|
|
26
|
+
readonly default: undefined;
|
|
27
|
+
};
|
|
28
|
+
readonly type: {
|
|
29
|
+
readonly type: import("vue").PropType<"text" | "textarea">;
|
|
30
|
+
readonly default: "text";
|
|
31
|
+
};
|
|
32
|
+
readonly rows: {
|
|
33
|
+
readonly type: NumberConstructor;
|
|
34
|
+
readonly default: 3;
|
|
35
|
+
};
|
|
36
|
+
readonly maxlength: {
|
|
37
|
+
readonly type: NumberConstructor;
|
|
38
|
+
readonly default: undefined;
|
|
39
|
+
};
|
|
40
|
+
readonly showWordLimit: {
|
|
41
|
+
readonly type: BooleanConstructor;
|
|
42
|
+
readonly default: false;
|
|
43
|
+
};
|
|
44
|
+
readonly textAlign: {
|
|
45
|
+
readonly type: import("vue").PropType<"left" | "center" | "right">;
|
|
46
|
+
readonly default: "left";
|
|
47
|
+
};
|
|
48
|
+
readonly size: {
|
|
49
|
+
readonly type: import("vue").PropType<"small" | "default" | "large">;
|
|
50
|
+
readonly default: "default";
|
|
51
|
+
};
|
|
52
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
+
"update:modelValue": (value: string) => any;
|
|
54
|
+
change: (value: string) => any;
|
|
55
|
+
cancel: () => any;
|
|
56
|
+
edit: () => any;
|
|
57
|
+
confirm: (value: string) => any;
|
|
58
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
readonly modelValue: {
|
|
60
|
+
readonly type: StringConstructor;
|
|
61
|
+
readonly default: "";
|
|
62
|
+
};
|
|
63
|
+
readonly disabled: {
|
|
64
|
+
readonly type: BooleanConstructor;
|
|
65
|
+
readonly default: false;
|
|
66
|
+
};
|
|
67
|
+
readonly placeholder: {
|
|
68
|
+
readonly type: StringConstructor;
|
|
69
|
+
readonly default: "请输入";
|
|
70
|
+
};
|
|
71
|
+
readonly showEditIcon: {
|
|
72
|
+
readonly type: BooleanConstructor;
|
|
73
|
+
readonly default: true;
|
|
74
|
+
};
|
|
75
|
+
readonly editIcon: {
|
|
76
|
+
readonly type: StringConstructor;
|
|
77
|
+
readonly default: undefined;
|
|
78
|
+
};
|
|
79
|
+
readonly type: {
|
|
80
|
+
readonly type: import("vue").PropType<"text" | "textarea">;
|
|
81
|
+
readonly default: "text";
|
|
82
|
+
};
|
|
83
|
+
readonly rows: {
|
|
84
|
+
readonly type: NumberConstructor;
|
|
85
|
+
readonly default: 3;
|
|
86
|
+
};
|
|
87
|
+
readonly maxlength: {
|
|
88
|
+
readonly type: NumberConstructor;
|
|
89
|
+
readonly default: undefined;
|
|
90
|
+
};
|
|
91
|
+
readonly showWordLimit: {
|
|
92
|
+
readonly type: BooleanConstructor;
|
|
93
|
+
readonly default: false;
|
|
94
|
+
};
|
|
95
|
+
readonly textAlign: {
|
|
96
|
+
readonly type: import("vue").PropType<"left" | "center" | "right">;
|
|
97
|
+
readonly default: "left";
|
|
98
|
+
};
|
|
99
|
+
readonly size: {
|
|
100
|
+
readonly type: import("vue").PropType<"small" | "default" | "large">;
|
|
101
|
+
readonly default: "default";
|
|
102
|
+
};
|
|
103
|
+
}>> & Readonly<{
|
|
104
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
105
|
+
onChange?: ((value: string) => any) | undefined;
|
|
106
|
+
onCancel?: (() => any) | undefined;
|
|
107
|
+
onEdit?: (() => any) | undefined;
|
|
108
|
+
onConfirm?: ((value: string) => any) | undefined;
|
|
109
|
+
}>, {
|
|
110
|
+
readonly disabled: boolean;
|
|
111
|
+
readonly modelValue: string;
|
|
112
|
+
readonly size: "small" | "default" | "large";
|
|
113
|
+
readonly type: "textarea" | "text";
|
|
114
|
+
readonly placeholder: string;
|
|
115
|
+
readonly maxlength: number;
|
|
116
|
+
readonly showWordLimit: boolean;
|
|
117
|
+
readonly rows: number;
|
|
118
|
+
readonly textAlign: "right" | "left" | "center";
|
|
119
|
+
readonly showEditIcon: boolean;
|
|
120
|
+
readonly editIcon: string;
|
|
121
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
122
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
123
|
+
declare const _default: typeof __VLS_export;
|
|
124
|
+
export default _default;
|
|
125
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
126
|
+
new (): {
|
|
127
|
+
$slots: S;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const editableTextProps: {
|
|
3
|
+
/**
|
|
4
|
+
* 文本内容(v-model)
|
|
5
|
+
*/
|
|
6
|
+
readonly modelValue: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 是否禁用
|
|
12
|
+
*/
|
|
13
|
+
readonly disabled: {
|
|
14
|
+
readonly type: BooleanConstructor;
|
|
15
|
+
readonly default: false;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 占位符
|
|
19
|
+
*/
|
|
20
|
+
readonly placeholder: {
|
|
21
|
+
readonly type: StringConstructor;
|
|
22
|
+
readonly default: "请输入";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 是否显示编辑图标
|
|
26
|
+
*/
|
|
27
|
+
readonly showEditIcon: {
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly default: true;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* 自定义编辑图标
|
|
33
|
+
*/
|
|
34
|
+
readonly editIcon: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: undefined;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 输入框类型
|
|
40
|
+
*/
|
|
41
|
+
readonly type: {
|
|
42
|
+
readonly type: PropType<"text" | "textarea">;
|
|
43
|
+
readonly default: "text";
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* textarea 行数
|
|
47
|
+
*/
|
|
48
|
+
readonly rows: {
|
|
49
|
+
readonly type: NumberConstructor;
|
|
50
|
+
readonly default: 3;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* 最大长度
|
|
54
|
+
*/
|
|
55
|
+
readonly maxlength: {
|
|
56
|
+
readonly type: NumberConstructor;
|
|
57
|
+
readonly default: undefined;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* 是否显示字数统计
|
|
61
|
+
*/
|
|
62
|
+
readonly showWordLimit: {
|
|
63
|
+
readonly type: BooleanConstructor;
|
|
64
|
+
readonly default: false;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* 文本对齐方式
|
|
68
|
+
*/
|
|
69
|
+
readonly textAlign: {
|
|
70
|
+
readonly type: PropType<"left" | "center" | "right">;
|
|
71
|
+
readonly default: "left";
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* 输入框大小
|
|
75
|
+
*/
|
|
76
|
+
readonly size: {
|
|
77
|
+
readonly type: PropType<"small" | "default" | "large">;
|
|
78
|
+
readonly default: "default";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export type EditableTextProps = ExtractPropTypes<typeof editableTextProps>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
declare var __VLS_7: {}, __VLS_9: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_7) => any;
|
|
4
|
+
} & {
|
|
5
|
+
default?: (props: typeof __VLS_9) => any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
readonly text: {
|
|
9
|
+
readonly type: StringConstructor;
|
|
10
|
+
readonly default: "";
|
|
11
|
+
};
|
|
12
|
+
readonly lineClamp: {
|
|
13
|
+
readonly type: import("vue").PropType<number | string>;
|
|
14
|
+
readonly default: undefined;
|
|
15
|
+
};
|
|
16
|
+
readonly tooltip: {
|
|
17
|
+
readonly type: BooleanConstructor;
|
|
18
|
+
readonly default: true;
|
|
19
|
+
};
|
|
20
|
+
readonly expandTrigger: {
|
|
21
|
+
readonly type: import("vue").PropType<"click" | "hover" | false>;
|
|
22
|
+
readonly default: false;
|
|
23
|
+
};
|
|
24
|
+
readonly tooltipContent: {
|
|
25
|
+
readonly type: StringConstructor;
|
|
26
|
+
readonly default: undefined;
|
|
27
|
+
};
|
|
28
|
+
readonly textAlign: {
|
|
29
|
+
readonly type: import("vue").PropType<"left" | "center" | "right">;
|
|
30
|
+
readonly default: "left";
|
|
31
|
+
};
|
|
32
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
expand: (expanded: boolean) => any;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
readonly text: {
|
|
36
|
+
readonly type: StringConstructor;
|
|
37
|
+
readonly default: "";
|
|
38
|
+
};
|
|
39
|
+
readonly lineClamp: {
|
|
40
|
+
readonly type: import("vue").PropType<number | string>;
|
|
41
|
+
readonly default: undefined;
|
|
42
|
+
};
|
|
43
|
+
readonly tooltip: {
|
|
44
|
+
readonly type: BooleanConstructor;
|
|
45
|
+
readonly default: true;
|
|
46
|
+
};
|
|
47
|
+
readonly expandTrigger: {
|
|
48
|
+
readonly type: import("vue").PropType<"click" | "hover" | false>;
|
|
49
|
+
readonly default: false;
|
|
50
|
+
};
|
|
51
|
+
readonly tooltipContent: {
|
|
52
|
+
readonly type: StringConstructor;
|
|
53
|
+
readonly default: undefined;
|
|
54
|
+
};
|
|
55
|
+
readonly textAlign: {
|
|
56
|
+
readonly type: import("vue").PropType<"left" | "center" | "right">;
|
|
57
|
+
readonly default: "left";
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{
|
|
60
|
+
onExpand?: ((expanded: boolean) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
readonly text: string;
|
|
63
|
+
readonly expandTrigger: false | "hover" | "click";
|
|
64
|
+
readonly lineClamp: string | number;
|
|
65
|
+
readonly tooltip: boolean;
|
|
66
|
+
readonly tooltipContent: string;
|
|
67
|
+
readonly textAlign: "right" | "left" | "center";
|
|
68
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
69
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
70
|
+
declare const _default: typeof __VLS_export;
|
|
71
|
+
export default _default;
|
|
72
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
73
|
+
new (): {
|
|
74
|
+
$slots: S;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const ellipsisProps: {
|
|
3
|
+
/**
|
|
4
|
+
* 文本内容
|
|
5
|
+
*/
|
|
6
|
+
readonly text: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 最大行数,超过则省略
|
|
12
|
+
*/
|
|
13
|
+
readonly lineClamp: {
|
|
14
|
+
readonly type: PropType<number | string>;
|
|
15
|
+
readonly default: undefined;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 是否显示 tooltip(当文本被省略时)
|
|
19
|
+
*/
|
|
20
|
+
readonly tooltip: {
|
|
21
|
+
readonly type: BooleanConstructor;
|
|
22
|
+
readonly default: true;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 展开触发方式:'click' | 'hover' | false
|
|
26
|
+
*/
|
|
27
|
+
readonly expandTrigger: {
|
|
28
|
+
readonly type: PropType<"click" | "hover" | false>;
|
|
29
|
+
readonly default: false;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* 自定义 tooltip 内容
|
|
33
|
+
*/
|
|
34
|
+
readonly tooltipContent: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: undefined;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 文本对齐方式
|
|
40
|
+
*/
|
|
41
|
+
readonly textAlign: {
|
|
42
|
+
readonly type: PropType<"left" | "center" | "right">;
|
|
43
|
+
readonly default: "left";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type EllipsisProps = ExtractPropTypes<typeof ellipsisProps>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,10 +4,14 @@ import XnCascader from './cascader/index';
|
|
|
4
4
|
import XnTag from './tag/index';
|
|
5
5
|
import XnTransfer from './transfer/index';
|
|
6
6
|
import XnVirtualList from './virtual-list/index';
|
|
7
|
-
|
|
7
|
+
import XnEllipsis from './ellipsis/index';
|
|
8
|
+
import XnEditableText from './editable-text/index';
|
|
9
|
+
export { XnCascader, XnTag, XnTransfer, XnVirtualList, XnEllipsis, XnEditableText };
|
|
8
10
|
export declare const components: Record<string, Component>;
|
|
9
11
|
export type { CascaderProps } from './cascader/props';
|
|
10
12
|
export type { TagProps } from './tag/props';
|
|
13
|
+
export type { EllipsisProps } from './ellipsis/props';
|
|
14
|
+
export type { EditableTextProps } from './editable-text/props';
|
|
11
15
|
export type { TransferOption, TransferEmits, TransferExpose } from './types/transfer';
|
|
12
16
|
export type { VirtualListProps, VirtualListEmits, VirtualListInstance } from './types/virtual-list';
|
|
13
17
|
export * from './types';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@xn-lib/component",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.15",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "./dist/index.umd.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -43,8 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"vueuc": "0.4.65",
|
|
46
|
-
"@xn-lib/base": "^0.
|
|
47
|
-
"@xn-lib/core": "^0.
|
|
46
|
+
"@xn-lib/base": "^0.1.14",
|
|
47
|
+
"@xn-lib/core": "^0.1.14",
|
|
48
|
+
"@xn-lib/directives": "^0.1.14"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"element-plus": ">=2.4.0",
|