forked from Tencent/tdesign-mobile-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprops.ts
86 lines (83 loc) · 2.37 KB
/
props.ts
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* eslint-disable */
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
import { TdTabsProps } from './type';
import { PropType } from 'vue';
export default {
/** 动画效果设置。其中 duration 表示动画时长 */
animation: {
type: Object as PropType<TdTabsProps['animation']>,
},
/** 选项卡列表 */
list: {
type: Array as PropType<TdTabsProps['list']>,
},
/** 已废弃。选项卡位置 */
placement: {
type: String as PropType<TdTabsProps['placement']>,
default: 'top' as TdTabsProps['placement'],
validator(val: TdTabsProps['placement']): boolean {
if (!val) return true;
return ['left', 'top'].includes(val);
},
},
/** 是否展示底部激活线条 */
showBottomLine: {
type: Boolean,
default: true,
},
/** 组件尺寸 */
size: {
type: String as PropType<TdTabsProps['size']>,
default: 'medium' as TdTabsProps['size'],
validator(val: TdTabsProps['size']): boolean {
if (!val) return true;
return ['medium', 'large'].includes(val);
},
},
/** 选项卡头部空间是否均分 */
spaceEvenly: {
type: Boolean,
default: true,
},
/** 是否开启粘性布局 */
sticky: Boolean,
/** 透传至 Sticky 组件 */
stickyProps: {
type: Object as PropType<TdTabsProps['stickyProps']>,
},
/** 是否可以滑动切换 */
swipeable: {
type: Boolean,
default: true,
},
/** 标签的样式 */
theme: {
type: String as PropType<TdTabsProps['theme']>,
default: 'line' as TdTabsProps['theme'],
validator(val: TdTabsProps['theme']): boolean {
if (!val) return true;
return ['line', 'tag', 'card'].includes(val);
},
},
/** 激活的选项卡值 */
value: {
type: [String, Number] as PropType<TdTabsProps['value']>,
default: undefined,
},
modelValue: {
type: [String, Number] as PropType<TdTabsProps['value']>,
default: undefined,
},
/** 激活的选项卡值,非受控属性 */
defaultValue: {
type: [String, Number] as PropType<TdTabsProps['defaultValue']>,
},
/** 激活的选项卡发生变化时触发 */
onChange: Function as PropType<TdTabsProps['onChange']>,
/** 点击选项卡时触发 */
onClick: Function as PropType<TdTabsProps['onClick']>,
/** 页面滚动时触发 */
onScroll: Function as PropType<TdTabsProps['onScroll']>,
};