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,85 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
import { QInputProps } from 'quasar';
|
|
3
|
+
/** 历史记录项类型 */
|
|
4
|
+
export interface HistoryItem {
|
|
5
|
+
id: number;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/** JQAutocomplete Props 接口 */
|
|
9
|
+
export interface JQAutocompleteProps {
|
|
10
|
+
/**
|
|
11
|
+
* 是否显示删除按钮
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
deletable?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 标签文本
|
|
17
|
+
* @default ''
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 最大历史记录数量
|
|
22
|
+
* @default 5
|
|
23
|
+
*/
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
/**
|
|
26
|
+
* 绑定值
|
|
27
|
+
*/
|
|
28
|
+
modelValue: string | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* 搜索历史记录的唯一标识键
|
|
31
|
+
*/
|
|
32
|
+
searchKey: string;
|
|
33
|
+
/**
|
|
34
|
+
* 是否禁用 tooltip
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
tooltipDisabled?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** JQAutocomplete Emits 接口 */
|
|
40
|
+
export interface JQAutocompleteEmits {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
/**
|
|
43
|
+
* 更新 modelValue 事件
|
|
44
|
+
* @param value 新值
|
|
45
|
+
*/
|
|
46
|
+
(e: 'update:model-value', value: string): void;
|
|
47
|
+
}
|
|
48
|
+
/** JQAutocomplete Slots 接口 */
|
|
49
|
+
export interface JQAutocompleteSlots {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
/** 默认插槽(暂无内容) */
|
|
52
|
+
default?: () => any;
|
|
53
|
+
}
|
|
54
|
+
/** JQAutocomplete 暴露的方法和属性 */
|
|
55
|
+
export interface JQAutocompleteExpose {
|
|
56
|
+
/**
|
|
57
|
+
* 保存搜索历史记录
|
|
58
|
+
* @param value 要保存的值
|
|
59
|
+
*/
|
|
60
|
+
saveHistory: (value: string) => void;
|
|
61
|
+
}
|
|
62
|
+
/** 合并后的完整 Props 类型 (包含 QInput 的 Props) */
|
|
63
|
+
export type JQAutocompleteAllProps = JQAutocompleteProps & Omit<QInputProps, keyof JQAutocompleteProps>;
|
|
64
|
+
/** Emits 配置对象格式 (用于 DefineComponent) */
|
|
65
|
+
export type JQAutocompleteEmitsOptions = {
|
|
66
|
+
'update:model-value': (value: string) => true;
|
|
67
|
+
};
|
|
68
|
+
/** JQAutocomplete 组件类型定义 */
|
|
69
|
+
export type JQAutocompleteComponent = DefineComponent<JQAutocompleteAllProps, JQAutocompleteExpose, {}, {}, {}, {}, {}, JQAutocompleteEmitsOptions>;
|
|
70
|
+
/** JQAutocomplete 实例类型 - 用于 ref 类型定义 */
|
|
71
|
+
export type JQAutocompleteInstance = InstanceType<JQAutocompleteComponent> & JQAutocompleteExpose;
|
|
72
|
+
/**
|
|
73
|
+
* 用于模板中的 Props 类型定义
|
|
74
|
+
* 包含事件处理器
|
|
75
|
+
*/
|
|
76
|
+
export interface JQAutocompleteTemplateProps extends JQAutocompleteProps {
|
|
77
|
+
/** 更新 modelValue 事件处理器 */
|
|
78
|
+
'onUpdate:modelValue'?: (value: string) => void;
|
|
79
|
+
/** 聚焦事件处理器 */
|
|
80
|
+
onFocus?: () => void;
|
|
81
|
+
/** 失焦事件处理器 */
|
|
82
|
+
onBlur?: () => void;
|
|
83
|
+
/** 清除事件处理器 */
|
|
84
|
+
onClear?: () => void;
|
|
85
|
+
}
|
|
@@ -59,6 +59,7 @@ export interface JQButtonProps {
|
|
|
59
59
|
}
|
|
60
60
|
/** JQButton Emits 接口 */
|
|
61
61
|
export interface JQButtonEmits {
|
|
62
|
+
[key: string]: any;
|
|
62
63
|
/**
|
|
63
64
|
* 点击事件
|
|
64
65
|
* @param e 原生点击事件
|
|
@@ -67,6 +68,7 @@ export interface JQButtonEmits {
|
|
|
67
68
|
}
|
|
68
69
|
/** JQButton Slots 接口 */
|
|
69
70
|
export interface JQButtonSlots {
|
|
71
|
+
[key: string]: any;
|
|
70
72
|
/** 默认插槽,用于自定义按钮内容 */
|
|
71
73
|
default?: () => any;
|
|
72
74
|
/** 图标插槽,用于自定义前置图标 */
|
|
@@ -93,6 +93,7 @@ export interface JQButtonDropdownProps {
|
|
|
93
93
|
}
|
|
94
94
|
/** JQButtonDropdown Emits 接口 */
|
|
95
95
|
export interface JQButtonDropdownEmits {
|
|
96
|
+
[key: string]: any;
|
|
96
97
|
/**
|
|
97
98
|
* 选择菜单项事件
|
|
98
99
|
* @param item 选中的菜单项
|
|
@@ -101,6 +102,7 @@ export interface JQButtonDropdownEmits {
|
|
|
101
102
|
}
|
|
102
103
|
/** JQButtonDropdown Slots 接口 */
|
|
103
104
|
export interface JQButtonDropdownSlots {
|
|
105
|
+
[key: string]: any;
|
|
104
106
|
/** 默认插槽,用于自定义下拉菜单内容 */
|
|
105
107
|
default?: () => any;
|
|
106
108
|
/** 标签插槽,用于自定义按钮标签 */
|
|
@@ -19,6 +19,7 @@ export interface JQConfirmProps {
|
|
|
19
19
|
}
|
|
20
20
|
/** JQConfirm Emits 接口 */
|
|
21
21
|
export interface JQConfirmEmits {
|
|
22
|
+
[key: string]: any;
|
|
22
23
|
/**
|
|
23
24
|
* 确认事件
|
|
24
25
|
* @description 用户点击确认按钮时触发
|
|
@@ -27,6 +28,7 @@ export interface JQConfirmEmits {
|
|
|
27
28
|
}
|
|
28
29
|
/** JQConfirm Slots 接口 */
|
|
29
30
|
export interface JQConfirmSlots {
|
|
31
|
+
[key: string]: any;
|
|
30
32
|
/** 默认插槽,用于放置触发弹窗的元素 */
|
|
31
33
|
default?: () => any;
|
|
32
34
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { CSSProperties, DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
import { QDateProps, QFieldProps } from 'quasar';
|
|
3
|
+
/** 日期模型值类型 */
|
|
4
|
+
export type DateModelValue = QDateProps['modelValue'] | number | Date | {
|
|
5
|
+
from: number | string | Date;
|
|
6
|
+
to: number | string | Date;
|
|
7
|
+
};
|
|
8
|
+
/** 日期显示值函数类型 */
|
|
9
|
+
export type DateValueDisplayFn = (value: DateModelValue) => string | number | null | undefined;
|
|
10
|
+
/** JQDate Props 接口 */
|
|
11
|
+
export interface JQDateProps {
|
|
12
|
+
/**
|
|
13
|
+
* 绑定值
|
|
14
|
+
*/
|
|
15
|
+
modelValue?: DateModelValue;
|
|
16
|
+
/**
|
|
17
|
+
* 是否可清空
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
clearable?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 是否紧凑模式
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
dense?: QFieldProps['dense'];
|
|
26
|
+
/**
|
|
27
|
+
* 是否禁用
|
|
28
|
+
*/
|
|
29
|
+
disable?: QFieldProps['disable'];
|
|
30
|
+
/**
|
|
31
|
+
* 是否只读
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
readonly?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 标签文本
|
|
37
|
+
*/
|
|
38
|
+
label?: QFieldProps['label'];
|
|
39
|
+
/**
|
|
40
|
+
* 国际化语言环境
|
|
41
|
+
*/
|
|
42
|
+
locales?: Intl.LocalesArgument;
|
|
43
|
+
/**
|
|
44
|
+
* 日期格式掩码
|
|
45
|
+
* @default 'YYYY-MM-DD'
|
|
46
|
+
*/
|
|
47
|
+
mask?: QDateProps['mask'];
|
|
48
|
+
/**
|
|
49
|
+
* 日期选项限制
|
|
50
|
+
*/
|
|
51
|
+
options?: QDateProps['options'];
|
|
52
|
+
/**
|
|
53
|
+
* 是否显示边框
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
outlined?: QFieldProps['outlined'];
|
|
57
|
+
/**
|
|
58
|
+
* 弹窗内容样式
|
|
59
|
+
*/
|
|
60
|
+
popupInnerStyle?: CSSProperties;
|
|
61
|
+
/**
|
|
62
|
+
* 是否范围选择
|
|
63
|
+
*/
|
|
64
|
+
range?: QDateProps['range'];
|
|
65
|
+
/**
|
|
66
|
+
* 验证规则
|
|
67
|
+
*/
|
|
68
|
+
rules?: QFieldProps['rules'];
|
|
69
|
+
/**
|
|
70
|
+
* 自定义显示值函数
|
|
71
|
+
*/
|
|
72
|
+
valueDisplayFn?: DateValueDisplayFn;
|
|
73
|
+
}
|
|
74
|
+
/** JQDate Emits 接口 */
|
|
75
|
+
export interface JQDateEmits {
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
/**
|
|
78
|
+
* 弹窗隐藏事件
|
|
79
|
+
* @param evt 事件对象
|
|
80
|
+
*/
|
|
81
|
+
(e: 'hide', evt: any): void;
|
|
82
|
+
/**
|
|
83
|
+
* 范围选择开始事件
|
|
84
|
+
* @param from 开始日期
|
|
85
|
+
*/
|
|
86
|
+
(e: 'rangeStart', from: any): void;
|
|
87
|
+
/**
|
|
88
|
+
* 范围选择结束事件
|
|
89
|
+
* @param range 范围对象
|
|
90
|
+
*/
|
|
91
|
+
(e: 'rangeEnd', range: any): void;
|
|
92
|
+
/**
|
|
93
|
+
* 更新 modelValue 事件
|
|
94
|
+
* @param value 新值
|
|
95
|
+
*/
|
|
96
|
+
(e: 'update:modelValue', value: any): void;
|
|
97
|
+
}
|
|
98
|
+
/** JQDate Slots 接口 */
|
|
99
|
+
export interface JQDateSlots {
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
/** 弹窗前置内容插槽 */
|
|
102
|
+
'popup-prepend'?: () => any;
|
|
103
|
+
/** 后置内容插槽 */
|
|
104
|
+
append?: () => any;
|
|
105
|
+
/** 控制内容插槽 */
|
|
106
|
+
control?: () => any;
|
|
107
|
+
}
|
|
108
|
+
/** JQDate 暴露的方法和属性 */
|
|
109
|
+
export interface JQDateExpose {
|
|
110
|
+
/**
|
|
111
|
+
* 关闭弹窗
|
|
112
|
+
*/
|
|
113
|
+
closePopup: () => void;
|
|
114
|
+
/**
|
|
115
|
+
* 弹窗可见性状态
|
|
116
|
+
*/
|
|
117
|
+
popupVisible: {
|
|
118
|
+
value: boolean;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/** JQDate Emits 配置对象格式 (用于 DefineComponent) */
|
|
122
|
+
export type JQDateEmitsOptions = {
|
|
123
|
+
hide: (evt: any) => true;
|
|
124
|
+
rangeStart: (from: any) => true;
|
|
125
|
+
rangeEnd: (range: any) => true;
|
|
126
|
+
'update:modelValue': (value: any) => true;
|
|
127
|
+
};
|
|
128
|
+
/** JQDate 组件类型定义 */
|
|
129
|
+
export type JQDateComponent = DefineComponent<JQDateProps, JQDateExpose, {}, {}, {}, {}, SlotsType<JQDateSlots>, JQDateEmitsOptions>;
|
|
130
|
+
/** JQDate 实例类型 - 用于 ref 类型定义 */
|
|
131
|
+
export type JQDateInstance = InstanceType<JQDateComponent> & JQDateExpose;
|
|
132
|
+
/**
|
|
133
|
+
* 用于模板中的 Props 类型定义
|
|
134
|
+
* 包含事件处理器
|
|
135
|
+
*/
|
|
136
|
+
export interface JQDateTemplateProps extends JQDateProps {
|
|
137
|
+
/** 弹窗隐藏事件处理器 */
|
|
138
|
+
onHide?: (evt: any) => void;
|
|
139
|
+
/** 范围选择开始事件处理器 */
|
|
140
|
+
onRangeStart?: (from: any) => void;
|
|
141
|
+
/** 范围选择结束事件处理器 */
|
|
142
|
+
onRangeEnd?: (range: any) => void;
|
|
143
|
+
/** 更新 modelValue 事件处理器 */
|
|
144
|
+
'onUpdate:modelValue'?: (value: any) => void;
|
|
145
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
import { QFieldProps } from 'quasar';
|
|
3
|
+
/** 月份模型值类型 */
|
|
4
|
+
export type MonthModelValue = any;
|
|
5
|
+
/** 月份语言环境类型 */
|
|
6
|
+
export type MonthLocale = string | string[];
|
|
7
|
+
/** 月份显示值函数类型 */
|
|
8
|
+
export type MonthValueDisplayFn = (value: MonthModelValue) => any;
|
|
9
|
+
/** 月份选项禁用函数类型 */
|
|
10
|
+
export type MonthOptionDisabledFn = (optionValue: number, options: {
|
|
11
|
+
rangeStartValue?: number;
|
|
12
|
+
}) => boolean;
|
|
13
|
+
/** JQDateMonth Props 接口 */
|
|
14
|
+
export interface JQDateMonthProps {
|
|
15
|
+
/**
|
|
16
|
+
* 绑定值
|
|
17
|
+
*/
|
|
18
|
+
modelValue?: MonthModelValue;
|
|
19
|
+
/**
|
|
20
|
+
* 是否可清空
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 是否紧凑模式
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
dense?: QFieldProps['dense'];
|
|
29
|
+
/**
|
|
30
|
+
* 是否禁用
|
|
31
|
+
*/
|
|
32
|
+
disable?: QFieldProps['disable'];
|
|
33
|
+
/**
|
|
34
|
+
* 标签文本
|
|
35
|
+
*/
|
|
36
|
+
label?: QFieldProps['label'];
|
|
37
|
+
/**
|
|
38
|
+
* 国际化语言环境
|
|
39
|
+
*/
|
|
40
|
+
locale?: MonthLocale;
|
|
41
|
+
/**
|
|
42
|
+
* 选项禁用判断函数
|
|
43
|
+
*/
|
|
44
|
+
optionDisabledFn?: MonthOptionDisabledFn;
|
|
45
|
+
/**
|
|
46
|
+
* 是否显示边框
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
outlined?: QFieldProps['outlined'];
|
|
50
|
+
/**
|
|
51
|
+
* 是否范围选择
|
|
52
|
+
*/
|
|
53
|
+
range?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 验证规则
|
|
56
|
+
*/
|
|
57
|
+
rules?: QFieldProps['rules'];
|
|
58
|
+
/**
|
|
59
|
+
* 自定义显示值函数
|
|
60
|
+
*/
|
|
61
|
+
valueDisplayFn?: MonthValueDisplayFn;
|
|
62
|
+
}
|
|
63
|
+
/** JQDateMonth Emits 接口 */
|
|
64
|
+
export interface JQDateMonthEmits {
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
/**
|
|
67
|
+
* 更新 modelValue 事件
|
|
68
|
+
* @param value 新值
|
|
69
|
+
*/
|
|
70
|
+
(e: 'update:modelValue', value: MonthModelValue): void;
|
|
71
|
+
}
|
|
72
|
+
/** JQDateMonth Slots 接口 */
|
|
73
|
+
export interface JQDateMonthSlots {
|
|
74
|
+
[key: string]: any;
|
|
75
|
+
/** 值显示插槽 */
|
|
76
|
+
'value-display'?: () => any;
|
|
77
|
+
}
|
|
78
|
+
/** JQDateMonth 暴露的方法和属性 */
|
|
79
|
+
export interface JQDateMonthExpose {
|
|
80
|
+
}
|
|
81
|
+
/** JQDateMonth 组件类型定义 */
|
|
82
|
+
export type JQDateMonthComponent = DefineComponent<JQDateMonthProps, JQDateMonthExpose, {}, {}, {}, {}, SlotsType<JQDateMonthSlots>, {
|
|
83
|
+
'update:modelValue': (value: MonthModelValue) => true;
|
|
84
|
+
}>;
|
|
85
|
+
/** JQDateMonth 实例类型 - 用于 ref 类型定义 */
|
|
86
|
+
export type JQDateMonthInstance = InstanceType<JQDateMonthComponent> & JQDateMonthExpose;
|
|
87
|
+
/**
|
|
88
|
+
* 用于模板中的 Props 类型定义
|
|
89
|
+
* 包含事件处理器
|
|
90
|
+
*/
|
|
91
|
+
export interface JQDateMonthTemplateProps extends JQDateMonthProps {
|
|
92
|
+
/** 更新 modelValue 事件处理器 */
|
|
93
|
+
'onUpdate:modelValue'?: (value: MonthModelValue) => void;
|
|
94
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
import { QFieldProps } from 'quasar';
|
|
3
|
+
/** 年份模型值类型 */
|
|
4
|
+
export type YearModelValue = any;
|
|
5
|
+
/** 年份显示值函数类型 */
|
|
6
|
+
export type YearValueDisplayFn = (value: YearModelValue) => any;
|
|
7
|
+
/** JQDateYear Props 接口 */
|
|
8
|
+
export interface JQDateYearProps {
|
|
9
|
+
/**
|
|
10
|
+
* 绑定值
|
|
11
|
+
*/
|
|
12
|
+
modelValue?: YearModelValue;
|
|
13
|
+
/**
|
|
14
|
+
* 是否可清空
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
clearable?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 是否紧凑模式
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
dense?: QFieldProps['dense'];
|
|
23
|
+
/**
|
|
24
|
+
* 是否禁用
|
|
25
|
+
*/
|
|
26
|
+
disable?: QFieldProps['disable'];
|
|
27
|
+
/**
|
|
28
|
+
* 标签文本
|
|
29
|
+
*/
|
|
30
|
+
label?: QFieldProps['label'];
|
|
31
|
+
/**
|
|
32
|
+
* 是否显示边框
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
outlined?: QFieldProps['outlined'];
|
|
36
|
+
/**
|
|
37
|
+
* 验证规则
|
|
38
|
+
*/
|
|
39
|
+
rules?: QFieldProps['rules'];
|
|
40
|
+
/**
|
|
41
|
+
* 自定义显示值函数
|
|
42
|
+
*/
|
|
43
|
+
valueDisplayFn?: YearValueDisplayFn;
|
|
44
|
+
}
|
|
45
|
+
/** JQDateYear Emits 接口 */
|
|
46
|
+
export interface JQDateYearEmits {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
/**
|
|
49
|
+
* 更新 modelValue 事件
|
|
50
|
+
* @param value 新值
|
|
51
|
+
*/
|
|
52
|
+
(e: 'update:modelValue', value: YearModelValue): void;
|
|
53
|
+
}
|
|
54
|
+
/** JQDateYear Slots 接口 */
|
|
55
|
+
export interface JQDateYearSlots {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
/** 值显示插槽 */
|
|
58
|
+
'value-display'?: () => any;
|
|
59
|
+
}
|
|
60
|
+
/** JQDateYear 暴露的方法和属性 */
|
|
61
|
+
export interface JQDateYearExpose {
|
|
62
|
+
}
|
|
63
|
+
/** JQDateYear 组件类型定义 */
|
|
64
|
+
export type JQDateYearComponent = DefineComponent<JQDateYearProps, JQDateYearExpose, {}, {}, {}, {}, SlotsType<JQDateYearSlots>, {
|
|
65
|
+
'update:modelValue': (value: YearModelValue) => true;
|
|
66
|
+
}>;
|
|
67
|
+
/** JQDateYear 实例类型 - 用于 ref 类型定义 */
|
|
68
|
+
export type JQDateYearInstance = InstanceType<JQDateYearComponent> & JQDateYearExpose;
|
|
69
|
+
/**
|
|
70
|
+
* 用于模板中的 Props 类型定义
|
|
71
|
+
* 包含事件处理器
|
|
72
|
+
*/
|
|
73
|
+
export interface JQDateYearTemplateProps extends JQDateYearProps {
|
|
74
|
+
/** 更新 modelValue 事件处理器 */
|
|
75
|
+
'onUpdate:modelValue'?: (value: YearModelValue) => void;
|
|
76
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
import { QDateProps, QFieldProps } from 'quasar';
|
|
3
|
+
/** 日期时间掩码 */
|
|
4
|
+
export declare const DATETIME_MASK: "YYYY-MM-DD HH:mm:ss";
|
|
5
|
+
/** 时间部分类型 */
|
|
6
|
+
export interface TimeParts {
|
|
7
|
+
/** 小时 */
|
|
8
|
+
h: number;
|
|
9
|
+
/** 分钟 */
|
|
10
|
+
m: number;
|
|
11
|
+
/** 秒 */
|
|
12
|
+
s: number;
|
|
13
|
+
}
|
|
14
|
+
/** 日期时间范围值类型 */
|
|
15
|
+
export interface DateTimeRangeValue {
|
|
16
|
+
from: string | null;
|
|
17
|
+
to: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** 单个日期时间值类型 */
|
|
20
|
+
export type SingleDateTimeValue = string | null;
|
|
21
|
+
/** QDate 范围值类型 */
|
|
22
|
+
export interface QDateRangeValue {
|
|
23
|
+
from: string;
|
|
24
|
+
to: string;
|
|
25
|
+
}
|
|
26
|
+
/** 日期时间模型值类型 */
|
|
27
|
+
export type DateTimeModelValue = DateTimeRangeValue | SingleDateTimeValue | number | Date;
|
|
28
|
+
/** 日期时间显示值函数类型 */
|
|
29
|
+
export type DateTimeValueDisplayFn = (value: DateTimeModelValue) => string | number | null | undefined;
|
|
30
|
+
/** JQDateTime Props 接口 */
|
|
31
|
+
export interface JQDateTimeProps {
|
|
32
|
+
/**
|
|
33
|
+
* 绑定值
|
|
34
|
+
* @default null
|
|
35
|
+
*/
|
|
36
|
+
modelValue?: DateTimeModelValue;
|
|
37
|
+
/**
|
|
38
|
+
* 是否可清空
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
clearable?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 是否紧凑模式
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
dense?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 是否禁用
|
|
49
|
+
*/
|
|
50
|
+
disable?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 是否只读
|
|
53
|
+
*/
|
|
54
|
+
readonly?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 标签文本
|
|
57
|
+
*/
|
|
58
|
+
label?: string;
|
|
59
|
+
/**
|
|
60
|
+
* 日期选项限制
|
|
61
|
+
*/
|
|
62
|
+
options?: QDateProps['options'];
|
|
63
|
+
/**
|
|
64
|
+
* 是否显示边框
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
outlined?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 验证规则
|
|
70
|
+
*/
|
|
71
|
+
rules?: QFieldProps['rules'];
|
|
72
|
+
/**
|
|
73
|
+
* 自定义显示值函数
|
|
74
|
+
*/
|
|
75
|
+
valueDisplayFn?: DateTimeValueDisplayFn;
|
|
76
|
+
/**
|
|
77
|
+
* 是否范围选择
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
range?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* 结束时间的时分秒
|
|
83
|
+
* @default ['00', '00', '00']
|
|
84
|
+
*/
|
|
85
|
+
endhhmmss?: [string, string, string];
|
|
86
|
+
/**
|
|
87
|
+
* 是否显示滚动提示
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
showTooltip?: boolean;
|
|
91
|
+
}
|
|
92
|
+
/** JQDateTime Emits 接口 */
|
|
93
|
+
export interface JQDateTimeEmits {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
/**
|
|
96
|
+
* 弹窗隐藏事件
|
|
97
|
+
* @param evt 事件对象
|
|
98
|
+
*/
|
|
99
|
+
(e: 'hide', evt: any): void;
|
|
100
|
+
/**
|
|
101
|
+
* 更新 modelValue 事件
|
|
102
|
+
* @param value 新值
|
|
103
|
+
*/
|
|
104
|
+
(e: 'update:modelValue', value: DateTimeModelValue): void;
|
|
105
|
+
}
|
|
106
|
+
/** JQDateTime Slots 接口 */
|
|
107
|
+
export interface JQDateTimeSlots {
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
/** 弹窗前置内容插槽 */
|
|
110
|
+
'popup-prepend'?: () => any;
|
|
111
|
+
/** 后置内容插槽 */
|
|
112
|
+
append?: () => any;
|
|
113
|
+
/** 控制内容插槽 */
|
|
114
|
+
control?: () => any;
|
|
115
|
+
}
|
|
116
|
+
/** JQDateTime 暴露的方法和属性 */
|
|
117
|
+
export interface JQDateTimeExpose {
|
|
118
|
+
/**
|
|
119
|
+
* 关闭弹窗
|
|
120
|
+
*/
|
|
121
|
+
closePopup: () => void;
|
|
122
|
+
/**
|
|
123
|
+
* 弹窗可见性状态
|
|
124
|
+
*/
|
|
125
|
+
popupVisible: {
|
|
126
|
+
value: boolean;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/** JQDateTime 组件类型定义 */
|
|
130
|
+
export type JQDateTimeComponent = DefineComponent<JQDateTimeProps, JQDateTimeExpose, {}, {}, {}, {}, SlotsType<JQDateTimeSlots>, {
|
|
131
|
+
hide: (evt: any) => true;
|
|
132
|
+
'update:modelValue': (value: DateTimeModelValue) => true;
|
|
133
|
+
}>;
|
|
134
|
+
/** JQDateTime 实例类型 - 用于 ref 类型定义 */
|
|
135
|
+
export type JQDateTimeInstance = InstanceType<JQDateTimeComponent> & JQDateTimeExpose;
|
|
136
|
+
/**
|
|
137
|
+
* 用于模板中的 Props 类型定义
|
|
138
|
+
* 包含事件处理器
|
|
139
|
+
*/
|
|
140
|
+
export interface JQDateTimeTemplateProps extends JQDateTimeProps {
|
|
141
|
+
/** 弹窗隐藏事件处理器 */
|
|
142
|
+
onHide?: (evt: any) => void;
|
|
143
|
+
/** 更新 modelValue 事件处理器 */
|
|
144
|
+
'onUpdate:modelValue'?: (value: DateTimeModelValue) => void;
|
|
145
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
/** 详情列表数据类型 */
|
|
3
|
+
export type DetailData = Record<string, any>;
|
|
4
|
+
/** 详情项配置接口 */
|
|
5
|
+
export interface DetailItem {
|
|
6
|
+
/** 字段名称 */
|
|
7
|
+
name: string;
|
|
8
|
+
/** 标签文本 */
|
|
9
|
+
label: string;
|
|
10
|
+
/** 列跨度 (1-12) */
|
|
11
|
+
span?: number;
|
|
12
|
+
/** 对齐方式 */
|
|
13
|
+
align?: 'left' | 'right' | 'center';
|
|
14
|
+
/** 是否为日期类型,可传入格式字符串 */
|
|
15
|
+
date?: boolean | string;
|
|
16
|
+
/** 选项列表 */
|
|
17
|
+
options?: Record<string, any>[];
|
|
18
|
+
/** 查找键名 */
|
|
19
|
+
findByKey?: string;
|
|
20
|
+
/** 显示键名 */
|
|
21
|
+
displayKey?: string;
|
|
22
|
+
/** 提示信息 */
|
|
23
|
+
tip?: string;
|
|
24
|
+
/** 最大行数,超过后显示省略号 */
|
|
25
|
+
whiteSpace?: number;
|
|
26
|
+
/** 点击监听函数 */
|
|
27
|
+
onClick?: (value: string) => void;
|
|
28
|
+
/** 是否可点击 */
|
|
29
|
+
clickable?: boolean | ((row: DetailData) => boolean);
|
|
30
|
+
/** 格式化函数 */
|
|
31
|
+
format?: (value: any, row: DetailData) => any;
|
|
32
|
+
/** 是否可见 */
|
|
33
|
+
visible?: boolean | ((row: DetailData) => boolean);
|
|
34
|
+
/** 是否支持 HTML 渲染 */
|
|
35
|
+
html?: boolean;
|
|
36
|
+
/** 是否显示复制按钮 */
|
|
37
|
+
copy?: boolean;
|
|
38
|
+
/** 是否显示详情按钮 */
|
|
39
|
+
detail?: boolean;
|
|
40
|
+
/** 详情按钮点击回调 */
|
|
41
|
+
onDetailClick?: (value: string, row: DetailData) => void;
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}
|
|
44
|
+
/** JQDetailList Props 接口 */
|
|
45
|
+
export interface JQDetailListProps {
|
|
46
|
+
/**
|
|
47
|
+
* 详情项配置数组
|
|
48
|
+
*/
|
|
49
|
+
items: DetailItem[];
|
|
50
|
+
/**
|
|
51
|
+
* 数据对象
|
|
52
|
+
*/
|
|
53
|
+
data: DetailData;
|
|
54
|
+
/**
|
|
55
|
+
* 间距样式类
|
|
56
|
+
* @default 'q-col-gutter-md'
|
|
57
|
+
*/
|
|
58
|
+
gutter?: string;
|
|
59
|
+
/**
|
|
60
|
+
* 布局方式
|
|
61
|
+
* @default 'vertical'
|
|
62
|
+
*/
|
|
63
|
+
layout?: 'vertical' | 'horizontal-between' | 'horizontal-left';
|
|
64
|
+
/**
|
|
65
|
+
* 标签宽度(仅在 horizontal-left 布局下有效)
|
|
66
|
+
* @default '100px'
|
|
67
|
+
*/
|
|
68
|
+
labelWidth?: string;
|
|
69
|
+
}
|
|
70
|
+
/** JQDetailList Emits 接口 */
|
|
71
|
+
export interface JQDetailListEmits {
|
|
72
|
+
}
|
|
73
|
+
/** JQDetailList Slots 接口 */
|
|
74
|
+
export interface JQDetailListSlots {
|
|
75
|
+
/** 动态字段值插槽 */
|
|
76
|
+
[key: `item-value-${string}`]: (props: {
|
|
77
|
+
value: any;
|
|
78
|
+
item: DetailItem;
|
|
79
|
+
data: DetailData;
|
|
80
|
+
fieldName: string;
|
|
81
|
+
}) => any;
|
|
82
|
+
/** 动态字段后缀插槽 */
|
|
83
|
+
[key: `item-suffix-${string}`]: (props: {
|
|
84
|
+
value: any;
|
|
85
|
+
item: DetailItem;
|
|
86
|
+
data: DetailData;
|
|
87
|
+
fieldName: string;
|
|
88
|
+
}) => any;
|
|
89
|
+
}
|
|
90
|
+
/** JQDetailList 暴露的方法和属性 */
|
|
91
|
+
export interface JQDetailListExpose {
|
|
92
|
+
}
|
|
93
|
+
/** JQDetailList 组件类型定义 */
|
|
94
|
+
export type JQDetailListComponent = DefineComponent<JQDetailListProps, JQDetailListExpose, {}, {}, {}, {}, SlotsType<JQDetailListSlots>, {}>;
|
|
95
|
+
/** JQDetailList 实例类型 - 用于 ref 类型定义 */
|
|
96
|
+
export type JQDetailListInstance = InstanceType<JQDetailListComponent> & JQDetailListExpose;
|
|
97
|
+
/**
|
|
98
|
+
* 用于模板中的 Props 类型定义
|
|
99
|
+
*/
|
|
100
|
+
export interface JQDetailListTemplateProps extends JQDetailListProps {
|
|
101
|
+
}
|