rtcpts 0.0.37 → 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/LICENSE +22 -22
- package/README.md +91 -91
- package/dist/{charts-fA1hE3y8.js → charts-BVD7yH1K.js} +2 -2
- package/dist/{charts-DJRnfFOn.cjs → charts-DR-a8_4o.cjs} +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- 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 +1532 -1518
- package/package.json +87 -87
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
/** 对话框位置类型 */
|
|
3
|
+
export declare const DialogPosition: {
|
|
4
|
+
readonly STANDARD: "standard";
|
|
5
|
+
readonly RIGHT: "right";
|
|
6
|
+
readonly TOP: "top";
|
|
7
|
+
readonly BOTTOM: "bottom";
|
|
8
|
+
readonly LEFT: "left";
|
|
9
|
+
};
|
|
10
|
+
/** 对话框位置类型 */
|
|
11
|
+
export type DialogPositionType = (typeof DialogPosition)[keyof typeof DialogPosition];
|
|
12
|
+
/** JQDialog Props 接口 */
|
|
13
|
+
export interface JQDialogProps {
|
|
14
|
+
/**
|
|
15
|
+
* 是否允许点击外部区域
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
allowFocusOutside?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 是否显示底部
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showFooter?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 是否显示确认按钮
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
showConfirm?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 动态组件
|
|
31
|
+
*/
|
|
32
|
+
component?: any;
|
|
33
|
+
/**
|
|
34
|
+
* 内容组件
|
|
35
|
+
*/
|
|
36
|
+
content?: any;
|
|
37
|
+
/**
|
|
38
|
+
* 组件绑定属性
|
|
39
|
+
*/
|
|
40
|
+
componentBind?: Record<string, any>;
|
|
41
|
+
/**
|
|
42
|
+
* 组件事件监听
|
|
43
|
+
*/
|
|
44
|
+
componentOn?: Record<string, Function>;
|
|
45
|
+
/**
|
|
46
|
+
* 是否允许按 ESC 关闭
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
closeOnEsc?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 是否允许点击遮罩关闭
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
closeOnMask?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 对话框唯一标识
|
|
57
|
+
*/
|
|
58
|
+
dialogId?: string;
|
|
59
|
+
/**
|
|
60
|
+
* 对话框位置
|
|
61
|
+
* @default 'standard'
|
|
62
|
+
*/
|
|
63
|
+
position?: DialogPositionType;
|
|
64
|
+
/**
|
|
65
|
+
* 是否显示头部
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
68
|
+
showHeader?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* 对话框标题
|
|
71
|
+
*/
|
|
72
|
+
title?: string;
|
|
73
|
+
/**
|
|
74
|
+
* 最大宽度
|
|
75
|
+
*/
|
|
76
|
+
maxWidth?: string | number;
|
|
77
|
+
/**
|
|
78
|
+
* 最小高度
|
|
79
|
+
* @default 320
|
|
80
|
+
*/
|
|
81
|
+
minHeight?: string | number;
|
|
82
|
+
}
|
|
83
|
+
/** JQDialog Emits 接口 */
|
|
84
|
+
export interface JQDialogEmits {
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
}
|
|
87
|
+
/** JQDialog Slots 接口 */
|
|
88
|
+
export interface JQDialogSlots {
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
/** 标题插槽 */
|
|
91
|
+
title?: () => any;
|
|
92
|
+
/** 默认内容插槽 */
|
|
93
|
+
default?: () => any;
|
|
94
|
+
}
|
|
95
|
+
/** JQDialog 暴露的方法和属性 */
|
|
96
|
+
export interface JQDialogExpose {
|
|
97
|
+
/**
|
|
98
|
+
* 打开对话框
|
|
99
|
+
*/
|
|
100
|
+
open: () => void;
|
|
101
|
+
/**
|
|
102
|
+
* 关闭对话框
|
|
103
|
+
*/
|
|
104
|
+
close: () => void;
|
|
105
|
+
/**
|
|
106
|
+
* 设置加载状态
|
|
107
|
+
* @param data 是否加载中
|
|
108
|
+
*/
|
|
109
|
+
setLoading: (data: boolean) => void;
|
|
110
|
+
/**
|
|
111
|
+
* 设置确认按钮可见性
|
|
112
|
+
* @param data 是否可见
|
|
113
|
+
*/
|
|
114
|
+
setConfirmVisible: (data: boolean) => void;
|
|
115
|
+
/**
|
|
116
|
+
* 修改取消按钮文本
|
|
117
|
+
* @param text 按钮文本
|
|
118
|
+
*/
|
|
119
|
+
changeCancelText: (text: string) => void;
|
|
120
|
+
/**
|
|
121
|
+
* 修改确认按钮文本
|
|
122
|
+
* @param text 按钮文本
|
|
123
|
+
*/
|
|
124
|
+
changeConfirmText: (text: string) => void;
|
|
125
|
+
/**
|
|
126
|
+
* 表单验证规则
|
|
127
|
+
*/
|
|
128
|
+
rules: any;
|
|
129
|
+
}
|
|
130
|
+
/** JQDialog 组件类型定义 */
|
|
131
|
+
export type JQDialogComponent = DefineComponent<JQDialogProps, JQDialogExpose, {}, {}, {}, {}, SlotsType<JQDialogSlots>, {}>;
|
|
132
|
+
/** JQDialog 实例类型 - 用于 ref 类型定义 */
|
|
133
|
+
export type JQDialogInstance = InstanceType<JQDialogComponent> & JQDialogExpose;
|
|
134
|
+
/**
|
|
135
|
+
* 用于模板中的 Props 类型定义
|
|
136
|
+
*/
|
|
137
|
+
export interface JQDialogTemplateProps extends JQDialogProps {
|
|
138
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
import { QFieldProps } from 'quasar';
|
|
3
|
+
/** 文件模型值类型 */
|
|
4
|
+
export type FileModelValue = File[];
|
|
5
|
+
/** 文件变更处理函数返回类型 */
|
|
6
|
+
export type FileChangeFnReturn = File[] | void;
|
|
7
|
+
/** 文件变更处理函数类型 */
|
|
8
|
+
export type FileChangeFn = (files: File[]) => FileChangeFnReturn | Promise<FileChangeFnReturn>;
|
|
9
|
+
/** JQFile Props 接口 */
|
|
10
|
+
export interface JQFileProps {
|
|
11
|
+
/**
|
|
12
|
+
* 绑定值(文件列表)
|
|
13
|
+
*/
|
|
14
|
+
modelValue?: FileModelValue;
|
|
15
|
+
/**
|
|
16
|
+
* 接受的文件类型
|
|
17
|
+
*/
|
|
18
|
+
accept?: HTMLInputElement['accept'];
|
|
19
|
+
/**
|
|
20
|
+
* 文件处理前的钩子函数
|
|
21
|
+
*/
|
|
22
|
+
beforeHandle?: FileChangeFn;
|
|
23
|
+
/**
|
|
24
|
+
* 是否禁用
|
|
25
|
+
*/
|
|
26
|
+
disable?: QFieldProps['disable'];
|
|
27
|
+
/**
|
|
28
|
+
* 最大文件数量
|
|
29
|
+
*/
|
|
30
|
+
maxlength?: string | number;
|
|
31
|
+
/**
|
|
32
|
+
* 验证规则
|
|
33
|
+
*/
|
|
34
|
+
rules?: QFieldProps['rules'];
|
|
35
|
+
/**
|
|
36
|
+
* 最大文件大小
|
|
37
|
+
* @default '2 MB'
|
|
38
|
+
*/
|
|
39
|
+
maxFileSize?: string;
|
|
40
|
+
}
|
|
41
|
+
/** JQFile Emits 接口 */
|
|
42
|
+
export interface JQFileEmits {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
/**
|
|
45
|
+
* 更新 modelValue 事件
|
|
46
|
+
* @param value 文件列表
|
|
47
|
+
*/
|
|
48
|
+
(e: 'update:modelValue', value: FileModelValue): void;
|
|
49
|
+
}
|
|
50
|
+
/** JQFile Slots 接口 */
|
|
51
|
+
export interface JQFileSlots {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
/** 提示信息插槽 */
|
|
54
|
+
hint?: () => any;
|
|
55
|
+
}
|
|
56
|
+
/** JQFile 暴露的方法和属性 */
|
|
57
|
+
export interface JQFileExpose {
|
|
58
|
+
}
|
|
59
|
+
/** JQFile 组件类型定义 */
|
|
60
|
+
export type JQFileComponent = DefineComponent<JQFileProps, JQFileExpose, {}, {}, {}, {}, SlotsType<JQFileSlots>, {
|
|
61
|
+
'update:modelValue': (value: FileModelValue) => true;
|
|
62
|
+
}>;
|
|
63
|
+
/** JQFile 实例类型 - 用于 ref 类型定义 */
|
|
64
|
+
export type JQFileInstance = InstanceType<JQFileComponent> & JQFileExpose;
|
|
65
|
+
/**
|
|
66
|
+
* 用于模板中的 Props 类型定义
|
|
67
|
+
* 包含事件处理器
|
|
68
|
+
*/
|
|
69
|
+
export interface JQFileTemplateProps extends JQFileProps {
|
|
70
|
+
/** 更新 modelValue 事件处理器 */
|
|
71
|
+
'onUpdate:modelValue'?: (value: FileModelValue) => void;
|
|
72
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
+
/** Vue 类类型 */
|
|
3
|
+
export type VueClass = string | Record<string, boolean> | (string | Record<string, boolean>)[];
|
|
4
|
+
/** JQFormLabel Props 接口 */
|
|
5
|
+
export interface JQFormLabelProps {
|
|
6
|
+
/**
|
|
7
|
+
* 标签文本
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 标签样式类
|
|
12
|
+
*/
|
|
13
|
+
labelClass?: VueClass;
|
|
14
|
+
/**
|
|
15
|
+
* 值样式类
|
|
16
|
+
*/
|
|
17
|
+
valueClass?: VueClass;
|
|
18
|
+
/**
|
|
19
|
+
* 是否垂直布局
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
vertical?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 是否水平布局
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
horizontal?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 是否必填
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
required?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 提示信息
|
|
35
|
+
* @default ''
|
|
36
|
+
*/
|
|
37
|
+
tip?: string;
|
|
38
|
+
}
|
|
39
|
+
/** JQFormLabel Emits 接口 */
|
|
40
|
+
export interface JQFormLabelEmits {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}
|
|
43
|
+
/** JQFormLabel Slots 接口 */
|
|
44
|
+
export interface JQFormLabelSlots {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
/** 默认内容插槽 */
|
|
47
|
+
default?: () => any;
|
|
48
|
+
/** 标签提示插槽 */
|
|
49
|
+
'label-hint'?: () => any;
|
|
50
|
+
/** 表单项详情插槽 */
|
|
51
|
+
'form-item-detail'?: () => any;
|
|
52
|
+
/** 标签插槽 */
|
|
53
|
+
label?: () => any;
|
|
54
|
+
}
|
|
55
|
+
/** JQFormLabel 暴露的方法和属性 */
|
|
56
|
+
export interface JQFormLabelExpose {
|
|
57
|
+
}
|
|
58
|
+
/** JQFormLabel 组件类型定义 */
|
|
59
|
+
export type JQFormLabelComponent = DefineComponent<JQFormLabelProps, JQFormLabelExpose, {}, {}, {}, {}, SlotsType<JQFormLabelSlots>, {}>;
|
|
60
|
+
/** JQFormLabel 实例类型 - 用于 ref 类型定义 */
|
|
61
|
+
export type JQFormLabelInstance = InstanceType<JQFormLabelComponent> & JQFormLabelExpose;
|
|
62
|
+
/**
|
|
63
|
+
* 用于模板中的 Props 类型定义
|
|
64
|
+
*/
|
|
65
|
+
export interface JQFormLabelTemplateProps extends JQFormLabelProps {
|
|
66
|
+
}
|