@ray-js/smart-ui 1.0.0-beta.1 → 1.0.1-beta-1
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/README.md +54 -1
- package/dist/@types/action-sheet/index.d.ts +115 -0
- package/dist/@types/area/index.d.ts +120 -0
- package/dist/@types/area/index.js +2 -0
- package/dist/@types/base/component.d.ts +11 -0
- package/dist/@types/base/component.js +2 -0
- package/dist/@types/base/events.d.ts +27 -0
- package/dist/@types/base/events.js +2 -0
- package/dist/@types/base/external-class-name.d.ts +12 -0
- package/dist/@types/base/external-class-name.js +2 -0
- package/dist/@types/base/index.d.ts +4 -0
- package/dist/{card → @types/base}/index.js +4 -8
- package/dist/@types/base/open-type.d.ts +175 -0
- package/dist/@types/base/open-type.js +2 -0
- package/dist/@types/battery/index.d.ts +58 -0
- package/dist/@types/battery/index.js +2 -0
- package/dist/@types/button/index.d.ts +109 -0
- package/dist/@types/button/index.js +2 -0
- package/dist/@types/calendar/index.d.ts +264 -0
- package/dist/@types/calendar/index.js +2 -0
- package/dist/@types/card/index.d.ts +92 -0
- package/dist/@types/card/index.js +2 -0
- package/dist/@types/cascader/index.d.ts +139 -0
- package/dist/@types/cascader/index.js +2 -0
- package/dist/@types/cell/index.d.ts +128 -0
- package/dist/@types/cell/index.js +2 -0
- package/dist/@types/cell-group/index.d.ts +21 -0
- package/dist/@types/cell-group/index.js +2 -0
- package/dist/@types/checkbox/index.d.ts +85 -0
- package/dist/@types/checkbox/index.js +2 -0
- package/dist/@types/checkbox-group/index.d.ts +38 -0
- package/dist/@types/checkbox-group/index.js +2 -0
- package/dist/@types/circle/index.d.ts +58 -0
- package/dist/@types/circle/index.js +2 -0
- package/dist/@types/col/index.d.ts +13 -0
- package/dist/@types/col/index.js +2 -0
- package/dist/@types/collapse/index.d.ts +60 -0
- package/dist/@types/collapse/index.js +2 -0
- package/dist/@types/collapse-item/index.d.ts +62 -0
- package/dist/@types/collapse-item/index.js +2 -0
- package/dist/@types/config-provider/index.d.ts +9 -0
- package/dist/@types/config-provider/index.js +2 -0
- package/dist/@types/config-provider/theme-vars.d.ts +63 -0
- package/dist/@types/config-provider/theme-vars.js +2 -0
- package/dist/@types/count-down/index.d.ts +81 -0
- package/dist/@types/count-down/index.js +2 -0
- package/dist/@types/custom-keyboard/index.d.ts +97 -0
- package/dist/@types/custom-keyboard/index.js +2 -0
- package/dist/@types/datetime-picker/index.d.ts +150 -0
- package/dist/@types/datetime-picker/index.js +2 -0
- package/dist/@types/dialog/dialog.d.ts +137 -0
- package/dist/@types/dialog/dialog.js +2 -0
- package/dist/@types/dialog/index.d.ts +168 -0
- package/dist/@types/dialog/index.js +2 -0
- package/dist/@types/divider/index.d.ts +24 -0
- package/dist/@types/divider/index.js +2 -0
- package/dist/@types/dropdown-item/index.d.ts +92 -0
- package/dist/@types/dropdown-item/index.js +2 -0
- package/dist/@types/dropdown-menu/index.d.ts +44 -0
- package/dist/@types/dropdown-menu/index.js +2 -0
- package/dist/@types/empty/index.d.ts +14 -0
- package/dist/@types/empty/index.js +2 -0
- package/dist/@types/field/index.d.ts +332 -0
- package/dist/@types/field/index.js +2 -0
- package/dist/@types/goods-action/index.d.ts +10 -0
- package/dist/@types/goods-action/index.js +2 -0
- package/dist/@types/goods-action-button/index.d.ts +67 -0
- package/dist/@types/goods-action-button/index.js +2 -0
- package/dist/@types/goods-action-icon/index.d.ts +60 -0
- package/dist/@types/goods-action-icon/index.js +2 -0
- package/dist/@types/grid/index.d.ts +63 -0
- package/dist/@types/grid/index.js +2 -0
- package/dist/@types/grid-item/index.d.ts +70 -0
- package/dist/@types/grid-item/index.js +2 -0
- package/dist/@types/icon/index.d.ts +47 -0
- package/dist/@types/icon/index.js +2 -0
- package/dist/@types/image/index.d.ts +117 -0
- package/dist/@types/image/index.js +2 -0
- package/dist/@types/index-anchor/index.d.ts +14 -0
- package/dist/@types/index-anchor/index.js +2 -0
- package/dist/@types/index-bar/index.d.ts +50 -0
- package/dist/@types/index-bar/index.js +2 -0
- package/dist/@types/index.d.ts +71 -0
- package/dist/@types/index.js +87 -0
- package/dist/@types/loading/index.d.ts +39 -0
- package/dist/@types/loading/index.js +2 -0
- package/dist/@types/nav-bar/index.d.ts +96 -0
- package/dist/@types/nav-bar/index.js +2 -0
- package/dist/@types/notice-bar/index.d.ts +71 -0
- package/dist/@types/notice-bar/index.js +2 -0
- package/dist/@types/notify/index.d.ts +1 -0
- package/dist/@types/notify/index.js +2 -0
- package/dist/@types/notify/notify.d.ts +84 -0
- package/dist/@types/notify/notify.js +2 -0
- package/dist/@types/overlay/index.d.ts +49 -0
- package/dist/@types/overlay/index.js +2 -0
- package/dist/@types/panel/index.d.ts +26 -0
- package/dist/@types/panel/index.js +2 -0
- package/dist/@types/picker/index.d.ts +154 -0
- package/dist/@types/picker/index.js +2 -0
- package/dist/@types/popup/index.d.ts +107 -0
- package/dist/@types/popup/index.js +2 -0
- package/dist/@types/progress/index.d.ts +59 -0
- package/dist/@types/progress/index.js +2 -0
- package/dist/@types/radio/index.d.ts +69 -0
- package/dist/@types/radio/index.js +2 -0
- package/dist/@types/radio-group/index.d.ts +37 -0
- package/dist/@types/radio-group/index.js +2 -0
- package/dist/@types/rate/index.d.ts +103 -0
- package/dist/@types/rate/index.js +2 -0
- package/dist/@types/row/index.d.ts +9 -0
- package/dist/@types/row/index.js +2 -0
- package/dist/@types/search/index.d.ts +166 -0
- package/dist/@types/search/index.js +2 -0
- package/dist/@types/share-sheet/index.d.ts +95 -0
- package/dist/@types/share-sheet/index.js +2 -0
- package/dist/@types/sidebar/index.d.ts +27 -0
- package/dist/@types/sidebar/index.js +2 -0
- package/dist/@types/sidebar-item/index.d.ts +52 -0
- package/dist/@types/sidebar-item/index.js +2 -0
- package/dist/@types/skeleton/index.d.ts +56 -0
- package/dist/@types/skeleton/index.js +2 -0
- package/dist/@types/slider/index.d.ts +103 -0
- package/dist/@types/slider/index.js +2 -0
- package/dist/@types/stepper/index.d.ts +169 -0
- package/dist/@types/stepper/index.js +2 -0
- package/dist/@types/steps/index.d.ts +83 -0
- package/dist/@types/steps/index.js +2 -0
- package/dist/@types/sticky/index.d.ts +36 -0
- package/dist/@types/sticky/index.js +2 -0
- package/dist/@types/submit-bar/index.d.ts +86 -0
- package/dist/@types/submit-bar/index.js +2 -0
- package/dist/@types/swipe-cell/index.d.ts +75 -0
- package/dist/@types/swipe-cell/index.js +2 -0
- package/dist/@types/switch/index.d.ts +75 -0
- package/dist/@types/switch/index.js +2 -0
- package/dist/@types/tab/index.d.ts +41 -0
- package/dist/@types/tab/index.js +2 -0
- package/dist/@types/tabbar/index.d.ts +68 -0
- package/dist/@types/tabbar/index.js +2 -0
- package/dist/@types/tabbar-item/index.d.ts +28 -0
- package/dist/@types/tabbar-item/index.js +2 -0
- package/dist/@types/tabs/index.d.ts +174 -0
- package/dist/@types/tabs/index.js +2 -0
- package/dist/@types/tag/index.d.ts +50 -0
- package/dist/@types/tag/index.js +2 -0
- package/dist/@types/toast/index.d.ts +2 -0
- package/dist/@types/toast/index.js +2 -0
- package/dist/@types/toast/toast.d.ts +112 -0
- package/dist/@types/toast/toast.js +3 -0
- package/dist/@types/transition/index.d.ts +105 -0
- package/dist/@types/transition/index.js +2 -0
- package/dist/@types/tree-select/index.d.ts +126 -0
- package/dist/@types/tree-select/index.js +2 -0
- package/dist/@types/uploader/index.d.ts +157 -0
- package/dist/@types/uploader/index.js +2 -0
- package/dist/action-sheet/PropTypes.d.ts +1 -1
- package/dist/area/PropTypes.d.ts +1 -1
- package/dist/base/index.d.ts +1 -1
- package/dist/battery/PropTypes.d.ts +1 -1
- package/dist/button/PropTypes.d.ts +1 -1
- package/dist/calendar/PropTypes.d.ts +1 -1
- package/dist/cascader/PropTypes.d.ts +1 -1
- package/dist/cell/PropTypes.d.ts +1 -1
- package/dist/cell-group/PropTypes.d.ts +1 -1
- package/dist/checkbox/PropTypes.d.ts +1 -1
- package/dist/checkbox-group/PropTypes.d.ts +1 -1
- package/dist/circle/PropTypes.d.ts +1 -1
- package/dist/col/PropTypes.d.ts +1 -1
- package/dist/collapse/PropTypes.d.ts +1 -1
- package/dist/collapse-item/PropTypes.d.ts +1 -1
- package/dist/config-provider/PropTypes.d.ts +1 -1
- package/dist/count-down/PropTypes.d.ts +1 -1
- package/dist/custom-keyboard/PropTypes.d.ts +1 -1
- package/dist/datetime-picker/PropTypes.d.ts +1 -1
- package/dist/dialog/Dialog.d.ts +4 -2
- package/dist/dialog/Dialog.js +2 -1
- package/dist/dialog/PropTypes.d.ts +1 -1
- package/dist/divider/PropTypes.d.ts +1 -1
- package/dist/dropdown-item/PropTypes.d.ts +1 -1
- package/dist/dropdown-menu/PropTypes.d.ts +1 -1
- package/dist/empty/PropTypes.d.ts +1 -1
- package/dist/field/PropTypes.d.ts +1 -1
- package/dist/grid/PropTypes.d.ts +1 -1
- package/dist/grid-item/PropTypes.d.ts +1 -1
- package/dist/icon/PropTypes.d.ts +1 -1
- package/dist/image/PropTypes.d.ts +1 -1
- package/dist/index-anchor/PropTypes.d.ts +1 -1
- package/dist/index-bar/PropTypes.d.ts +1 -1
- package/dist/loading/PropTypes.d.ts +1 -1
- package/dist/nav-bar/PropTypes.d.ts +1 -1
- package/dist/notice-bar/PropTypes.d.ts +1 -1
- package/dist/notify/PropTypes.d.ts +1 -1
- package/dist/overlay/PropTypes.d.ts +1 -1
- package/dist/picker/PropTypes.d.ts +1 -1
- package/dist/popup/PropTypes.d.ts +1 -1
- package/dist/radio/PropTypes.d.ts +1 -1
- package/dist/radio-group/PropTypes.d.ts +1 -1
- package/dist/rate/PropTypes.d.ts +1 -1
- package/dist/row/PropTypes.d.ts +1 -1
- package/dist/search/PropTypes.d.ts +1 -1
- package/dist/share-sheet/PropTypes.d.ts +1 -1
- package/dist/sidebar/PropTypes.d.ts +1 -1
- package/dist/sidebar-item/PropTypes.d.ts +1 -1
- package/dist/skeleton/PropTypes.d.ts +1 -1
- package/dist/slider/PropTypes.d.ts +1 -1
- package/dist/slider/index.d.ts +4 -4
- package/dist/stepper/PropTypes.d.ts +1 -1
- package/dist/steps/PropTypes.d.ts +1 -1
- package/dist/sticky/PropTypes.d.ts +1 -1
- package/dist/swipe-cell/PropTypes.d.ts +1 -1
- package/dist/switch/PropTypes.d.ts +1 -1
- package/dist/tab/PropTypes.d.ts +1 -1
- package/dist/tabbar/PropTypes.d.ts +1 -1
- package/dist/tabbar-item/PropTypes.d.ts +1 -1
- package/dist/tabs/PropTypes.d.ts +1 -1
- package/dist/tag/PropTypes.d.ts +1 -1
- package/dist/toast/PropTypes.d.ts +1 -1
- package/dist/toast/index.d.ts +2 -1
- package/dist/transition/PropTypes.d.ts +1 -1
- package/dist/tree-select/PropTypes.d.ts +1 -1
- package/package.json +45 -8
- package/dist/card/Card.d.ts +0 -2
- package/dist/card/Card.js +0 -8
- package/dist/card/PropTypes.d.ts +0 -2
- package/dist/card/index.d.ts +0 -5
- /package/dist/{card/PropTypes.js → @types/action-sheet/index.js} +0 -0
- /package/dist/notify/{Notify.d.ts → notify.d.ts} +0 -0
- /package/dist/notify/{Notify.js → notify.js} +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { VantBaseExternalClassName, VantComponent } from '../base';
|
|
2
|
+
export interface VantGridProps {
|
|
3
|
+
/**
|
|
4
|
+
* 列数
|
|
5
|
+
*
|
|
6
|
+
* @default 4
|
|
7
|
+
*/
|
|
8
|
+
columnNum?: number;
|
|
9
|
+
/**
|
|
10
|
+
* 图标大小,默认单位为`px`
|
|
11
|
+
*
|
|
12
|
+
* @default '28px'
|
|
13
|
+
*/
|
|
14
|
+
iconSize?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 格子之间的间距,默认单位为`px`
|
|
17
|
+
*
|
|
18
|
+
* @default 0
|
|
19
|
+
*/
|
|
20
|
+
gutter?: string | number;
|
|
21
|
+
/**
|
|
22
|
+
* 是否显示边框
|
|
23
|
+
*
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
border?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 是否将格子内容居中显示
|
|
29
|
+
*
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
center?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 是否将格子固定为正方形
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
square?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 是否开启格子点击反馈
|
|
41
|
+
*
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
clickable?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 格子内容排列的方向
|
|
47
|
+
*/
|
|
48
|
+
direction?: 'horizontal' | 'vertical';
|
|
49
|
+
/**
|
|
50
|
+
* 是否调换图标和文本的位置
|
|
51
|
+
*
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
reverse?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 是否使用自定义内容的插槽
|
|
57
|
+
*
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
useSlot?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export type VantGridExternalClassName = VantBaseExternalClassName;
|
|
63
|
+
export type VantGrid = VantComponent<VantGridProps, {}, VantGridExternalClassName>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base';
|
|
2
|
+
export interface VantGridItemProps {
|
|
3
|
+
/**
|
|
4
|
+
* 文字
|
|
5
|
+
*/
|
|
6
|
+
text?: string;
|
|
7
|
+
/**
|
|
8
|
+
* 图标名称或图片链接,可选值见 `Icon` 组件
|
|
9
|
+
*/
|
|
10
|
+
icon?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 图标颜色
|
|
13
|
+
*/
|
|
14
|
+
iconColor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 第三方图标前缀
|
|
17
|
+
*
|
|
18
|
+
* @default 'van-icon'
|
|
19
|
+
*/
|
|
20
|
+
iconPrefix?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 是否显示图标右上角小红点
|
|
23
|
+
*
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
dot?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 图标右上角徽标的内容
|
|
29
|
+
*/
|
|
30
|
+
badge?: string | number;
|
|
31
|
+
/**
|
|
32
|
+
* 点击后跳转的链接地址
|
|
33
|
+
*/
|
|
34
|
+
url?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 链接跳转类型
|
|
37
|
+
*
|
|
38
|
+
* @default 'navigateTo'
|
|
39
|
+
*/
|
|
40
|
+
linkyType?: 'redirectTo' | 'switchTab' | 'reLaunch';
|
|
41
|
+
}
|
|
42
|
+
export interface VantGridItemEvents {
|
|
43
|
+
/**
|
|
44
|
+
* 点击格子时触发
|
|
45
|
+
*/
|
|
46
|
+
onClick?: VantEventHandler;
|
|
47
|
+
}
|
|
48
|
+
export interface VantGridItemExternalClassName extends VantBaseExternalClassName {
|
|
49
|
+
/**
|
|
50
|
+
* 内容样式类
|
|
51
|
+
*/
|
|
52
|
+
contentClass?: string;
|
|
53
|
+
/**
|
|
54
|
+
* 图标样式类
|
|
55
|
+
*/
|
|
56
|
+
iconClass?: string;
|
|
57
|
+
/**
|
|
58
|
+
* 文本样式类
|
|
59
|
+
*/
|
|
60
|
+
textClass?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface VantGridItemSlot {
|
|
63
|
+
/**
|
|
64
|
+
* 是否使用自定义内容的插槽
|
|
65
|
+
*
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
useSlot?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export type VantGridItem = VantComponent<VantGridItemProps, VantGridItemEvents, VantGridItemExternalClassName, VantGridItemSlot>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base';
|
|
2
|
+
export interface VantIconProps {
|
|
3
|
+
/**
|
|
4
|
+
* 图标名称或图片链接
|
|
5
|
+
*/
|
|
6
|
+
name?: string;
|
|
7
|
+
/**
|
|
8
|
+
* 是否显示图标右上角小红点
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
dot?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 图标右上角文字提示
|
|
15
|
+
*/
|
|
16
|
+
info?: string | number;
|
|
17
|
+
/**
|
|
18
|
+
* 图标颜色
|
|
19
|
+
*
|
|
20
|
+
* @default 'inherit'
|
|
21
|
+
*/
|
|
22
|
+
color?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 图标大小,如 20px,2em,默认单位为px
|
|
25
|
+
*
|
|
26
|
+
* @default 'inherit'
|
|
27
|
+
*/
|
|
28
|
+
size?: string | number;
|
|
29
|
+
/**
|
|
30
|
+
* 自定义样式
|
|
31
|
+
*/
|
|
32
|
+
customStyle?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 类名前缀
|
|
35
|
+
*
|
|
36
|
+
* @default 'van-icon'
|
|
37
|
+
*/
|
|
38
|
+
classPrefix?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface VantIconEvents {
|
|
41
|
+
/**
|
|
42
|
+
* 点击图标时触发
|
|
43
|
+
*/
|
|
44
|
+
onClick?: VantEventHandler;
|
|
45
|
+
}
|
|
46
|
+
export type VantIconExternalClassName = VantBaseExternalClassName;
|
|
47
|
+
export type VantIcon = VantComponent<VantIconProps, VantIconEvents, VantIconExternalClassName>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { TouchPositionDetail, VantBaseExternalClassName, VantBaseLoadingExternalClassName, VantComponent, VantEventHandler } from '../base';
|
|
2
|
+
export interface VantImageProps {
|
|
3
|
+
/**
|
|
4
|
+
* 图片链接
|
|
5
|
+
*/
|
|
6
|
+
src?: string;
|
|
7
|
+
/**
|
|
8
|
+
* 图片填充模式
|
|
9
|
+
*
|
|
10
|
+
* `contain` 保持宽高缩放图片,使图片的长边能完全显示出来
|
|
11
|
+
*
|
|
12
|
+
* `cover` 保持宽高缩放图片,使图片的短边能完全显示出来,裁剪长边
|
|
13
|
+
*
|
|
14
|
+
* `fill`拉伸图片,使图片填满元素
|
|
15
|
+
*
|
|
16
|
+
* `widthFix`缩放模式,宽度不变,高度自动变化,保持原图宽高比不变
|
|
17
|
+
*
|
|
18
|
+
* `heightFix` 缩放模式,高度不变,宽度自动变化,保持原图宽高比不变
|
|
19
|
+
*
|
|
20
|
+
* `none` 保持图片原有尺寸
|
|
21
|
+
*
|
|
22
|
+
* @default 'fill'
|
|
23
|
+
*/
|
|
24
|
+
fit?: 'contain' | 'cover' | 'fill' | 'widthFix' | 'heightFix' | 'none';
|
|
25
|
+
/**
|
|
26
|
+
* 替代文本
|
|
27
|
+
*/
|
|
28
|
+
alt?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 宽度,默认单位为px
|
|
31
|
+
*/
|
|
32
|
+
width?: string | number;
|
|
33
|
+
/**
|
|
34
|
+
* 高度,默认单位为px
|
|
35
|
+
*/
|
|
36
|
+
height?: string | number;
|
|
37
|
+
/**
|
|
38
|
+
* 圆角大小,默认单位为px
|
|
39
|
+
*
|
|
40
|
+
* @default 0
|
|
41
|
+
*/
|
|
42
|
+
radius?: string | number;
|
|
43
|
+
/**
|
|
44
|
+
* 是否显示为圆形
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
round?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 是否懒加载
|
|
51
|
+
*
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
lazyLoad?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 是否展示图片加载失败提示
|
|
57
|
+
*
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
showError?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* 是否展示图片加载中提示
|
|
63
|
+
*
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
showLoading?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* 是否使用`error`插槽
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
useErrorSlot?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 是否使用`loading`插槽
|
|
75
|
+
*
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
useLoadingSlot?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 是否开启长按图片显示识别小程序码菜单
|
|
81
|
+
*
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
showMenuByLongpress?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface VantImageLoadEventDetail {
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
}
|
|
90
|
+
export interface VantImageErrorEventDetail {
|
|
91
|
+
errMsg: string;
|
|
92
|
+
}
|
|
93
|
+
export interface VantImageEvents {
|
|
94
|
+
/**
|
|
95
|
+
* 点击图片时触发
|
|
96
|
+
*/
|
|
97
|
+
onClick?: VantEventHandler<TouchPositionDetail>;
|
|
98
|
+
/**
|
|
99
|
+
* 图片加载完毕时触发
|
|
100
|
+
*/
|
|
101
|
+
onLoad?: VantEventHandler<VantImageLoadEventDetail>;
|
|
102
|
+
/**
|
|
103
|
+
* 图片加载失败时触发
|
|
104
|
+
*/
|
|
105
|
+
onError?: VantEventHandler<VantImageErrorEventDetail>;
|
|
106
|
+
}
|
|
107
|
+
export interface VantImageExternalClassName extends VantBaseExternalClassName, VantBaseLoadingExternalClassName {
|
|
108
|
+
/**
|
|
109
|
+
* 图片样式类
|
|
110
|
+
*/
|
|
111
|
+
imageClass?: string;
|
|
112
|
+
/**
|
|
113
|
+
* `error` 样式类
|
|
114
|
+
*/
|
|
115
|
+
errorClass?: string;
|
|
116
|
+
}
|
|
117
|
+
export type VantImage = VantComponent<VantImageProps, VantImageEvents, VantImageExternalClassName>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VantComponent } from '../base';
|
|
2
|
+
export interface VantIndexAnchorProps {
|
|
3
|
+
/**
|
|
4
|
+
* 是否使用自定义内容的插槽
|
|
5
|
+
*
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
useSlot?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 索引字符
|
|
11
|
+
*/
|
|
12
|
+
index?: string | number;
|
|
13
|
+
}
|
|
14
|
+
export type VantIndexAnchor = VantComponent<VantIndexAnchorProps>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
|
2
|
+
import { VantComponent, VantEventHandler } from '../base';
|
|
3
|
+
export interface VantIndexBarProps {
|
|
4
|
+
/**
|
|
5
|
+
* 索引字符列表
|
|
6
|
+
*
|
|
7
|
+
* @default [A,B,...Z]
|
|
8
|
+
*/
|
|
9
|
+
indexList?: string[] | number[];
|
|
10
|
+
/**
|
|
11
|
+
* `z-index`层级
|
|
12
|
+
*
|
|
13
|
+
* @default 1
|
|
14
|
+
*/
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
/**
|
|
17
|
+
* 是否开启锚点自动吸顶
|
|
18
|
+
*
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
sticky?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 锚点自动吸顶时与顶部的距离
|
|
24
|
+
*
|
|
25
|
+
* @default 0
|
|
26
|
+
*/
|
|
27
|
+
stickyOffsetTop?: number;
|
|
28
|
+
/**
|
|
29
|
+
* 索引字符高亮颜色
|
|
30
|
+
*
|
|
31
|
+
* @default '#07c160'
|
|
32
|
+
*/
|
|
33
|
+
highlightColor?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated
|
|
37
|
+
*/
|
|
38
|
+
export interface VantIndexBarSelectEvent extends WechatMiniprogram.BaseEvent {
|
|
39
|
+
/**
|
|
40
|
+
* 索引字符
|
|
41
|
+
*/
|
|
42
|
+
detail: string | number;
|
|
43
|
+
}
|
|
44
|
+
export interface VantIndexBarEvents {
|
|
45
|
+
/**
|
|
46
|
+
* 选中字符时触发
|
|
47
|
+
*/
|
|
48
|
+
onSelect?: VantEventHandler<string | number>;
|
|
49
|
+
}
|
|
50
|
+
export type VantIndexBar = VantComponent<VantIndexBarProps, VantIndexBarEvents>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export * from './action-sheet';
|
|
2
|
+
export * from './area';
|
|
3
|
+
export * from './base';
|
|
4
|
+
export * from './button';
|
|
5
|
+
export * from './calendar';
|
|
6
|
+
export * from './card';
|
|
7
|
+
export * from './cell';
|
|
8
|
+
export * from './cell-group';
|
|
9
|
+
export * from './checkbox';
|
|
10
|
+
export * from './checkbox-group';
|
|
11
|
+
export * from './circle';
|
|
12
|
+
export * from './col';
|
|
13
|
+
export * from './collapse';
|
|
14
|
+
export * from './collapse-item';
|
|
15
|
+
export * from './config-provider';
|
|
16
|
+
export * from './count-down';
|
|
17
|
+
export * from './datetime-picker';
|
|
18
|
+
export * from './dialog';
|
|
19
|
+
export * from './dialog/dialog';
|
|
20
|
+
export * from './divider';
|
|
21
|
+
export * from './dropdown-item';
|
|
22
|
+
export * from './dropdown-menu';
|
|
23
|
+
export * from './empty';
|
|
24
|
+
export * from './field';
|
|
25
|
+
export * from './goods-action';
|
|
26
|
+
export * from './goods-action-button';
|
|
27
|
+
export * from './goods-action-icon';
|
|
28
|
+
export * from './grid';
|
|
29
|
+
export * from './grid-item';
|
|
30
|
+
export * from './icon';
|
|
31
|
+
export * from './image';
|
|
32
|
+
export * from './index-anchor';
|
|
33
|
+
export * from './index-bar';
|
|
34
|
+
export * from './loading';
|
|
35
|
+
export * from './nav-bar';
|
|
36
|
+
export * from './notice-bar';
|
|
37
|
+
export * from './notify';
|
|
38
|
+
export * from './notify/notify';
|
|
39
|
+
export * from './overlay';
|
|
40
|
+
export * from './panel';
|
|
41
|
+
export * from './picker';
|
|
42
|
+
export * from './popup';
|
|
43
|
+
export * from './progress';
|
|
44
|
+
export * from './radio';
|
|
45
|
+
export * from './radio-group';
|
|
46
|
+
export * from './rate';
|
|
47
|
+
export * from './row';
|
|
48
|
+
export * from './search';
|
|
49
|
+
export * from './share-sheet';
|
|
50
|
+
export * from './sidebar';
|
|
51
|
+
export * from './sidebar-item';
|
|
52
|
+
export * from './skeleton';
|
|
53
|
+
export * from './slider';
|
|
54
|
+
export * from './stepper';
|
|
55
|
+
export * from './steps';
|
|
56
|
+
export * from './sticky';
|
|
57
|
+
export * from './submit-bar';
|
|
58
|
+
export * from './swipe-cell';
|
|
59
|
+
export * from './switch';
|
|
60
|
+
export * from './tab';
|
|
61
|
+
export * from './tabbar';
|
|
62
|
+
export * from './tabbar-item';
|
|
63
|
+
export * from './tabs';
|
|
64
|
+
export * from './tag';
|
|
65
|
+
export * from './toast/toast';
|
|
66
|
+
export * from './transition';
|
|
67
|
+
export * from './tree-select';
|
|
68
|
+
export * from './uploader';
|
|
69
|
+
export * from './cascader';
|
|
70
|
+
export * from './battery';
|
|
71
|
+
export * from './custom-keyboard';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
exports.__esModule = true;
|
|
17
|
+
__exportStar(require("./action-sheet"), exports);
|
|
18
|
+
__exportStar(require("./area"), exports);
|
|
19
|
+
__exportStar(require("./base"), exports);
|
|
20
|
+
__exportStar(require("./button"), exports);
|
|
21
|
+
__exportStar(require("./calendar"), exports);
|
|
22
|
+
__exportStar(require("./card"), exports);
|
|
23
|
+
__exportStar(require("./cell"), exports);
|
|
24
|
+
__exportStar(require("./cell-group"), exports);
|
|
25
|
+
__exportStar(require("./checkbox"), exports);
|
|
26
|
+
__exportStar(require("./checkbox-group"), exports);
|
|
27
|
+
__exportStar(require("./circle"), exports);
|
|
28
|
+
__exportStar(require("./col"), exports);
|
|
29
|
+
__exportStar(require("./collapse"), exports);
|
|
30
|
+
__exportStar(require("./collapse-item"), exports);
|
|
31
|
+
__exportStar(require("./config-provider"), exports);
|
|
32
|
+
__exportStar(require("./count-down"), exports);
|
|
33
|
+
__exportStar(require("./datetime-picker"), exports);
|
|
34
|
+
__exportStar(require("./dialog"), exports);
|
|
35
|
+
__exportStar(require("./dialog/dialog"), exports);
|
|
36
|
+
__exportStar(require("./divider"), exports);
|
|
37
|
+
__exportStar(require("./dropdown-item"), exports);
|
|
38
|
+
__exportStar(require("./dropdown-menu"), exports);
|
|
39
|
+
__exportStar(require("./empty"), exports);
|
|
40
|
+
__exportStar(require("./field"), exports);
|
|
41
|
+
__exportStar(require("./goods-action"), exports);
|
|
42
|
+
__exportStar(require("./goods-action-button"), exports);
|
|
43
|
+
__exportStar(require("./goods-action-icon"), exports);
|
|
44
|
+
__exportStar(require("./grid"), exports);
|
|
45
|
+
__exportStar(require("./grid-item"), exports);
|
|
46
|
+
__exportStar(require("./icon"), exports);
|
|
47
|
+
__exportStar(require("./image"), exports);
|
|
48
|
+
__exportStar(require("./index-anchor"), exports);
|
|
49
|
+
__exportStar(require("./index-bar"), exports);
|
|
50
|
+
__exportStar(require("./loading"), exports);
|
|
51
|
+
__exportStar(require("./nav-bar"), exports);
|
|
52
|
+
__exportStar(require("./notice-bar"), exports);
|
|
53
|
+
__exportStar(require("./notify"), exports);
|
|
54
|
+
__exportStar(require("./notify/notify"), exports);
|
|
55
|
+
__exportStar(require("./overlay"), exports);
|
|
56
|
+
__exportStar(require("./panel"), exports);
|
|
57
|
+
__exportStar(require("./picker"), exports);
|
|
58
|
+
__exportStar(require("./popup"), exports);
|
|
59
|
+
__exportStar(require("./progress"), exports);
|
|
60
|
+
__exportStar(require("./radio"), exports);
|
|
61
|
+
__exportStar(require("./radio-group"), exports);
|
|
62
|
+
__exportStar(require("./rate"), exports);
|
|
63
|
+
__exportStar(require("./row"), exports);
|
|
64
|
+
__exportStar(require("./search"), exports);
|
|
65
|
+
__exportStar(require("./share-sheet"), exports);
|
|
66
|
+
__exportStar(require("./sidebar"), exports);
|
|
67
|
+
__exportStar(require("./sidebar-item"), exports);
|
|
68
|
+
__exportStar(require("./skeleton"), exports);
|
|
69
|
+
__exportStar(require("./slider"), exports);
|
|
70
|
+
__exportStar(require("./stepper"), exports);
|
|
71
|
+
__exportStar(require("./steps"), exports);
|
|
72
|
+
__exportStar(require("./sticky"), exports);
|
|
73
|
+
__exportStar(require("./submit-bar"), exports);
|
|
74
|
+
__exportStar(require("./swipe-cell"), exports);
|
|
75
|
+
__exportStar(require("./switch"), exports);
|
|
76
|
+
__exportStar(require("./tab"), exports);
|
|
77
|
+
__exportStar(require("./tabbar"), exports);
|
|
78
|
+
__exportStar(require("./tabbar-item"), exports);
|
|
79
|
+
__exportStar(require("./tabs"), exports);
|
|
80
|
+
__exportStar(require("./tag"), exports);
|
|
81
|
+
__exportStar(require("./toast/toast"), exports);
|
|
82
|
+
__exportStar(require("./transition"), exports);
|
|
83
|
+
__exportStar(require("./tree-select"), exports);
|
|
84
|
+
__exportStar(require("./uploader"), exports);
|
|
85
|
+
__exportStar(require("./cascader"), exports);
|
|
86
|
+
__exportStar(require("./battery"), exports);
|
|
87
|
+
__exportStar(require("./custom-keyboard"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VantBaseExternalClassName, VantComponent } from '../base';
|
|
2
|
+
export interface VantLoadingProps {
|
|
3
|
+
/**
|
|
4
|
+
* 颜色
|
|
5
|
+
*
|
|
6
|
+
* @default '#c9c9c9'
|
|
7
|
+
*/
|
|
8
|
+
color?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 类型
|
|
11
|
+
*
|
|
12
|
+
* @default 'circular'
|
|
13
|
+
*/
|
|
14
|
+
type?: 'spinner' | 'circular';
|
|
15
|
+
/**
|
|
16
|
+
* 加载图标大小,默认单位为 `px`
|
|
17
|
+
*
|
|
18
|
+
* @default '30px'
|
|
19
|
+
*/
|
|
20
|
+
size?: string | number;
|
|
21
|
+
/**
|
|
22
|
+
* 文字大小,默认单位为为 `px`
|
|
23
|
+
*
|
|
24
|
+
* @version `v1.0.0`
|
|
25
|
+
*
|
|
26
|
+
* @default '14px'
|
|
27
|
+
*/
|
|
28
|
+
textSize?: string | number;
|
|
29
|
+
/**
|
|
30
|
+
* 是否垂直排列图标和文字内容
|
|
31
|
+
*
|
|
32
|
+
* @version `v1.0.0`
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
vertical?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type VantLoadingExternalClassName = VantBaseExternalClassName;
|
|
39
|
+
export type VantLoading = VantComponent<VantLoadingProps, {}, VantLoadingExternalClassName>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base';
|
|
3
|
+
export interface VantNavBarProps {
|
|
4
|
+
/**
|
|
5
|
+
* 标题
|
|
6
|
+
*
|
|
7
|
+
* @default ''
|
|
8
|
+
*/
|
|
9
|
+
title?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 左侧文案
|
|
12
|
+
*
|
|
13
|
+
* @default ''
|
|
14
|
+
*/
|
|
15
|
+
leftText?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 右侧文案
|
|
18
|
+
*
|
|
19
|
+
* @default ''
|
|
20
|
+
*/
|
|
21
|
+
rightText?: string;
|
|
22
|
+
/**
|
|
23
|
+
* 是否显示左侧箭头
|
|
24
|
+
*
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
leftArrow?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 是否固定在顶部
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
fixed?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 固定在顶部时是否开启占位
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
placeholder?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 是否显示下边框
|
|
42
|
+
*
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
border?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 元素 `z-index`
|
|
48
|
+
*
|
|
49
|
+
* @default 1
|
|
50
|
+
*/
|
|
51
|
+
zIndex?: number;
|
|
52
|
+
/**
|
|
53
|
+
* 根节点自定义样式
|
|
54
|
+
*/
|
|
55
|
+
customStyle?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 是否留出顶部安全距离(状态栏高度)
|
|
58
|
+
*
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
safeAreaInsetTop?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Cell Slot
|
|
64
|
+
*/
|
|
65
|
+
slot?: {
|
|
66
|
+
/**
|
|
67
|
+
* 自定义 title 显示内容,如果设置了 title 属性则不生效
|
|
68
|
+
*/
|
|
69
|
+
title?: React.ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* 自定义左侧区域内容
|
|
72
|
+
*/
|
|
73
|
+
left?: React.ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* 自定义右侧区域内容
|
|
76
|
+
*/
|
|
77
|
+
right?: React.ReactNode;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface VantNavBarEvents {
|
|
81
|
+
/**
|
|
82
|
+
* 点击左侧按钮时触发
|
|
83
|
+
*/
|
|
84
|
+
onClickLeft?: VantEventHandler;
|
|
85
|
+
/**
|
|
86
|
+
* 点击右侧按钮时触发
|
|
87
|
+
*/
|
|
88
|
+
onClickRight?: VantEventHandler;
|
|
89
|
+
}
|
|
90
|
+
export interface VantNavBarExternalClassName extends VantBaseExternalClassName {
|
|
91
|
+
/**
|
|
92
|
+
* 标题样式类
|
|
93
|
+
*/
|
|
94
|
+
titleClass?: string;
|
|
95
|
+
}
|
|
96
|
+
export type VantNavBar = VantComponent<VantNavBarProps, VantNavBarEvents, VantNavBarExternalClassName>;
|