rtcpts 0.0.39 → 0.0.41
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/j-c-copy/types.d.ts +39 -0
- package/dist/components/j-c-duo-list-editor/types.d.ts +109 -0
- package/dist/components/j-c-editable-proxy/types.d.ts +106 -0
- package/dist/components/j-c-fallback/types.d.ts +57 -0
- package/dist/components/j-c-foldable-list/types.d.ts +55 -0
- package/dist/components/j-c-format-lookup/types.d.ts +67 -0
- package/dist/components/j-c-list-editor/types.d.ts +77 -0
- package/dist/components/j-c-more-menu/types.d.ts +147 -0
- package/dist/components/j-c-nested-select/types.d.ts +1 -0
- package/dist/components/j-c-permission/types.d.ts +62 -0
- package/dist/components/j-c-table/types.d.ts +67 -9
- package/dist/components/j-c-tabs/types.d.ts +112 -0
- package/dist/components/j-c-title-line/types.d.ts +33 -0
- package/dist/components/j-c-tooltip/types.d.ts +7 -0
- package/dist/components/j-c-tooltip-ellipsis/types.d.ts +1 -0
- package/dist/components/j-c-tree/types.d.ts +75 -0
- package/dist/components/j-c-tree-select/types.d.ts +132 -0
- package/dist/components/j-ch-bar/types.d.ts +13 -1
- package/dist/components/j-ch-bar-line/types.d.ts +1 -0
- package/dist/components/j-ch-bubble/types.d.ts +1 -0
- package/dist/components/j-ch-line/types.d.ts +1 -0
- package/dist/components/j-ch-pie-doughnut/types.d.ts +1 -0
- package/dist/components/j-ch-radar/types.d.ts +1 -0
- package/dist/components/j-q-autocomplete/types.d.ts +85 -0
- package/dist/components/j-q-button/types.d.ts +2 -0
- package/dist/components/j-q-button-dropdown/types.d.ts +2 -0
- package/dist/components/j-q-confirm/types.d.ts +2 -0
- package/dist/components/j-q-date/types.d.ts +145 -0
- package/dist/components/j-q-date-month/types.d.ts +94 -0
- package/dist/components/j-q-date-year/types.d.ts +76 -0
- package/dist/components/j-q-datetime/types.d.ts +145 -0
- package/dist/components/j-q-detail-list/types.d.ts +101 -0
- package/dist/components/j-q-dialog/types.d.ts +138 -0
- package/dist/components/j-q-file/types.d.ts +72 -0
- package/dist/components/j-q-form-label/types.d.ts +66 -0
- package/dist/components/j-q-input/types.d.ts +139 -0
- package/dist/components/j-q-input-recognize/types.d.ts +133 -0
- package/dist/components/j-q-new-value/types.d.ts +107 -0
- package/dist/components/j-q-option-group/types.d.ts +109 -0
- package/dist/components/j-q-pagination/types.d.ts +85 -0
- package/dist/components/j-q-popover/types.d.ts +50 -0
- package/dist/components/j-q-search-form/types.d.ts +80 -0
- package/dist/components/j-q-select/types.d.ts +196 -0
- package/dist/components/j-q-table/types.d.ts +215 -0
- package/dist/components/j-q-tooltip/types.d.ts +41 -0
- package/dist/global.d.ts +319 -9
- package/dist/index.css +1 -1
- package/dist/rtcpt.cjs.js +1 -1
- package/dist/rtcpt.es.js +1264 -1259
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** JCCopy Props 接口 */
|
|
3
|
+
export interface JCCopyProps {
|
|
4
|
+
/**
|
|
5
|
+
* 要复制的文本内容
|
|
6
|
+
* @default null
|
|
7
|
+
* @required true
|
|
8
|
+
*/
|
|
9
|
+
text: string | number | object;
|
|
10
|
+
/**
|
|
11
|
+
* 复制成功后图标恢复延迟时间(毫秒)
|
|
12
|
+
* @default 2000
|
|
13
|
+
*/
|
|
14
|
+
revertDelay?: number;
|
|
15
|
+
}
|
|
16
|
+
/** JCCopy Emits 接口 */
|
|
17
|
+
export interface JCCopyEmits {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
/** 组件没有定义事件 */
|
|
20
|
+
(e: 'never', never: never): never;
|
|
21
|
+
}
|
|
22
|
+
/** JCCopy Slots 接口 */
|
|
23
|
+
export interface JCCopySlots {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
/** 组件没有定义插槽 */
|
|
26
|
+
never?: never;
|
|
27
|
+
}
|
|
28
|
+
/** JCCopy 暴露的方法和属性 */
|
|
29
|
+
export interface JCCopyExpose {
|
|
30
|
+
}
|
|
31
|
+
/** JCCopy 组件类型定义 */
|
|
32
|
+
export type JCCopyComponent = DefineComponent<JCCopyProps, JCCopyExpose, {}, JCCopySlots, JCCopyEmits, {}, {}, {}>;
|
|
33
|
+
/** JCCopy 实例类型 - 用于 ref 类型定义 */
|
|
34
|
+
export type JCCopyInstance = InstanceType<JCCopyComponent> & JCCopyExpose;
|
|
35
|
+
/**
|
|
36
|
+
* 用于模板中的 Props 类型定义
|
|
37
|
+
*/
|
|
38
|
+
export interface JCCopyTemplateProps extends JCCopyProps {
|
|
39
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
export declare const JCDuoListEditorActionMode: {
|
|
3
|
+
readonly INLINE: "inline";
|
|
4
|
+
readonly COMPACT: "compact";
|
|
5
|
+
};
|
|
6
|
+
/** 操作模式类型 */
|
|
7
|
+
export type JCDuoListEditorActionModeType = (typeof JCDuoListEditorActionMode)[keyof typeof JCDuoListEditorActionMode];
|
|
8
|
+
/** 列表项类型 */
|
|
9
|
+
export type TModelItem = any;
|
|
10
|
+
/** 列表值类型 */
|
|
11
|
+
export type TModelValue = TModelItem[];
|
|
12
|
+
/** JCDuoListEditor Props 接口 */
|
|
13
|
+
export interface JCDuoListEditorProps {
|
|
14
|
+
/**
|
|
15
|
+
* 双向绑定的列表数据
|
|
16
|
+
* @default [{}]
|
|
17
|
+
*/
|
|
18
|
+
modelValue?: TModelValue;
|
|
19
|
+
/**
|
|
20
|
+
* 新项的默认值
|
|
21
|
+
* @default {}
|
|
22
|
+
*/
|
|
23
|
+
defaultNewItem?: TModelItem;
|
|
24
|
+
/**
|
|
25
|
+
* 最小项数
|
|
26
|
+
* @default 1
|
|
27
|
+
*/
|
|
28
|
+
minItems?: number;
|
|
29
|
+
/**
|
|
30
|
+
* 最大项数
|
|
31
|
+
* @default 5
|
|
32
|
+
*/
|
|
33
|
+
maxItems?: number;
|
|
34
|
+
/**
|
|
35
|
+
* 操作按钮显示模式
|
|
36
|
+
* @default 'inline'
|
|
37
|
+
* @values 'inline' | 'compact'
|
|
38
|
+
*/
|
|
39
|
+
actionMode?: JCDuoListEditorActionModeType;
|
|
40
|
+
/**
|
|
41
|
+
* 是否显示添加按钮
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
showAddButton?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 是否显示删除按钮
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
showRemoveButton?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/** JCDuoListEditor Emits 接口 */
|
|
52
|
+
export interface JCDuoListEditorEmits {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
/**
|
|
55
|
+
* 数据更新事件
|
|
56
|
+
* @param value 更新后的值数组
|
|
57
|
+
*/
|
|
58
|
+
(e: 'update:modelValue', value: TModelValue[]): void;
|
|
59
|
+
}
|
|
60
|
+
/** JCDuoListEditor Slots 接口 */
|
|
61
|
+
export interface JCDuoListEditorSlots {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
/**
|
|
64
|
+
* 列表项内容插槽
|
|
65
|
+
* @param item 当前列表项
|
|
66
|
+
* @param index 当前索引
|
|
67
|
+
* @param updateItem 更新项的函数
|
|
68
|
+
* @param isLast 是否最后一项
|
|
69
|
+
* @param addItem 添加项的函数
|
|
70
|
+
* @param removeItem 移除项的函数
|
|
71
|
+
* @param canAdd 是否可以添加
|
|
72
|
+
* @param canRemove 是否可以移除
|
|
73
|
+
* @param mode 操作模式
|
|
74
|
+
*/
|
|
75
|
+
'item-content'?: (props: {
|
|
76
|
+
item: TModelItem;
|
|
77
|
+
index: number;
|
|
78
|
+
updateItem: (index: number, newItem: TModelItem) => void;
|
|
79
|
+
isLast: boolean;
|
|
80
|
+
addItem: (index: number) => void;
|
|
81
|
+
removeItem: (index: number) => void;
|
|
82
|
+
canAdd: boolean;
|
|
83
|
+
canRemove: boolean;
|
|
84
|
+
mode: JCDuoListEditorActionModeType;
|
|
85
|
+
}) => any;
|
|
86
|
+
/**
|
|
87
|
+
* 列表底部操作插槽
|
|
88
|
+
* @param addItem 添加项的函数
|
|
89
|
+
* @param canAdd 是否可以添加
|
|
90
|
+
* @param nextIndex 下一项的索引
|
|
91
|
+
*/
|
|
92
|
+
'list-footer-actions'?: (props: {
|
|
93
|
+
addItem: (index: number) => void;
|
|
94
|
+
canAdd: boolean;
|
|
95
|
+
nextIndex: number;
|
|
96
|
+
}) => any;
|
|
97
|
+
}
|
|
98
|
+
/** JCDuoListEditor 暴露的方法和属性 */
|
|
99
|
+
export interface JCDuoListEditorExpose {
|
|
100
|
+
}
|
|
101
|
+
/** JCDuoListEditor 组件类型定义 */
|
|
102
|
+
export type JCDuoListEditorComponent = DefineComponent<JCDuoListEditorProps, JCDuoListEditorExpose, {}, JCDuoListEditorSlots, JCDuoListEditorEmits, {}, {}, {}>;
|
|
103
|
+
/** JCDuoListEditor 实例类型 - 用于 ref 类型定义 */
|
|
104
|
+
export type JCDuoListEditorInstance = InstanceType<JCDuoListEditorComponent> & JCDuoListEditorExpose;
|
|
105
|
+
/**
|
|
106
|
+
* 用于模板中的 Props 类型定义
|
|
107
|
+
*/
|
|
108
|
+
export interface JCDuoListEditorTemplateProps extends JCDuoListEditorProps {
|
|
109
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** 模型值类型 */
|
|
3
|
+
export type ModelValueType = any;
|
|
4
|
+
/** QInputRef 接口 */
|
|
5
|
+
export interface QInputRef {
|
|
6
|
+
validate: () => boolean;
|
|
7
|
+
resetValidation: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** JCEditableProxy Props 接口 */
|
|
10
|
+
export interface JCEditableProxyProps {
|
|
11
|
+
/**
|
|
12
|
+
* 双向绑定的值
|
|
13
|
+
* @default null
|
|
14
|
+
*/
|
|
15
|
+
modelValue?: ModelValueType;
|
|
16
|
+
/**
|
|
17
|
+
* 编辑图标大小
|
|
18
|
+
* @default '18px'
|
|
19
|
+
*/
|
|
20
|
+
iconSize?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 弹窗宽度
|
|
23
|
+
* @default '300px'
|
|
24
|
+
*/
|
|
25
|
+
popupWidth?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 权限码
|
|
28
|
+
* @default ''
|
|
29
|
+
*/
|
|
30
|
+
code?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 是否必填
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
required?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 移除确认按钮上边距
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
noSpacing?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 自动检测是否有验证规则
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
autoDetect?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 编辑图标样式
|
|
48
|
+
* @default ''
|
|
49
|
+
*/
|
|
50
|
+
iconStyle?: string;
|
|
51
|
+
}
|
|
52
|
+
/** JCEditableProxy Emits 接口 */
|
|
53
|
+
export interface JCEditableProxyEmits {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
/**
|
|
56
|
+
* 数据更新事件
|
|
57
|
+
* @param value 更新后的值
|
|
58
|
+
*/
|
|
59
|
+
(e: 'update:modelValue', value: ModelValueType): void;
|
|
60
|
+
/**
|
|
61
|
+
* 保存成功事件
|
|
62
|
+
* @param value 保存的值
|
|
63
|
+
*/
|
|
64
|
+
(e: 'saved', value: ModelValueType): void;
|
|
65
|
+
/**
|
|
66
|
+
* 确认事件
|
|
67
|
+
* @param value 当前值
|
|
68
|
+
* @param done 完成回调函数
|
|
69
|
+
*/
|
|
70
|
+
(e: 'confirm', value: ModelValueType, done: (options?: {
|
|
71
|
+
success?: boolean;
|
|
72
|
+
close?: boolean;
|
|
73
|
+
resetValue?: boolean;
|
|
74
|
+
}) => void): void;
|
|
75
|
+
}
|
|
76
|
+
/** JCEditableProxy Slots 接口 */
|
|
77
|
+
export interface JCEditableProxySlots {
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
/**
|
|
80
|
+
* 显示内容插槽
|
|
81
|
+
*/
|
|
82
|
+
display?: () => any;
|
|
83
|
+
/**
|
|
84
|
+
* 编辑器插槽
|
|
85
|
+
* @param tempValue 临时值
|
|
86
|
+
* @param updateTempValue 更新临时值的函数
|
|
87
|
+
* @param setEditorRef 设置编辑器引用的函数
|
|
88
|
+
*/
|
|
89
|
+
editor?: (props: {
|
|
90
|
+
tempValue: ModelValueType;
|
|
91
|
+
updateTempValue: (val: ModelValueType) => void;
|
|
92
|
+
setEditorRef: (ref: QInputRef | null) => void;
|
|
93
|
+
}) => any;
|
|
94
|
+
}
|
|
95
|
+
/** JCEditableProxy 暴露的方法和属性 */
|
|
96
|
+
export interface JCEditableProxyExpose {
|
|
97
|
+
}
|
|
98
|
+
/** JCEditableProxy 组件类型定义 */
|
|
99
|
+
export type JCEditableProxyComponent = DefineComponent<JCEditableProxyProps, JCEditableProxyExpose, {}, JCEditableProxySlots, JCEditableProxyEmits, {}, {}, {}>;
|
|
100
|
+
/** JCEditableProxy 实例类型 - 用于 ref 类型定义 */
|
|
101
|
+
export type JCEditableProxyInstance = InstanceType<JCEditableProxyComponent> & JCEditableProxyExpose;
|
|
102
|
+
/**
|
|
103
|
+
* 用于模板中的 Props 类型定义
|
|
104
|
+
*/
|
|
105
|
+
export interface JCEditableProxyTemplateProps extends JCEditableProxyProps {
|
|
106
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** 回退值类型 */
|
|
3
|
+
export type FallbackValue = any;
|
|
4
|
+
/** JCFallback Props 接口 */
|
|
5
|
+
export interface JCFallbackProps {
|
|
6
|
+
/**
|
|
7
|
+
* 需要判断是否存在的值
|
|
8
|
+
* @default null
|
|
9
|
+
*/
|
|
10
|
+
value?: FallbackValue;
|
|
11
|
+
/**
|
|
12
|
+
* 无值时显示的内容
|
|
13
|
+
* @default '-'
|
|
14
|
+
*/
|
|
15
|
+
defaultContent?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 无值时是否移除DOM
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
rmDom?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 是否把 0 或 '0' 视为有效值
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
zeroIsValid?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 是否把 false 视为有效值
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
falseIsValid?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** JCFallback Emits 接口 */
|
|
33
|
+
export interface JCFallbackEmits {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
/** 组件没有定义事件 */
|
|
36
|
+
(e: 'never', never: never): never;
|
|
37
|
+
}
|
|
38
|
+
/** JCFallback Slots 接口 */
|
|
39
|
+
export interface JCFallbackSlots {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
/**
|
|
42
|
+
* 默认插槽,有值时显示的内容
|
|
43
|
+
*/
|
|
44
|
+
default?: () => any;
|
|
45
|
+
}
|
|
46
|
+
/** JCFallback 暴露的方法和属性 */
|
|
47
|
+
export interface JCFallbackExpose {
|
|
48
|
+
}
|
|
49
|
+
/** JCFallback 组件类型定义 */
|
|
50
|
+
export type JCFallbackComponent = DefineComponent<JCFallbackProps, JCFallbackExpose, {}, JCFallbackSlots, JCFallbackEmits, {}, {}, {}>;
|
|
51
|
+
/** JCFallback 实例类型 - 用于 ref 类型定义 */
|
|
52
|
+
export type JCFallbackInstance = InstanceType<JCFallbackComponent> & JCFallbackExpose;
|
|
53
|
+
/**
|
|
54
|
+
* 用于模板中的 Props 类型定义
|
|
55
|
+
*/
|
|
56
|
+
export interface JCFallbackTemplateProps extends JCFallbackProps {
|
|
57
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** JCFoldableList Props 接口 */
|
|
3
|
+
export interface JCFoldableListProps {
|
|
4
|
+
/**
|
|
5
|
+
* 最大高度(像素)
|
|
6
|
+
* @default 100
|
|
7
|
+
*/
|
|
8
|
+
maxHeight?: number;
|
|
9
|
+
/**
|
|
10
|
+
* 默认是否折叠
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
defaultCollapsed?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 在对话框中查看全部内容
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
viewInDialog?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 对话框标题
|
|
21
|
+
* @default ''
|
|
22
|
+
*/
|
|
23
|
+
dialogTitle?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 对话框最大宽度
|
|
26
|
+
* @default '50vw'
|
|
27
|
+
*/
|
|
28
|
+
dialogMaxWidth?: string;
|
|
29
|
+
}
|
|
30
|
+
/** JCFoldableList Emits 接口 */
|
|
31
|
+
export interface JCFoldableListEmits {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
/** 组件没有定义事件 */
|
|
34
|
+
(e: 'never', never: never): never;
|
|
35
|
+
}
|
|
36
|
+
/** JCFoldableList Slots 接口 */
|
|
37
|
+
export interface JCFoldableListSlots {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
/** 默认插槽,用于放置需要折叠的内容 */
|
|
40
|
+
default?: () => any;
|
|
41
|
+
}
|
|
42
|
+
/** JCFoldableList 暴露的方法和属性 */
|
|
43
|
+
export interface JCFoldableListExpose {
|
|
44
|
+
/** 重新测量内容高度 */
|
|
45
|
+
remeasure: () => void;
|
|
46
|
+
}
|
|
47
|
+
/** JCFoldableList 组件类型定义 */
|
|
48
|
+
export type JCFoldableListComponent = DefineComponent<JCFoldableListProps, JCFoldableListExpose, {}, JCFoldableListSlots, JCFoldableListEmits, {}, {}, {}>;
|
|
49
|
+
/** JCFoldableList 实例类型 - 用于 ref 类型定义 */
|
|
50
|
+
export type JCFoldableListInstance = InstanceType<JCFoldableListComponent> & JCFoldableListExpose;
|
|
51
|
+
/**
|
|
52
|
+
* 用于模板中的 Props 类型定义
|
|
53
|
+
*/
|
|
54
|
+
export interface JCFoldableListTemplateProps extends JCFoldableListProps {
|
|
55
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** 通用的选项类型定义 */
|
|
3
|
+
export interface OptionItem {
|
|
4
|
+
label: string;
|
|
5
|
+
value: any;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
/** 查找键的类型 */
|
|
9
|
+
export type LookupKey = 'label' | 'value';
|
|
10
|
+
/** JCFormatLookup Props 接口 */
|
|
11
|
+
export interface JCFormatLookupProps {
|
|
12
|
+
/**
|
|
13
|
+
* 要查找的值
|
|
14
|
+
* @default null
|
|
15
|
+
*/
|
|
16
|
+
value?: any;
|
|
17
|
+
/**
|
|
18
|
+
* 选项列表,组件会在这个列表中进行查找
|
|
19
|
+
* @default null
|
|
20
|
+
* @required true
|
|
21
|
+
*/
|
|
22
|
+
options: OptionItem[];
|
|
23
|
+
/**
|
|
24
|
+
* 匹配的键
|
|
25
|
+
* @default ['value', 'label']
|
|
26
|
+
*/
|
|
27
|
+
matchKeys?: LookupKey[];
|
|
28
|
+
/**
|
|
29
|
+
* 查找失败时显示的内容
|
|
30
|
+
* @default '-'
|
|
31
|
+
*/
|
|
32
|
+
defaultContent?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 查找失败时是否移除DOM
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
rmDom?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** JCFormatLookup Emits 接口 */
|
|
40
|
+
export interface JCFormatLookupEmits {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
/** 组件没有定义事件 */
|
|
43
|
+
(e: 'never', never: never): never;
|
|
44
|
+
}
|
|
45
|
+
/** JCFormatLookup Slots 接口 */
|
|
46
|
+
export interface JCFormatLookupSlots {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
/**
|
|
49
|
+
* 默认插槽
|
|
50
|
+
* @param label 显示的标签文本
|
|
51
|
+
*/
|
|
52
|
+
default?: (props: {
|
|
53
|
+
label: string;
|
|
54
|
+
}) => any;
|
|
55
|
+
}
|
|
56
|
+
/** JCFormatLookup 暴露的方法和属性 */
|
|
57
|
+
export interface JCFormatLookupExpose {
|
|
58
|
+
}
|
|
59
|
+
/** JCFormatLookup 组件类型定义 */
|
|
60
|
+
export type JCFormatLookupComponent = DefineComponent<JCFormatLookupProps, JCFormatLookupExpose, {}, JCFormatLookupSlots, JCFormatLookupEmits, {}, {}, {}>;
|
|
61
|
+
/** JCFormatLookup 实例类型 - 用于 ref 类型定义 */
|
|
62
|
+
export type JCFormatLookupInstance = InstanceType<JCFormatLookupComponent> & JCFormatLookupExpose;
|
|
63
|
+
/**
|
|
64
|
+
* 用于模板中的 Props 类型定义
|
|
65
|
+
*/
|
|
66
|
+
export interface JCFormatLookupTemplateProps extends JCFormatLookupProps {
|
|
67
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** JCListEditor Props 接口 */
|
|
3
|
+
export interface JCListEditorProps {
|
|
4
|
+
/**
|
|
5
|
+
* 双向绑定的列表数据
|
|
6
|
+
* @default ['']
|
|
7
|
+
*/
|
|
8
|
+
modelValue?: string[];
|
|
9
|
+
/**
|
|
10
|
+
* 表单项标签
|
|
11
|
+
* @default null
|
|
12
|
+
* @required true
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* 是否必填
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
required?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 验证规则
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
rules?: any[];
|
|
25
|
+
/**
|
|
26
|
+
* 是否只读
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
readonly?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 占位符文本
|
|
32
|
+
* @default ''
|
|
33
|
+
*/
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 新项的默认值
|
|
37
|
+
* @default ''
|
|
38
|
+
*/
|
|
39
|
+
defaultNewValue?: string;
|
|
40
|
+
/**
|
|
41
|
+
* 最大项数
|
|
42
|
+
* @default 5
|
|
43
|
+
*/
|
|
44
|
+
maxItems?: number;
|
|
45
|
+
/**
|
|
46
|
+
* 输入框类型
|
|
47
|
+
* @default 'text'
|
|
48
|
+
*/
|
|
49
|
+
inputType?: string;
|
|
50
|
+
}
|
|
51
|
+
/** JCListEditor Emits 接口 */
|
|
52
|
+
export interface JCListEditorEmits {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
/**
|
|
55
|
+
* 数据更新事件
|
|
56
|
+
* @param value 更新后的值数组
|
|
57
|
+
*/
|
|
58
|
+
(e: 'update:modelValue', value: string[]): void;
|
|
59
|
+
}
|
|
60
|
+
/** JCListEditor Slots 接口 */
|
|
61
|
+
export interface JCListEditorSlots {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
/** 输入框后置插槽 */
|
|
64
|
+
after?: () => any;
|
|
65
|
+
}
|
|
66
|
+
/** JCListEditor 暴露的方法和属性 */
|
|
67
|
+
export interface JCListEditorExpose {
|
|
68
|
+
}
|
|
69
|
+
/** JCListEditor 组件类型定义 */
|
|
70
|
+
export type JCListEditorComponent = DefineComponent<JCListEditorProps, JCListEditorExpose, {}, JCListEditorSlots, JCListEditorEmits, {}, {}, {}>;
|
|
71
|
+
/** JCListEditor 实例类型 - 用于 ref 类型定义 */
|
|
72
|
+
export type JCListEditorInstance = InstanceType<JCListEditorComponent> & JCListEditorExpose;
|
|
73
|
+
/**
|
|
74
|
+
* 用于模板中的 Props 类型定义
|
|
75
|
+
*/
|
|
76
|
+
export interface JCListEditorTemplateProps extends JCListEditorProps {
|
|
77
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
export declare const JCMoreMenuSize: {
|
|
3
|
+
readonly MD: "md";
|
|
4
|
+
readonly LG: "lg";
|
|
5
|
+
};
|
|
6
|
+
/** 菜单尺寸类型 */
|
|
7
|
+
export type JCMoreMenuSizeType = (typeof JCMoreMenuSize)[keyof typeof JCMoreMenuSize];
|
|
8
|
+
/** 布尔值类型(可以是布尔值或返回布尔值的函数) */
|
|
9
|
+
export type BoolLike<T> = boolean | ((item: T) => boolean);
|
|
10
|
+
/** 标签类型(可以是字符串或返回字符串的函数) */
|
|
11
|
+
export type LabelLike<T> = string | ((ctx: {
|
|
12
|
+
item: T;
|
|
13
|
+
action: JCMoreMenuAction<T>;
|
|
14
|
+
}) => string);
|
|
15
|
+
/** 翻译函数类型 */
|
|
16
|
+
export type TranslateFn = (key: string, variables?: Record<string, any>) => string;
|
|
17
|
+
/** JCMoreMenu 动作类型定义 */
|
|
18
|
+
export interface JCMoreMenuAction<T = any> {
|
|
19
|
+
key?: string | number;
|
|
20
|
+
/** 用于图标插槽的唯一标识(选填) */
|
|
21
|
+
id?: string;
|
|
22
|
+
/** 权限码;不传则默认当作有权限 */
|
|
23
|
+
permissionCode?: string | null;
|
|
24
|
+
/** 无权限时是否移除 DOM(默认 true) */
|
|
25
|
+
rmDom?: boolean;
|
|
26
|
+
/** 无权限且 rmDom=false 时显示的默认文案 */
|
|
27
|
+
defaultContent?: string;
|
|
28
|
+
/** 文案:优先 label,其次 i18nKey */
|
|
29
|
+
label?: LabelLike<T>;
|
|
30
|
+
i18nKey?: string;
|
|
31
|
+
/** 是否可点击(默认 true) */
|
|
32
|
+
clickable?: boolean;
|
|
33
|
+
/** 点击后是否自动关闭弹层(默认 true) */
|
|
34
|
+
closePopup?: boolean;
|
|
35
|
+
/** 是否显示该 action(默认 true) */
|
|
36
|
+
visible?: BoolLike<T>;
|
|
37
|
+
/** 是否禁用该 action(默认 false) */
|
|
38
|
+
disabled?: BoolLike<T>;
|
|
39
|
+
/** 点击回调 */
|
|
40
|
+
onClick?: (item: T) => void | Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
/** JCMoreMenu Props 接口 */
|
|
43
|
+
export interface JCMoreMenuProps<T = any> {
|
|
44
|
+
/**
|
|
45
|
+
* 当前行数据
|
|
46
|
+
* @default null
|
|
47
|
+
*/
|
|
48
|
+
item?: T;
|
|
49
|
+
/**
|
|
50
|
+
* 操作列表
|
|
51
|
+
* @default []
|
|
52
|
+
*/
|
|
53
|
+
actions?: JCMoreMenuAction<T>[];
|
|
54
|
+
/**
|
|
55
|
+
* 菜单尺寸
|
|
56
|
+
* @default 'md'
|
|
57
|
+
* @values 'md' | 'lg'
|
|
58
|
+
*/
|
|
59
|
+
size?: JCMoreMenuSizeType;
|
|
60
|
+
/**
|
|
61
|
+
* 是否适应宽度
|
|
62
|
+
* @default undefined
|
|
63
|
+
*/
|
|
64
|
+
fit?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 是否紧凑模式
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
dense?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 触发图标大小
|
|
72
|
+
* @default '16px'
|
|
73
|
+
*/
|
|
74
|
+
triggerSize?: string;
|
|
75
|
+
/**
|
|
76
|
+
* 偏移量
|
|
77
|
+
* @default undefined
|
|
78
|
+
*/
|
|
79
|
+
offset?: [number, number];
|
|
80
|
+
/**
|
|
81
|
+
* 锚点位置
|
|
82
|
+
* @default undefined
|
|
83
|
+
*/
|
|
84
|
+
anchor?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 自身位置
|
|
87
|
+
* @default undefined
|
|
88
|
+
*/
|
|
89
|
+
self?: string;
|
|
90
|
+
/**
|
|
91
|
+
* 列表最小宽度
|
|
92
|
+
* @default undefined
|
|
93
|
+
*/
|
|
94
|
+
listMinWidth?: string;
|
|
95
|
+
/**
|
|
96
|
+
* 菜单样式类
|
|
97
|
+
* @default undefined
|
|
98
|
+
*/
|
|
99
|
+
menuClass?: any;
|
|
100
|
+
/**
|
|
101
|
+
* 翻译函数
|
|
102
|
+
* @default undefined
|
|
103
|
+
*/
|
|
104
|
+
translate?: TranslateFn;
|
|
105
|
+
/**
|
|
106
|
+
* 无操作时显示占位符
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
showEmptyPlaceholder?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/** JCMoreMenu Emits 接口 */
|
|
112
|
+
export interface JCMoreMenuEmits<T = any> {
|
|
113
|
+
[key: string]: any;
|
|
114
|
+
/**
|
|
115
|
+
* 动作点击事件
|
|
116
|
+
* @param payload 动作和项目数据
|
|
117
|
+
*/
|
|
118
|
+
(e: 'action', payload: {
|
|
119
|
+
action: JCMoreMenuAction<T>;
|
|
120
|
+
item: T;
|
|
121
|
+
}): void;
|
|
122
|
+
}
|
|
123
|
+
/** JCMoreMenu Slots 接口 */
|
|
124
|
+
export interface JCMoreMenuSlots {
|
|
125
|
+
/**
|
|
126
|
+
* 触发器插槽
|
|
127
|
+
*/
|
|
128
|
+
trigger?: () => any;
|
|
129
|
+
/**
|
|
130
|
+
* 菜单图标插槽(动态插槽名:menu-icon-{id})
|
|
131
|
+
* @param action 动作对象
|
|
132
|
+
* @param item 项目数据
|
|
133
|
+
*/
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
}
|
|
136
|
+
/** JCMoreMenu 暴露的方法和属性 */
|
|
137
|
+
export interface JCMoreMenuExpose {
|
|
138
|
+
}
|
|
139
|
+
/** JCMoreMenu 组件类型定义 */
|
|
140
|
+
export type JCMoreMenuComponent<T = any> = DefineComponent<JCMoreMenuProps<T>, JCMoreMenuExpose, {}, JCMoreMenuSlots, JCMoreMenuEmits<T>, {}, {}, {}>;
|
|
141
|
+
/** JCMoreMenu 实例类型 - 用于 ref 类型定义 */
|
|
142
|
+
export type JCMoreMenuInstance<T = any> = InstanceType<JCMoreMenuComponent<T>> & JCMoreMenuExpose;
|
|
143
|
+
/**
|
|
144
|
+
* 用于模板中的 Props 类型定义
|
|
145
|
+
*/
|
|
146
|
+
export interface JCMoreMenuTemplateProps<T = any> extends JCMoreMenuProps<T> {
|
|
147
|
+
}
|