uview-unix-types.uts
825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* uview-unix 组件类型定义
*
* 由于 uview-unix 模块的 index.uts 是二进制文件,无法直接导入类型
* 因此在本地定义常用的类型以避免编译错误
*/
// Picker 相关类型
export type UnPickerColumnItem = {
text: string;
value?: any;
disabled?: boolean;
children?: UnPickerColumn;
};
export type UnPickerColumn = UnPickerColumnItem[];
export type UnPickerConfirmEvent = {
value: UnPickerColumnItem[];
values: UnPickerColumn[];
indexs: number[];
};
// Tab 相关类型
export type UnTabItem = {
name: string;
title?: string; // ✅ 改为可选,有些场景只需要 name
disabled?: boolean;
count?: number;
icon?: string;
dot?: boolean;
};
// Swiper 相关类型
export type UnSwiperItem = {
image?: string;
title?: string;
desc?: string;
url?: string;
};