@ray-js/smart-ui 1.0.2-beta-2 → 1.0.2
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/@types/action-sheet/index.d.ts +16 -12
- package/dist/@types/base/component.d.ts +1 -1
- package/dist/@types/base/events.d.ts +4 -4
- package/dist/@types/base/external-class-name.d.ts +2 -2
- package/dist/@types/base/open-type.d.ts +11 -11
- package/dist/@types/battery/index.d.ts +3 -3
- package/dist/@types/button/index.d.ts +7 -7
- package/dist/@types/calendar/index.d.ts +14 -14
- package/dist/@types/cascader/index.d.ts +23 -11
- package/dist/@types/cell/index.d.ts +7 -7
- package/dist/@types/cell-group/index.d.ts +4 -4
- package/dist/@types/checkbox/index.d.ts +9 -9
- package/dist/@types/checkbox-group/index.d.ts +5 -5
- package/dist/@types/circle/index.d.ts +3 -3
- package/dist/@types/col/index.d.ts +4 -4
- package/dist/@types/collapse/index.d.ts +10 -10
- package/dist/@types/collapse-item/index.d.ts +4 -4
- package/dist/@types/config-provider/index.d.ts +3 -3
- package/dist/@types/count-down/index.d.ts +8 -8
- package/dist/@types/custom-keyboard/index.d.ts +8 -8
- package/dist/@types/datetime-picker/index.d.ts +10 -10
- package/dist/@types/dialog/dialog.d.ts +22 -22
- package/dist/@types/dialog/index.d.ts +7 -7
- package/dist/@types/divider/index.d.ts +3 -3
- package/dist/@types/dropdown-item/index.d.ts +13 -13
- package/dist/@types/dropdown-menu/index.d.ts +3 -3
- package/dist/@types/empty/index.d.ts +3 -3
- package/dist/@types/field/index.d.ts +20 -20
- package/dist/@types/grid/index.d.ts +4 -4
- package/dist/@types/grid-item/index.d.ts +8 -8
- package/dist/@types/icon/index.d.ts +7 -7
- package/dist/@types/image/index.d.ts +10 -10
- package/dist/@types/index-anchor/index.d.ts +3 -3
- package/dist/@types/index-bar/index.d.ts +6 -6
- package/dist/@types/loading/index.d.ts +4 -4
- package/dist/@types/nav-bar/index.d.ts +7 -7
- package/dist/@types/notice-bar/index.d.ts +7 -7
- package/dist/@types/notify/notify.d.ts +5 -5
- package/dist/@types/overlay/index.d.ts +6 -6
- package/dist/@types/picker/index.d.ts +14 -14
- package/dist/@types/popup/index.d.ts +8 -8
- package/dist/@types/progress/index.d.ts +4 -4
- package/dist/@types/radio/index.d.ts +7 -7
- package/dist/@types/radio-group/index.d.ts +6 -6
- package/dist/@types/rate/index.d.ts +7 -7
- package/dist/@types/row/index.d.ts +4 -4
- package/dist/@types/search/index.d.ts +9 -9
- package/dist/@types/sidebar/index.d.ts +7 -7
- package/dist/@types/sidebar-item/index.d.ts +8 -8
- package/dist/@types/skeleton/index.d.ts +3 -3
- package/dist/@types/slider/index.d.ts +11 -11
- package/dist/@types/stepper/index.d.ts +15 -15
- package/dist/@types/steps/index.d.ts +9 -9
- package/dist/@types/sticky/index.d.ts +6 -6
- package/dist/@types/swipe-cell/index.d.ts +14 -14
- package/dist/@types/switch/index.d.ts +7 -7
- package/dist/@types/tab/index.d.ts +6 -6
- package/dist/@types/tabbar/index.d.ts +6 -6
- package/dist/@types/tabbar-item/index.d.ts +4 -4
- package/dist/@types/tabs/index.d.ts +13 -13
- package/dist/@types/tag/index.d.ts +6 -6
- package/dist/@types/toast/index.d.ts +2 -2
- package/dist/@types/toast/toast.d.ts +11 -11
- package/dist/@types/transition/index.d.ts +11 -11
- package/dist/@types/tree-select/index.d.ts +12 -12
- package/dist/action-sheet/PropTypes.d.ts +2 -2
- package/dist/action-sheet/index.d.ts +2 -2
- package/dist/base/index.d.ts +2 -2
- package/dist/battery/PropTypes.d.ts +2 -2
- package/dist/battery/index.d.ts +2 -2
- package/dist/button/PropTypes.d.ts +2 -2
- package/dist/button/index.d.ts +2 -2
- package/dist/calendar/PropTypes.d.ts +2 -2
- package/dist/calendar/index.d.ts +2 -2
- package/dist/cascader/PropTypes.d.ts +2 -2
- package/dist/cascader/index.d.ts +2 -2
- package/dist/cell/PropTypes.d.ts +2 -2
- package/dist/cell/index.d.ts +2 -2
- package/dist/cell-group/PropTypes.d.ts +2 -2
- package/dist/cell-group/index.d.ts +2 -2
- package/dist/checkbox/PropTypes.d.ts +2 -2
- package/dist/checkbox/index.d.ts +2 -2
- package/dist/checkbox-group/PropTypes.d.ts +2 -2
- package/dist/checkbox-group/index.d.ts +2 -2
- package/dist/circle/PropTypes.d.ts +2 -2
- package/dist/col/PropTypes.d.ts +2 -2
- package/dist/col/index.d.ts +2 -2
- package/dist/collapse/PropTypes.d.ts +2 -2
- package/dist/collapse/index.d.ts +2 -2
- package/dist/collapse-item/PropTypes.d.ts +2 -2
- package/dist/collapse-item/index.d.ts +2 -2
- package/dist/common/withReactProps.js +12 -12
- package/dist/config-provider/PropTypes.d.ts +2 -2
- package/dist/config-provider/index.d.ts +2 -2
- package/dist/count-down/PropTypes.d.ts +2 -2
- package/dist/count-down/index.d.ts +2 -2
- package/dist/custom-keyboard/PropTypes.d.ts +2 -2
- package/dist/custom-keyboard/index.d.ts +2 -2
- package/dist/datetime-picker/PropTypes.d.ts +2 -2
- package/dist/datetime-picker/index.d.ts +2 -2
- package/dist/dialog/Dialog.d.ts +2 -2
- package/dist/dialog/PropTypes.d.ts +2 -2
- package/dist/dialog/index.d.ts +3 -3
- package/dist/divider/PropTypes.d.ts +2 -2
- package/dist/divider/index.d.ts +2 -2
- package/dist/dropdown-item/PropTypes.d.ts +2 -2
- package/dist/dropdown-item/index.d.ts +2 -2
- package/dist/dropdown-menu/PropTypes.d.ts +2 -2
- package/dist/dropdown-menu/index.d.ts +2 -2
- package/dist/empty/PropTypes.d.ts +2 -2
- package/dist/empty/index.d.ts +2 -2
- package/dist/field/PropTypes.d.ts +2 -2
- package/dist/field/index.d.ts +2 -2
- package/dist/grid/PropTypes.d.ts +2 -2
- package/dist/grid/index.d.ts +2 -2
- package/dist/grid-item/PropTypes.d.ts +2 -2
- package/dist/grid-item/index.d.ts +2 -2
- package/dist/icon/PropTypes.d.ts +2 -2
- package/dist/icon/index.d.ts +2 -2
- package/dist/image/PropTypes.d.ts +2 -2
- package/dist/image/index.d.ts +2 -2
- package/dist/index-anchor/PropTypes.d.ts +2 -2
- package/dist/index-anchor/index.d.ts +2 -2
- package/dist/index-bar/PropTypes.d.ts +2 -2
- package/dist/index-bar/index.d.ts +2 -2
- package/dist/index.d.ts +0 -3
- package/dist/index.js +3 -3
- package/dist/loading/PropTypes.d.ts +2 -2
- package/dist/loading/index.d.ts +2 -2
- package/dist/nav-bar/PropTypes.d.ts +2 -2
- package/dist/nav-bar/index.d.ts +2 -2
- package/dist/notice-bar/PropTypes.d.ts +2 -2
- package/dist/notice-bar/index.d.ts +2 -2
- package/dist/notify/PropTypes.d.ts +2 -2
- package/dist/notify/index.d.ts +2 -2
- package/dist/overlay/PropTypes.d.ts +2 -2
- package/dist/overlay/index.d.ts +2 -2
- package/dist/picker/PropTypes.d.ts +2 -2
- package/dist/picker/index.d.ts +2 -2
- package/dist/popup/PropTypes.d.ts +2 -2
- package/dist/popup/index.d.ts +2 -2
- package/dist/radio/PropTypes.d.ts +2 -2
- package/dist/radio/index.d.ts +2 -2
- package/dist/radio-group/PropTypes.d.ts +2 -2
- package/dist/radio-group/index.d.ts +2 -2
- package/dist/rate/PropTypes.d.ts +2 -2
- package/dist/rate/index.d.ts +2 -2
- package/dist/row/PropTypes.d.ts +2 -2
- package/dist/row/index.d.ts +2 -2
- package/dist/search/PropTypes.d.ts +2 -2
- package/dist/search/index.d.ts +2 -2
- package/dist/sidebar/PropTypes.d.ts +2 -2
- package/dist/sidebar/index.d.ts +2 -2
- package/dist/sidebar-item/PropTypes.d.ts +2 -2
- package/dist/sidebar-item/index.d.ts +2 -2
- package/dist/skeleton/PropTypes.d.ts +2 -2
- package/dist/skeleton/index.d.ts +2 -2
- package/dist/slider/PropTypes.d.ts +2 -2
- package/dist/slider/RangeSlider.d.ts +2 -2
- package/dist/slider/index.d.ts +4 -4
- package/dist/stepper/PropTypes.d.ts +2 -2
- package/dist/stepper/index.d.ts +2 -2
- package/dist/steps/PropTypes.d.ts +2 -2
- package/dist/steps/index.d.ts +2 -2
- package/dist/sticky/PropTypes.d.ts +2 -2
- package/dist/sticky/index.d.ts +2 -2
- package/dist/swipe-cell/PropTypes.d.ts +2 -2
- package/dist/swipe-cell/index.d.ts +2 -2
- package/dist/switch/PropTypes.d.ts +2 -2
- package/dist/switch/index.d.ts +2 -2
- package/dist/tab/PropTypes.d.ts +2 -2
- package/dist/tab/index.d.ts +2 -2
- package/dist/tabbar/PropTypes.d.ts +2 -2
- package/dist/tabbar/index.d.ts +2 -2
- package/dist/tabbar-item/PropTypes.d.ts +2 -2
- package/dist/tabbar-item/index.d.ts +2 -2
- package/dist/tabs/PropTypes.d.ts +2 -2
- package/dist/tabs/index.d.ts +2 -2
- package/dist/tag/PropTypes.d.ts +2 -2
- package/dist/tag/index.d.ts +2 -2
- package/dist/toast/PropTypes.d.ts +2 -2
- package/dist/toast/index.d.ts +2 -2
- package/dist/transition/PropTypes.d.ts +2 -2
- package/dist/transition/index.d.ts +2 -2
- package/dist/tree-select/PropTypes.d.ts +2 -2
- package/dist/tree-select/index.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
1
|
+
import { SmartOpenTypeCamelCaseProps, SmartComponent, SmartEventHandler } from '../base';
|
|
2
|
+
import { SmartTransitionEvents } from '../transition';
|
|
3
|
+
export interface SmartAction extends Omit<SmartOpenTypeCamelCaseProps, 'businessId'> {
|
|
4
4
|
/**
|
|
5
5
|
* 标题
|
|
6
6
|
*/
|
|
@@ -30,7 +30,7 @@ export interface VantAction extends Omit<VantOpenTypeCamelCaseProps, 'businessId
|
|
|
30
30
|
*/
|
|
31
31
|
className?: string;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface SmartActionSheetProps {
|
|
34
34
|
/**
|
|
35
35
|
* 是否显示动作面板
|
|
36
36
|
*/
|
|
@@ -40,7 +40,7 @@ export interface VantActionSheetProps {
|
|
|
40
40
|
*
|
|
41
41
|
* @default []
|
|
42
42
|
*/
|
|
43
|
-
actions?:
|
|
43
|
+
actions?: SmartAction[];
|
|
44
44
|
/**
|
|
45
45
|
* 标题
|
|
46
46
|
*/
|
|
@@ -55,6 +55,10 @@ export interface VantActionSheetProps {
|
|
|
55
55
|
* @default 100
|
|
56
56
|
*/
|
|
57
57
|
zIndex?: number;
|
|
58
|
+
/**
|
|
59
|
+
* 列表选项中 icon 的选中态颜色, 默认跟随 App 主题色 `--app-M1`
|
|
60
|
+
*/
|
|
61
|
+
activeColor?: string;
|
|
58
62
|
/**
|
|
59
63
|
* 取消按钮文字
|
|
60
64
|
*/
|
|
@@ -90,26 +94,26 @@ export interface VantActionSheetProps {
|
|
|
90
94
|
*/
|
|
91
95
|
safeAreaInsetBottom?: boolean;
|
|
92
96
|
}
|
|
93
|
-
export interface
|
|
97
|
+
export interface SmartActionSheetEvents extends SmartTransitionEvents {
|
|
94
98
|
/**
|
|
95
99
|
* 选中选项时触发,禁用或加载状态下不会触发
|
|
96
100
|
*/
|
|
97
|
-
onSelect?:
|
|
101
|
+
onSelect?: SmartEventHandler<SmartAction>;
|
|
98
102
|
/**
|
|
99
103
|
* 关闭时触发
|
|
100
104
|
*/
|
|
101
|
-
onClose?:
|
|
105
|
+
onClose?: SmartEventHandler;
|
|
102
106
|
/**
|
|
103
107
|
* 取消按钮点击时触发
|
|
104
108
|
*/
|
|
105
|
-
onCancel?:
|
|
109
|
+
onCancel?: SmartEventHandler;
|
|
106
110
|
/**
|
|
107
111
|
* 确认按钮点击时触发
|
|
108
112
|
*/
|
|
109
|
-
onConfirm?:
|
|
113
|
+
onConfirm?: SmartEventHandler;
|
|
110
114
|
/**
|
|
111
115
|
* 点击遮罩层时触发
|
|
112
116
|
*/
|
|
113
|
-
onClickOverlay?:
|
|
117
|
+
onClickOverlay?: SmartEventHandler;
|
|
114
118
|
}
|
|
115
|
-
export type
|
|
119
|
+
export type SmartActionSheet = SmartComponent<SmartActionSheetProps, SmartActionSheetEvents>;
|
|
@@ -8,4 +8,4 @@ export interface ComponentBase {
|
|
|
8
8
|
*/
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
-
export type
|
|
11
|
+
export type SmartComponent<Props = {}, Events = {}, EC = {}, Slot = {}> = ComponentBase & Props & Events & EC & Slot;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 普通事件类型
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface SmartEvent<Detail = unknown> extends WechatMiniprogram.BaseEvent {
|
|
6
6
|
detail: Detail;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* 触摸事件类型
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface SmartTouchEvent<Detail = unknown> extends Omit<WechatMiniprogram.TouchEvent, 'detail'>, SmartEvent<Detail> {
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* 普通事件处理类型
|
|
15
15
|
*/
|
|
16
|
-
export type
|
|
16
|
+
export type SmartEventHandler<Detail = unknown> = (event: SmartEvent<Detail>) => void;
|
|
17
17
|
/**
|
|
18
18
|
* Touch 事件处理类型
|
|
19
19
|
*/
|
|
20
|
-
export type
|
|
20
|
+
export type SmartTouchEventHandler<Detail = unknown> = (event: SmartTouchEvent<Detail>) => void;
|
|
21
21
|
/**
|
|
22
22
|
* 触摸坐标详情
|
|
23
23
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface SmartBaseExternalClassName {
|
|
2
2
|
/**
|
|
3
3
|
* 根节点样式类
|
|
4
4
|
*/
|
|
5
5
|
customClass?: string;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface SmartBaseLoadingExternalClassName {
|
|
8
8
|
/**
|
|
9
9
|
* 加载样式类
|
|
10
10
|
*/
|
|
@@ -56,7 +56,7 @@ export type WechatOpenType =
|
|
|
56
56
|
* 获取用户头像,可以从 `bindchooseavatar` 回调中获取到头像信息
|
|
57
57
|
*/
|
|
58
58
|
| 'chooseAvatar';
|
|
59
|
-
export interface
|
|
59
|
+
export interface SmartOpenTypeProps {
|
|
60
60
|
/**
|
|
61
61
|
* 打开 `APP` 时,向 `APP` 传递的参数
|
|
62
62
|
*
|
|
@@ -122,17 +122,17 @@ export interface VantOpenTypeProps {
|
|
|
122
122
|
*/
|
|
123
123
|
showMessageCard?: string;
|
|
124
124
|
}
|
|
125
|
-
export interface
|
|
126
|
-
appParameter?:
|
|
127
|
-
lang?:
|
|
128
|
-
sessionFrom?:
|
|
129
|
-
businessId?:
|
|
130
|
-
sendMessageTitle?:
|
|
131
|
-
sendMessagePath?:
|
|
132
|
-
sendMessageImg?:
|
|
133
|
-
showMessageCard?:
|
|
125
|
+
export interface SmartOpenTypeCamelCaseProps {
|
|
126
|
+
appParameter?: SmartOpenTypeProps['appParameter'];
|
|
127
|
+
lang?: SmartOpenTypeProps['lang'];
|
|
128
|
+
sessionFrom?: SmartOpenTypeProps['sessionFrom'];
|
|
129
|
+
businessId?: SmartOpenTypeProps['businessId'];
|
|
130
|
+
sendMessageTitle?: SmartOpenTypeProps['sendMessageTitle'];
|
|
131
|
+
sendMessagePath?: SmartOpenTypeProps['sendMessagePath'];
|
|
132
|
+
sendMessageImg?: SmartOpenTypeProps['sendMessageImg'];
|
|
133
|
+
showMessageCard?: SmartOpenTypeProps['showMessageCard'];
|
|
134
134
|
}
|
|
135
|
-
export interface
|
|
135
|
+
export interface SmartOpenTypeEvents {
|
|
136
136
|
/**
|
|
137
137
|
* 用户点击该按钮时,会返回获取到的用户信息,
|
|
138
138
|
* 从返回参数的`detail`中获取到的值同`wx.getUserInfo`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartComponent } from '../base';
|
|
2
|
+
export interface SmartBatteryProps {
|
|
3
3
|
/**
|
|
4
4
|
* 横向展示还是竖向展示
|
|
5
5
|
*
|
|
@@ -55,4 +55,4 @@ export interface VantBatteryProps {
|
|
|
55
55
|
*/
|
|
56
56
|
onCalcColor?: () => string;
|
|
57
57
|
}
|
|
58
|
-
export type
|
|
58
|
+
export type SmartBattery = SmartComponent<SmartBatteryProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartOpenTypeProps, SmartBaseExternalClassName, SmartBaseLoadingExternalClassName, SmartComponent, SmartEventHandler, SmartTouchEvent } from '../base';
|
|
2
|
+
export interface SmartButtonProps extends SmartOpenTypeProps {
|
|
3
3
|
/** 标识符 */
|
|
4
4
|
id?: string;
|
|
5
5
|
/**
|
|
@@ -32,7 +32,7 @@ export interface VantButtonProps extends VantOpenTypeProps {
|
|
|
32
32
|
rightIcon?: string;
|
|
33
33
|
/**
|
|
34
34
|
* 图标类名前缀,同`Icon`组件的`classPrefix`属性
|
|
35
|
-
* @default '
|
|
35
|
+
* @default 'smart-icon'
|
|
36
36
|
*/
|
|
37
37
|
classPrefix?: string;
|
|
38
38
|
/**
|
|
@@ -98,12 +98,12 @@ export interface VantButtonProps extends VantOpenTypeProps {
|
|
|
98
98
|
*/
|
|
99
99
|
customStyle?: string;
|
|
100
100
|
}
|
|
101
|
-
export interface
|
|
101
|
+
export interface SmartButtonEvents {
|
|
102
102
|
/**
|
|
103
103
|
* 点击按钮,且按钮状态不为加载或禁用时触发
|
|
104
104
|
*/
|
|
105
|
-
onClick?:
|
|
105
|
+
onClick?: SmartEventHandler<SmartTouchEvent>;
|
|
106
106
|
}
|
|
107
|
-
export interface
|
|
107
|
+
export interface SmartButtonExternalClassName extends SmartBaseExternalClassName, SmartBaseLoadingExternalClassName {
|
|
108
108
|
}
|
|
109
|
-
export type
|
|
109
|
+
export type SmartButton = SmartComponent<SmartButtonProps, SmartButtonEvents, SmartButtonExternalClassName>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="miniprogram-api-typings" />
|
|
3
|
-
import {
|
|
3
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
4
4
|
export interface Day {
|
|
5
5
|
/**
|
|
6
6
|
* 日期对应的 Date 对象
|
|
@@ -37,7 +37,7 @@ export interface Day {
|
|
|
37
37
|
footer?: React.ReactNode;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
export interface
|
|
40
|
+
export interface SmartCalendarPoppableProps {
|
|
41
41
|
/**
|
|
42
42
|
* 当`Canlendar`的`poppable`为`true`时有效
|
|
43
43
|
*
|
|
@@ -79,7 +79,7 @@ export interface VantCalendarPoppableProps {
|
|
|
79
79
|
*/
|
|
80
80
|
safeAreaInsetBottom?: boolean;
|
|
81
81
|
}
|
|
82
|
-
export interface
|
|
82
|
+
export interface SmartCalendarRangeProps {
|
|
83
83
|
/**
|
|
84
84
|
* `Calendar`的`type`为`range`时有效
|
|
85
85
|
*
|
|
@@ -111,7 +111,7 @@ export interface VantCalendarRangeProps {
|
|
|
111
111
|
*/
|
|
112
112
|
allowSameDay?: boolean;
|
|
113
113
|
}
|
|
114
|
-
export interface
|
|
114
|
+
export interface SmartCalendarProps extends SmartCalendarRangeProps, SmartCalendarPoppableProps {
|
|
115
115
|
/**
|
|
116
116
|
* 选择类型
|
|
117
117
|
*
|
|
@@ -221,39 +221,39 @@ export interface VantCalendarProps extends VantCalendarRangeProps, VantCalendarP
|
|
|
221
221
|
*/
|
|
222
222
|
readonly?: boolean;
|
|
223
223
|
}
|
|
224
|
-
export interface
|
|
224
|
+
export interface SmartCalendarEvents {
|
|
225
225
|
/**
|
|
226
226
|
* 点击任意日期时触发
|
|
227
227
|
*/
|
|
228
|
-
onSelect?:
|
|
228
|
+
onSelect?: SmartEventHandler<Date | Date[]>;
|
|
229
229
|
/**
|
|
230
230
|
* 当`Calendar`的`type`为`multiple`时,点击已选中的日期时触发
|
|
231
231
|
*/
|
|
232
|
-
onUnselect?:
|
|
232
|
+
onUnselect?: SmartEventHandler<Date>;
|
|
233
233
|
/**
|
|
234
234
|
* 日期选择完成后触发,若`show-confirm`为`true`,则点击确认按钮后触发
|
|
235
235
|
*/
|
|
236
|
-
onConfirm?:
|
|
236
|
+
onConfirm?: SmartEventHandler<Date | Date[]>;
|
|
237
237
|
/**
|
|
238
238
|
* 打开弹出层时触发
|
|
239
239
|
*/
|
|
240
|
-
onOpen?:
|
|
240
|
+
onOpen?: SmartEventHandler;
|
|
241
241
|
/**
|
|
242
242
|
* 关闭弹出层时触发
|
|
243
243
|
*/
|
|
244
|
-
onClose?:
|
|
244
|
+
onClose?: SmartEventHandler;
|
|
245
245
|
/**
|
|
246
246
|
* 打开弹出层且动画结束后触发
|
|
247
247
|
*/
|
|
248
|
-
onOpened?:
|
|
248
|
+
onOpened?: SmartEventHandler;
|
|
249
249
|
/**
|
|
250
250
|
* 关闭弹出层且动画结束后触发
|
|
251
251
|
*/
|
|
252
|
-
onClosed?:
|
|
252
|
+
onClosed?: SmartEventHandler;
|
|
253
253
|
/**
|
|
254
254
|
* 范围选择超过最多可选天数时触发
|
|
255
255
|
*/
|
|
256
|
-
onOverRange?:
|
|
256
|
+
onOverRange?: SmartEventHandler;
|
|
257
257
|
/**
|
|
258
258
|
* 点击日历副标题时触发
|
|
259
259
|
*
|
|
@@ -261,4 +261,4 @@ export interface VantCalendarEvents {
|
|
|
261
261
|
*/
|
|
262
262
|
onClickSubtitle?: (e: WechatMiniprogram.CustomEvent<WechatMiniprogram.TouchEvent>) => void;
|
|
263
263
|
}
|
|
264
|
-
export type
|
|
264
|
+
export type SmartCalendar = SmartComponent<SmartCalendarProps, SmartCalendarEvents>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
3
3
|
export interface CascaderOption {
|
|
4
4
|
/**
|
|
5
5
|
* 选项文字
|
|
@@ -26,7 +26,7 @@ export interface CascaderOption {
|
|
|
26
26
|
*/
|
|
27
27
|
className?: string;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface SmartCascaderProps {
|
|
30
30
|
/**
|
|
31
31
|
* 顶部标题
|
|
32
32
|
*/
|
|
@@ -83,8 +83,20 @@ export interface VantCascaderProps {
|
|
|
83
83
|
* @default false
|
|
84
84
|
*/
|
|
85
85
|
useTitleSlot?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* 是否省略过长的标题文字
|
|
88
|
+
*
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
ellipsis?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* 滚动阈值,标签数量超过阈值且总宽度超过标签栏宽度时开始横向滚动
|
|
94
|
+
*
|
|
95
|
+
* @default 5
|
|
96
|
+
*/
|
|
97
|
+
swipeThreshold?: number;
|
|
86
98
|
}
|
|
87
|
-
export interface
|
|
99
|
+
export interface SmartCascaderData {
|
|
88
100
|
/**
|
|
89
101
|
* 当前操作选中的值
|
|
90
102
|
*
|
|
@@ -99,7 +111,7 @@ export interface VantCascaderData {
|
|
|
99
111
|
*/
|
|
100
112
|
tabIndex: number;
|
|
101
113
|
}
|
|
102
|
-
export interface
|
|
114
|
+
export interface SmartCascaderTabData {
|
|
103
115
|
/**
|
|
104
116
|
* 当前点击标签的文字
|
|
105
117
|
*
|
|
@@ -110,25 +122,25 @@ export interface VantCascaderTabData {
|
|
|
110
122
|
*/
|
|
111
123
|
tabIndex: number;
|
|
112
124
|
}
|
|
113
|
-
export interface
|
|
125
|
+
export interface SmartCascaderEvents {
|
|
114
126
|
/**
|
|
115
127
|
* 点击单元格时触发
|
|
116
128
|
*/
|
|
117
|
-
onChange?:
|
|
129
|
+
onChange?: SmartEventHandler<SmartCascaderData>;
|
|
118
130
|
/**
|
|
119
131
|
* 全部选项选择完成后触发
|
|
120
132
|
*/
|
|
121
|
-
onFinish?:
|
|
133
|
+
onFinish?: SmartEventHandler<SmartCascaderData>;
|
|
122
134
|
/**
|
|
123
135
|
* 点击关闭图标时触发
|
|
124
136
|
*/
|
|
125
|
-
onClose?:
|
|
137
|
+
onClose?: SmartEventHandler<null>;
|
|
126
138
|
/**
|
|
127
139
|
* 点击标签时触发
|
|
128
140
|
*/
|
|
129
|
-
onClickTab?:
|
|
141
|
+
onClickTab?: SmartEventHandler<SmartCascaderTabData>;
|
|
130
142
|
}
|
|
131
|
-
export interface
|
|
143
|
+
export interface SmartCascaderSlot {
|
|
132
144
|
slot?: {
|
|
133
145
|
/**
|
|
134
146
|
* 自定义标题,当 useTitleSlot 属性为 true 时生效
|
|
@@ -136,4 +148,4 @@ export interface VantCascaderSlot {
|
|
|
136
148
|
title?: React.ReactNode;
|
|
137
149
|
};
|
|
138
150
|
}
|
|
139
|
-
export type
|
|
151
|
+
export type SmartCascader = SmartComponent<SmartCascaderProps, SmartCascaderEvents, SmartCascaderSlot>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TouchPositionDetail,
|
|
3
|
-
export interface
|
|
2
|
+
import { TouchPositionDetail, SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
3
|
+
export interface SmartCellProps {
|
|
4
4
|
/**
|
|
5
5
|
* 左侧图标名称或图片链接,可选值见 Icon 组件
|
|
6
6
|
*/
|
|
@@ -78,13 +78,13 @@ export interface VantCellProps {
|
|
|
78
78
|
*/
|
|
79
79
|
titleStyle?: string;
|
|
80
80
|
}
|
|
81
|
-
export interface
|
|
81
|
+
export interface SmartCellEvents {
|
|
82
82
|
/**
|
|
83
83
|
* 点击单元格时触发
|
|
84
84
|
*/
|
|
85
|
-
onClick?:
|
|
85
|
+
onClick?: SmartEventHandler<TouchPositionDetail>;
|
|
86
86
|
}
|
|
87
|
-
export interface
|
|
87
|
+
export interface SmartCellExternalClassName extends SmartBaseExternalClassName {
|
|
88
88
|
/**
|
|
89
89
|
* 标题样式类
|
|
90
90
|
*/
|
|
@@ -98,7 +98,7 @@ export interface VantCellExternalClassName extends VantBaseExternalClassName {
|
|
|
98
98
|
*/
|
|
99
99
|
valueClass?: string;
|
|
100
100
|
}
|
|
101
|
-
export interface
|
|
101
|
+
export interface SmartCellSlot {
|
|
102
102
|
/**
|
|
103
103
|
* 自定义 value 显示内容,如果设置了 value 属性则不生效
|
|
104
104
|
*/
|
|
@@ -125,4 +125,4 @@ export interface VantCellSlot {
|
|
|
125
125
|
rightIcon?: React.ReactNode;
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
export type
|
|
128
|
+
export type SmartCell = SmartComponent<SmartCellProps, SmartCellEvents, SmartCellExternalClassName, SmartCellSlot>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartBaseExternalClassName, SmartComponent } from '../base';
|
|
2
|
+
export interface SmartCellGroupProps {
|
|
3
3
|
/**
|
|
4
4
|
* 分组标题
|
|
5
5
|
*/
|
|
@@ -17,5 +17,5 @@ export interface VantCellGroupProps {
|
|
|
17
17
|
*/
|
|
18
18
|
border?: boolean;
|
|
19
19
|
}
|
|
20
|
-
export type
|
|
21
|
-
export type
|
|
20
|
+
export type SmartCellGroupExternalClassName = SmartBaseExternalClassName;
|
|
21
|
+
export type SmartCellGroup = SmartComponent<SmartCellGroupProps, {}, SmartCellGroupExternalClassName>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import {
|
|
2
|
+
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
3
3
|
interface OtherProps {
|
|
4
4
|
/**
|
|
5
5
|
* 形状
|
|
@@ -50,28 +50,28 @@ interface OtherProps {
|
|
|
50
50
|
*/
|
|
51
51
|
iconSize?: string | number;
|
|
52
52
|
}
|
|
53
|
-
interface
|
|
53
|
+
interface SmartCheckboxPropsWithName extends OtherProps {
|
|
54
54
|
name: string;
|
|
55
55
|
dataName: string;
|
|
56
56
|
}
|
|
57
|
-
interface
|
|
57
|
+
interface SmartCheckboxPropsWithoutName extends OtherProps {
|
|
58
58
|
name?: never;
|
|
59
59
|
dataName?: string;
|
|
60
60
|
}
|
|
61
|
-
export type
|
|
61
|
+
export type SmartCheckboxProps = SmartCheckboxPropsWithName | SmartCheckboxPropsWithoutName;
|
|
62
62
|
/**
|
|
63
63
|
* @deprecated
|
|
64
64
|
*/
|
|
65
|
-
export interface
|
|
65
|
+
export interface SmartCheckboxChangeEvent extends WechatMiniprogram.BaseEvent {
|
|
66
66
|
detail: boolean;
|
|
67
67
|
}
|
|
68
|
-
export interface
|
|
68
|
+
export interface SmartCheckboxEvents {
|
|
69
69
|
/**
|
|
70
70
|
* 当绑定值变化时触发的事件
|
|
71
71
|
*/
|
|
72
|
-
onChange?:
|
|
72
|
+
onChange?: SmartEventHandler<boolean>;
|
|
73
73
|
}
|
|
74
|
-
export interface
|
|
74
|
+
export interface SmartCheckboxExternalClassName extends SmartBaseExternalClassName {
|
|
75
75
|
/**
|
|
76
76
|
* 图标样式类
|
|
77
77
|
*/
|
|
@@ -81,5 +81,5 @@ export interface VantCheckboxExternalClassName extends VantBaseExternalClassName
|
|
|
81
81
|
*/
|
|
82
82
|
labelClass?: string;
|
|
83
83
|
}
|
|
84
|
-
export type
|
|
84
|
+
export type SmartCheckbox = SmartComponent<SmartCheckboxProps, SmartCheckboxEvents, SmartCheckboxExternalClassName>;
|
|
85
85
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
2
|
+
export interface SmartCheckboxGroupProps {
|
|
3
3
|
/**
|
|
4
4
|
* 在表单内提交时的标识符
|
|
5
5
|
*/
|
|
@@ -29,10 +29,10 @@ export interface VantCheckboxGroupProps {
|
|
|
29
29
|
*/
|
|
30
30
|
direction?: 'horizontal' | 'vertical';
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface SmartCheckboxGroupEvents {
|
|
33
33
|
/**
|
|
34
34
|
* 当绑定值变化时触发的事件
|
|
35
35
|
*/
|
|
36
|
-
onChange?:
|
|
36
|
+
onChange?: SmartEventHandler<string[]>;
|
|
37
37
|
}
|
|
38
|
-
export type
|
|
38
|
+
export type SmartCheckboxGroup = SmartComponent<SmartCheckboxGroupProps, SmartCheckboxGroupEvents>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartComponent } from '../base';
|
|
2
|
+
export interface SmartCircleProps {
|
|
3
3
|
/**
|
|
4
4
|
* 目标进度
|
|
5
5
|
*
|
|
@@ -55,4 +55,4 @@ export interface VantCircleProps {
|
|
|
55
55
|
*/
|
|
56
56
|
clockwise?: boolean;
|
|
57
57
|
}
|
|
58
|
-
export type
|
|
58
|
+
export type SmartCircle = SmartComponent<SmartCircleProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartBaseExternalClassName, SmartComponent } from '../base';
|
|
2
|
+
export interface SmartColProps {
|
|
3
3
|
/**
|
|
4
4
|
* 列元素宽度
|
|
5
5
|
*/
|
|
@@ -9,5 +9,5 @@ export interface VantColProps {
|
|
|
9
9
|
*/
|
|
10
10
|
offset?: string | number;
|
|
11
11
|
}
|
|
12
|
-
export type
|
|
13
|
-
export type
|
|
12
|
+
export type SmartColExternalClassName = SmartBaseExternalClassName;
|
|
13
|
+
export type SmartCol = SmartComponent<SmartColProps, {}, SmartColExternalClassName>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
3
|
+
export interface SmartCollapseProps {
|
|
4
4
|
/**
|
|
5
5
|
* 当前展开面板的 `name`
|
|
6
6
|
*
|
|
@@ -25,7 +25,7 @@ export interface VantCollapseProps {
|
|
|
25
25
|
/**
|
|
26
26
|
* @deprecated
|
|
27
27
|
*/
|
|
28
|
-
export interface
|
|
28
|
+
export interface SmartCollapseBaseEvent extends WechatMiniprogram.BaseEvent {
|
|
29
29
|
/**
|
|
30
30
|
* 当前打开的面板 name
|
|
31
31
|
*/
|
|
@@ -34,7 +34,7 @@ export interface VantCollapseBaseEvent extends WechatMiniprogram.BaseEvent {
|
|
|
34
34
|
/**
|
|
35
35
|
* @deprecated
|
|
36
36
|
*/
|
|
37
|
-
export interface
|
|
37
|
+
export interface SmartCollapseChangeEvent extends WechatMiniprogram.BaseEvent {
|
|
38
38
|
/**
|
|
39
39
|
* 手风琴模式时,为 name
|
|
40
40
|
*
|
|
@@ -42,19 +42,19 @@ export interface VantCollapseChangeEvent extends WechatMiniprogram.BaseEvent {
|
|
|
42
42
|
*/
|
|
43
43
|
detail: string | string[];
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface SmartCollapseEvents {
|
|
46
46
|
/**
|
|
47
47
|
* 切换面板时触发
|
|
48
48
|
*/
|
|
49
|
-
onChange?:
|
|
49
|
+
onChange?: SmartEventHandler<string | string[]>;
|
|
50
50
|
/**
|
|
51
51
|
* 展开面板时触发
|
|
52
52
|
*/
|
|
53
|
-
onOpen?:
|
|
53
|
+
onOpen?: SmartEventHandler<string>;
|
|
54
54
|
/**
|
|
55
55
|
* 关闭面板时触发
|
|
56
56
|
*/
|
|
57
|
-
onClose?:
|
|
57
|
+
onClose?: SmartEventHandler<string>;
|
|
58
58
|
}
|
|
59
|
-
export type
|
|
60
|
-
export type
|
|
59
|
+
export type SmartCollapseExternalClassName = SmartBaseExternalClassName;
|
|
60
|
+
export type SmartCollapse = SmartComponent<SmartCollapseProps, SmartCollapseEvents, SmartCollapseExternalClassName>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartBaseExternalClassName, SmartComponent } from '../base';
|
|
2
|
+
export interface SmartCollapseItemProps {
|
|
3
3
|
/**
|
|
4
4
|
* 唯一标识符,默认为索引值
|
|
5
5
|
*
|
|
@@ -53,10 +53,10 @@ export interface VantCollapseItemProps {
|
|
|
53
53
|
*/
|
|
54
54
|
size?: 'large';
|
|
55
55
|
}
|
|
56
|
-
export interface
|
|
56
|
+
export interface SmartCollapseItemExternalClassName extends SmartBaseExternalClassName {
|
|
57
57
|
/**
|
|
58
58
|
* 内容样式类
|
|
59
59
|
*/
|
|
60
60
|
contentClass?: string;
|
|
61
61
|
}
|
|
62
|
-
export type
|
|
62
|
+
export type SmartCollapseItem = SmartComponent<SmartCollapseItemProps, {}, SmartCollapseItemExternalClassName>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SmartComponent } from '../base';
|
|
2
2
|
import { ThemeVars } from './theme-vars';
|
|
3
|
-
export interface
|
|
3
|
+
export interface SmartConfigProviderProps {
|
|
4
4
|
/**
|
|
5
5
|
* 自定义主题变量
|
|
6
6
|
*/
|
|
7
7
|
themeVars?: Partial<ThemeVars>;
|
|
8
8
|
}
|
|
9
|
-
export type
|
|
9
|
+
export type SmartConfigProvider = SmartComponent<SmartConfigProviderProps>;
|