@ray-js/smart-ui 1.0.2-beta-2 → 1.0.2-beta-3
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 +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
3
|
+
export interface SmartCountDownProps {
|
|
4
4
|
/**
|
|
5
5
|
* 倒计时时长,单位毫秒
|
|
6
6
|
*/
|
|
@@ -40,7 +40,7 @@ export interface VantCountDownProps {
|
|
|
40
40
|
*/
|
|
41
41
|
useSlot?: boolean;
|
|
42
42
|
}
|
|
43
|
-
export interface
|
|
43
|
+
export interface SmartCountDownTimeData {
|
|
44
44
|
/**
|
|
45
45
|
* 剩余天数
|
|
46
46
|
*/
|
|
@@ -62,20 +62,20 @@ export interface VantCountDownTimeData {
|
|
|
62
62
|
*/
|
|
63
63
|
milliseconds: number;
|
|
64
64
|
}
|
|
65
|
-
export interface
|
|
65
|
+
export interface SmartCountDownEvents {
|
|
66
66
|
/**
|
|
67
67
|
* 倒计时结束时触发
|
|
68
68
|
*/
|
|
69
|
-
onFinish?:
|
|
69
|
+
onFinish?: SmartEventHandler;
|
|
70
70
|
/**
|
|
71
71
|
* 时间变化时触发,仅在开启`use-slot`后才会触发
|
|
72
72
|
*/
|
|
73
|
-
onChange?:
|
|
73
|
+
onChange?: SmartEventHandler<SmartCountDownTimeData>;
|
|
74
74
|
}
|
|
75
|
-
export interface
|
|
75
|
+
export interface SmartCountDownSlot {
|
|
76
76
|
/**
|
|
77
77
|
* 自定义倒计时显示内容,设置了 useSlot 属性为 true 才生效
|
|
78
78
|
*/
|
|
79
79
|
children?: React.ReactNode;
|
|
80
80
|
}
|
|
81
|
-
export type
|
|
81
|
+
export type SmartCountDown = SmartComponent<SmartCountDownProps, SmartCountDownEvents, SmartCountDownSlot>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
3
|
+
export interface SmartCustomKeyboardProps {
|
|
4
4
|
/**
|
|
5
5
|
* 当前值
|
|
6
6
|
*
|
|
@@ -62,24 +62,24 @@ export interface VantCustomKeyboardProps {
|
|
|
62
62
|
*/
|
|
63
63
|
confirmTextStyle?: React.CSSProperties;
|
|
64
64
|
}
|
|
65
|
-
export interface
|
|
65
|
+
export interface SmartCustomKeyboardData {
|
|
66
66
|
/**
|
|
67
67
|
* 当前操作选中的值
|
|
68
68
|
*
|
|
69
69
|
*/
|
|
70
70
|
value: string | number;
|
|
71
71
|
}
|
|
72
|
-
export interface
|
|
72
|
+
export interface SmartCustomKeyboardEvents {
|
|
73
73
|
/**
|
|
74
74
|
* 点击具体数值的回调
|
|
75
75
|
*/
|
|
76
|
-
onChange?:
|
|
76
|
+
onChange?: SmartEventHandler<SmartCustomKeyboardData>;
|
|
77
77
|
/**
|
|
78
78
|
* 确认按钮的回调函数
|
|
79
79
|
*/
|
|
80
|
-
onConfirm?:
|
|
80
|
+
onConfirm?: SmartEventHandler<SmartCustomKeyboardData>;
|
|
81
81
|
}
|
|
82
|
-
export interface
|
|
82
|
+
export interface SmartCustomKeyboardSlot {
|
|
83
83
|
/**
|
|
84
84
|
* 自定义 value 显示内容,如果设置了 value 属性则不生效
|
|
85
85
|
*/
|
|
@@ -94,4 +94,4 @@ export interface VantCustomKeyboardSlot {
|
|
|
94
94
|
customButton?: React.ReactNode;
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
export type
|
|
97
|
+
export type SmartCustomKeyboard = SmartComponent<SmartCustomKeyboardProps, SmartCustomKeyboardEvents, SmartCustomKeyboardSlot>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
3
|
+
export interface SmartDateTimePickerProps {
|
|
4
4
|
/**
|
|
5
5
|
* 当前选中值,当 type 为 time时,请使用 HH:mm 格式传值
|
|
6
6
|
*/
|
|
@@ -112,28 +112,28 @@ export interface VantDateTimePickerProps {
|
|
|
112
112
|
/**
|
|
113
113
|
* @deprecated
|
|
114
114
|
*/
|
|
115
|
-
export interface
|
|
115
|
+
export interface SmartDateTimePickerBaseEvent extends WechatMiniprogram.BaseEvent {
|
|
116
116
|
detail: number;
|
|
117
117
|
}
|
|
118
|
-
export interface
|
|
118
|
+
export interface SmartDateTimePickerEvents {
|
|
119
119
|
/**
|
|
120
120
|
* 当值变化时触发的事件
|
|
121
121
|
*/
|
|
122
|
-
onInput?:
|
|
122
|
+
onInput?: SmartEventHandler<number>;
|
|
123
123
|
/**
|
|
124
124
|
* 当值变化时触发的事件
|
|
125
125
|
*/
|
|
126
|
-
onChange?:
|
|
126
|
+
onChange?: SmartEventHandler<Record<string, any>>;
|
|
127
127
|
/**
|
|
128
128
|
* 点击完成按钮时触发的事件
|
|
129
129
|
*/
|
|
130
|
-
onConfirm?:
|
|
130
|
+
onConfirm?: SmartEventHandler<number>;
|
|
131
131
|
/**
|
|
132
132
|
* 点击取消按钮时触发的事件
|
|
133
133
|
*/
|
|
134
|
-
onCancel?:
|
|
134
|
+
onCancel?: SmartEventHandler;
|
|
135
135
|
}
|
|
136
|
-
export interface
|
|
136
|
+
export interface SmartDateTimePickerExternalClassName {
|
|
137
137
|
/**
|
|
138
138
|
* 选中项样式类
|
|
139
139
|
*/
|
|
@@ -147,4 +147,4 @@ export interface VantDateTimePickerExternalClassName {
|
|
|
147
147
|
*/
|
|
148
148
|
columnClass?: string;
|
|
149
149
|
}
|
|
150
|
-
export type
|
|
150
|
+
export type SmartDateTimePicker = SmartComponent<SmartDateTimePickerProps, SmartDateTimePickerEvents, SmartDateTimePickerExternalClassName>;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
2
|
/// <reference types="miniprogram-api-typings" />
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
export type
|
|
3
|
+
import { SmartDialogProps } from './index';
|
|
4
|
+
type SmartDialogCommonProps = Pick<SmartDialogProps, 'title' | 'width' | 'message' | 'theme' | 'overlay' | 'transition' | 'icon'>;
|
|
5
|
+
export type SmartDialogOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* 内容对齐方式
|
|
8
8
|
*
|
|
9
9
|
* @default 'center'
|
|
10
10
|
*/
|
|
11
|
-
messageAlign?:
|
|
11
|
+
messageAlign?: SmartDialogProps['messageAlign'];
|
|
12
12
|
/**
|
|
13
13
|
* `z-index`层级
|
|
14
14
|
*
|
|
15
15
|
* @default 100
|
|
16
16
|
*/
|
|
17
|
-
zIndex?:
|
|
17
|
+
zIndex?: SmartDialogProps['zIndex'];
|
|
18
18
|
/**
|
|
19
19
|
* 自定义类名,`dialog` 在自定义组件内时无效
|
|
20
20
|
*
|
|
21
21
|
* @default ''
|
|
22
22
|
*/
|
|
23
|
-
className?:
|
|
23
|
+
className?: SmartDialogProps['className'];
|
|
24
24
|
/**
|
|
25
25
|
* 自定义样式
|
|
26
26
|
*
|
|
27
27
|
* @default ''
|
|
28
28
|
*/
|
|
29
|
-
customStyle?:
|
|
29
|
+
customStyle?: SmartDialogProps['customStyle'];
|
|
30
30
|
/**
|
|
31
31
|
* 自定义选择器
|
|
32
32
|
*
|
|
@@ -38,47 +38,47 @@ export type VantDialogOptions = {
|
|
|
38
38
|
*
|
|
39
39
|
* @default true
|
|
40
40
|
*/
|
|
41
|
-
showConfirmButton?:
|
|
41
|
+
showConfirmButton?: SmartDialogProps['showConfirmButton'];
|
|
42
42
|
/**
|
|
43
43
|
* 是否展示取消按钮
|
|
44
44
|
*
|
|
45
45
|
* @default false
|
|
46
46
|
*/
|
|
47
|
-
showCancelButton?:
|
|
47
|
+
showCancelButton?: SmartDialogProps['showCancelButton'];
|
|
48
48
|
/**
|
|
49
49
|
* 确认按钮的文案
|
|
50
50
|
*
|
|
51
51
|
* @default '确认'
|
|
52
52
|
*/
|
|
53
|
-
confirmButtonText?:
|
|
53
|
+
confirmButtonText?: SmartDialogProps['confirmButtonText'];
|
|
54
54
|
/**
|
|
55
55
|
* 取消按钮的文案
|
|
56
56
|
*
|
|
57
57
|
* @default '取消'
|
|
58
58
|
*/
|
|
59
|
-
cancelButtonText?:
|
|
59
|
+
cancelButtonText?: SmartDialogProps['cancelButtonText'];
|
|
60
60
|
/**
|
|
61
61
|
* 自定义遮罩层样式
|
|
62
62
|
*/
|
|
63
|
-
overlayStyle?:
|
|
63
|
+
overlayStyle?: SmartDialogProps['overlayStyle'];
|
|
64
64
|
/**
|
|
65
65
|
* 点击遮罩层时是否关闭弹窗
|
|
66
66
|
*
|
|
67
67
|
* @default false
|
|
68
68
|
*/
|
|
69
|
-
closeOnClickOverlay?:
|
|
69
|
+
closeOnClickOverlay?: SmartDialogProps['closeOnClickOverlay'];
|
|
70
70
|
/**
|
|
71
71
|
* 关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 `Promise`
|
|
72
72
|
*/
|
|
73
|
-
beforeClose?:
|
|
73
|
+
beforeClose?: SmartDialogProps['beforeClose'];
|
|
74
74
|
/**
|
|
75
75
|
* 选择器的选择范围,可以传入自定义组件的 `this` 作为上下文
|
|
76
76
|
*
|
|
77
77
|
* @default 当前页面
|
|
78
78
|
*/
|
|
79
79
|
context?: WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
|
|
80
|
-
} &
|
|
81
|
-
export interface
|
|
80
|
+
} & SmartDialogCommonProps;
|
|
81
|
+
export interface SmartDialogInputOptions extends SmartDialogOptions {
|
|
82
82
|
/**
|
|
83
83
|
* 输入框的值
|
|
84
84
|
*/
|
|
@@ -100,27 +100,27 @@ export interface VantDialogInputOptions extends VantDialogOptions {
|
|
|
100
100
|
*/
|
|
101
101
|
maxlength?: number;
|
|
102
102
|
}
|
|
103
|
-
export interface
|
|
103
|
+
export interface SmartDialogInstance {
|
|
104
104
|
/**
|
|
105
105
|
* 展示弹窗
|
|
106
106
|
*/
|
|
107
|
-
(options:
|
|
107
|
+
(options: SmartDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
|
108
108
|
/**
|
|
109
109
|
* 展示消息提示弹窗
|
|
110
110
|
*/
|
|
111
|
-
alert(options:
|
|
111
|
+
alert(options: SmartDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
|
112
112
|
/**
|
|
113
113
|
* 展示消息确认弹窗
|
|
114
114
|
*/
|
|
115
|
-
confirm(options:
|
|
115
|
+
confirm(options: SmartDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
|
116
116
|
/**
|
|
117
117
|
* 展示输入确认弹窗
|
|
118
118
|
*/
|
|
119
|
-
input(options:
|
|
119
|
+
input(options: SmartDialogInputOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
|
120
120
|
/**
|
|
121
121
|
* 修改默认配置,对所有 `Dialog` 生效
|
|
122
122
|
*/
|
|
123
|
-
setDefaultOptions(options:
|
|
123
|
+
setDefaultOptions(options: SmartDialogOptions): void;
|
|
124
124
|
/**
|
|
125
125
|
* 重置默认配置,对所有 `Dialog` 生效
|
|
126
126
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartComponent, SmartEventHandler, SmartOpenTypeProps, WechatOpenType } from '../base';
|
|
2
|
+
export interface SmartDialogProps extends SmartOpenTypeProps {
|
|
3
3
|
/**
|
|
4
4
|
* 是否显示弹窗
|
|
5
5
|
*/
|
|
@@ -151,18 +151,18 @@ export interface VantDialogProps extends VantOpenTypeProps {
|
|
|
151
151
|
*/
|
|
152
152
|
confirmButtonOpenType?: WechatOpenType;
|
|
153
153
|
}
|
|
154
|
-
export interface
|
|
154
|
+
export interface SmartDialogEvents {
|
|
155
155
|
/**
|
|
156
156
|
* 弹窗关闭时触发
|
|
157
157
|
*/
|
|
158
|
-
onClose?:
|
|
158
|
+
onClose?: SmartEventHandler;
|
|
159
159
|
/**
|
|
160
160
|
* 点击确认按钮时触发
|
|
161
161
|
*/
|
|
162
|
-
onConfirm?:
|
|
162
|
+
onConfirm?: SmartEventHandler;
|
|
163
163
|
/**
|
|
164
164
|
* 点击取消按钮时触发
|
|
165
165
|
*/
|
|
166
|
-
onCancel?:
|
|
166
|
+
onCancel?: SmartEventHandler;
|
|
167
167
|
}
|
|
168
|
-
export type
|
|
168
|
+
export type SmartDialog = SmartComponent<SmartDialogProps, SmartDialogEvents>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartComponent } from '../base';
|
|
2
|
+
export interface SmartDividerProps {
|
|
3
3
|
/**
|
|
4
4
|
* 虚线
|
|
5
5
|
*
|
|
@@ -21,4 +21,4 @@ export interface VantDividerProps {
|
|
|
21
21
|
*/
|
|
22
22
|
customStyle?: string;
|
|
23
23
|
}
|
|
24
|
-
export type
|
|
24
|
+
export type SmartDivider = SmartComponent<SmartDividerProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
3
|
+
export interface SmartDropdownItemOption {
|
|
4
4
|
/**
|
|
5
5
|
* 文字
|
|
6
6
|
*/
|
|
@@ -14,7 +14,7 @@ export interface VantDropdownItemOption {
|
|
|
14
14
|
*/
|
|
15
15
|
icon?: string;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface SmartDropdownItemProps {
|
|
18
18
|
/**
|
|
19
19
|
* 当前选中项对应的 `value`
|
|
20
20
|
*/
|
|
@@ -30,7 +30,7 @@ export interface VantDropdownItemProps {
|
|
|
30
30
|
*
|
|
31
31
|
* @default []
|
|
32
32
|
*/
|
|
33
|
-
options?:
|
|
33
|
+
options?: SmartDropdownItemOption[];
|
|
34
34
|
/**
|
|
35
35
|
* 是否禁用菜单
|
|
36
36
|
*
|
|
@@ -54,39 +54,39 @@ export interface VantDropdownItemProps {
|
|
|
54
54
|
/**
|
|
55
55
|
* @deprecated
|
|
56
56
|
*/
|
|
57
|
-
export interface
|
|
57
|
+
export interface SmartDropdownItemChangeEvent extends WechatMiniprogram.BaseEvent {
|
|
58
58
|
/**
|
|
59
59
|
* 当前选中的 value
|
|
60
60
|
*/
|
|
61
61
|
detail: number | string;
|
|
62
62
|
}
|
|
63
|
-
export interface
|
|
63
|
+
export interface SmartDropdownItemEvents {
|
|
64
64
|
/**
|
|
65
65
|
* 点击选项导致 `value` 变化时触发
|
|
66
66
|
*/
|
|
67
|
-
onChange?:
|
|
67
|
+
onChange?: SmartEventHandler<number | string>;
|
|
68
68
|
/**
|
|
69
69
|
* 打开菜单栏时触发
|
|
70
70
|
*/
|
|
71
|
-
opOpen?:
|
|
71
|
+
opOpen?: SmartEventHandler;
|
|
72
72
|
/**
|
|
73
73
|
* 关闭菜单栏时触发
|
|
74
74
|
*/
|
|
75
|
-
onClose?:
|
|
75
|
+
onClose?: SmartEventHandler;
|
|
76
76
|
/**
|
|
77
77
|
* 打开菜单栏且动画结束后触发
|
|
78
78
|
*/
|
|
79
|
-
opOpened?:
|
|
79
|
+
opOpened?: SmartEventHandler;
|
|
80
80
|
/**
|
|
81
81
|
* 关闭菜单栏且动画结束后触发
|
|
82
82
|
*/
|
|
83
|
-
onClosed?:
|
|
83
|
+
onClosed?: SmartEventHandler;
|
|
84
84
|
/**
|
|
85
85
|
* 下拉菜单打开或者关闭前触发,需要将use-before-toggle属性设置为true
|
|
86
86
|
*/
|
|
87
|
-
onBeforeToggle?:
|
|
87
|
+
onBeforeToggle?: SmartEventHandler<{
|
|
88
88
|
status: boolean;
|
|
89
89
|
callback: (value: boolean) => Promise<boolean>;
|
|
90
90
|
}>;
|
|
91
91
|
}
|
|
92
|
-
export type
|
|
92
|
+
export type SmartDropdownItem = SmartComponent<SmartDropdownItemProps, SmartDropdownItemEvents>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartBaseExternalClassName, SmartComponent } from '../base';
|
|
2
|
+
export interface SmartDropdownMenuProps {
|
|
3
3
|
/**
|
|
4
4
|
* 菜单标题和选项的选中态颜色
|
|
5
5
|
*
|
|
@@ -41,4 +41,4 @@ export interface VantDropdownMenuProps {
|
|
|
41
41
|
*/
|
|
42
42
|
closeOnClickOutside?: boolean;
|
|
43
43
|
}
|
|
44
|
-
export type
|
|
44
|
+
export type SmartDropdownMenu = SmartComponent<SmartDropdownMenuProps, {}, SmartBaseExternalClassName>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartComponent } from '../base';
|
|
2
|
+
export interface SmartEmptyProps {
|
|
3
3
|
/**
|
|
4
4
|
* 图片类型,支持传入图片 URL
|
|
5
5
|
*
|
|
@@ -11,4 +11,4 @@ export interface VantEmptyProps {
|
|
|
11
11
|
*/
|
|
12
12
|
description?: string;
|
|
13
13
|
}
|
|
14
|
-
export type
|
|
14
|
+
export type SmartEmpty = SmartComponent<SmartEmptyProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import { TouchPositionDetail,
|
|
3
|
-
export interface
|
|
2
|
+
import { TouchPositionDetail, SmartComponent, SmartEventHandler } from '../base';
|
|
3
|
+
export interface SmartFieldProps {
|
|
4
4
|
/**
|
|
5
5
|
* 在表单内提交时的标识符
|
|
6
6
|
*/
|
|
@@ -253,69 +253,69 @@ export interface VantFieldProps {
|
|
|
253
253
|
/**
|
|
254
254
|
* @deprecated
|
|
255
255
|
*/
|
|
256
|
-
export interface
|
|
256
|
+
export interface SmartFieldInputEvent extends WechatMiniprogram.BaseEvent {
|
|
257
257
|
detail: string;
|
|
258
258
|
}
|
|
259
|
-
export interface
|
|
259
|
+
export interface SmartFieldFocusEventDetail {
|
|
260
260
|
value: string;
|
|
261
261
|
height: number;
|
|
262
262
|
}
|
|
263
|
-
export interface
|
|
263
|
+
export interface SmartFieldBlurEventDetail {
|
|
264
264
|
value: string;
|
|
265
265
|
cursor: number;
|
|
266
266
|
}
|
|
267
|
-
export interface
|
|
267
|
+
export interface SmartFieldLineChangeEventDetail {
|
|
268
268
|
height: number;
|
|
269
269
|
heightRpx: number;
|
|
270
270
|
lineCount: number;
|
|
271
271
|
}
|
|
272
|
-
export interface
|
|
272
|
+
export interface SmartFieldKeyboardHeightChangeEventDetail {
|
|
273
273
|
height: number;
|
|
274
274
|
duration: number;
|
|
275
275
|
}
|
|
276
|
-
export interface
|
|
276
|
+
export interface SmartFieldEvents {
|
|
277
277
|
/**
|
|
278
278
|
* 输入内容时触发
|
|
279
279
|
*/
|
|
280
|
-
onInput?:
|
|
280
|
+
onInput?: SmartEventHandler<string>;
|
|
281
281
|
/**
|
|
282
282
|
* 输入内容时触发
|
|
283
283
|
*/
|
|
284
|
-
onChange?:
|
|
284
|
+
onChange?: SmartEventHandler<string>;
|
|
285
285
|
/**
|
|
286
286
|
* 点击完成按钮时触发
|
|
287
287
|
*/
|
|
288
|
-
onConfirm?:
|
|
288
|
+
onConfirm?: SmartEventHandler<string>;
|
|
289
289
|
/**
|
|
290
290
|
* 点击尾部图标时触发
|
|
291
291
|
*/
|
|
292
|
-
onClickIcon?:
|
|
292
|
+
onClickIcon?: SmartEventHandler;
|
|
293
293
|
/**
|
|
294
294
|
* 输入框聚焦时触发
|
|
295
295
|
*/
|
|
296
|
-
onFocus?:
|
|
296
|
+
onFocus?: SmartEventHandler<SmartFieldFocusEventDetail>;
|
|
297
297
|
/**
|
|
298
298
|
* 输入框失焦时触发1
|
|
299
299
|
*/
|
|
300
|
-
onBlur?:
|
|
300
|
+
onBlur?: SmartEventHandler<SmartFieldBlurEventDetail>;
|
|
301
301
|
/**
|
|
302
302
|
* 点击清空控件时触发
|
|
303
303
|
*/
|
|
304
|
-
onClear?:
|
|
304
|
+
onClear?: SmartEventHandler;
|
|
305
305
|
/**
|
|
306
306
|
* 点击输入区域时触发
|
|
307
307
|
*/
|
|
308
|
-
onClickInput?:
|
|
308
|
+
onClickInput?: SmartEventHandler<TouchPositionDetail>;
|
|
309
309
|
/**
|
|
310
310
|
* 输入框行数变化时调用,只对 `textarea` 有效
|
|
311
311
|
*/
|
|
312
|
-
onLinechange?:
|
|
312
|
+
onLinechange?: SmartEventHandler<SmartFieldLineChangeEventDetail>;
|
|
313
313
|
/**
|
|
314
314
|
* 键盘高度发生变化的时候触发此事件
|
|
315
315
|
*/
|
|
316
|
-
onKeyboardheightchange?:
|
|
316
|
+
onKeyboardheightchange?: SmartEventHandler<SmartFieldKeyboardHeightChangeEventDetail>;
|
|
317
317
|
}
|
|
318
|
-
export interface
|
|
318
|
+
export interface SmartFieldExternalClassName {
|
|
319
319
|
/**
|
|
320
320
|
* 左侧文本样式类
|
|
321
321
|
*/
|
|
@@ -329,4 +329,4 @@ export interface VantFieldExternalClassName {
|
|
|
329
329
|
*/
|
|
330
330
|
rightIconClass?: string;
|
|
331
331
|
}
|
|
332
|
-
export type
|
|
332
|
+
export type SmartField = SmartComponent<SmartFieldProps, SmartFieldEvents, SmartFieldExternalClassName>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartBaseExternalClassName, SmartComponent } from '../base';
|
|
2
|
+
export interface SmartGridProps {
|
|
3
3
|
/**
|
|
4
4
|
* 列数
|
|
5
5
|
*
|
|
@@ -59,5 +59,5 @@ export interface VantGridProps {
|
|
|
59
59
|
*/
|
|
60
60
|
useSlot?: boolean;
|
|
61
61
|
}
|
|
62
|
-
export type
|
|
63
|
-
export type
|
|
62
|
+
export type SmartGridExternalClassName = SmartBaseExternalClassName;
|
|
63
|
+
export type SmartGrid = SmartComponent<SmartGridProps, {}, SmartGridExternalClassName>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
2
|
+
export interface SmartGridItemProps {
|
|
3
3
|
/**
|
|
4
4
|
* 文字
|
|
5
5
|
*/
|
|
@@ -15,7 +15,7 @@ export interface VantGridItemProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* 第三方图标前缀
|
|
17
17
|
*
|
|
18
|
-
* @default '
|
|
18
|
+
* @default 'smart-icon'
|
|
19
19
|
*/
|
|
20
20
|
iconPrefix?: string;
|
|
21
21
|
/**
|
|
@@ -39,13 +39,13 @@ export interface VantGridItemProps {
|
|
|
39
39
|
*/
|
|
40
40
|
linkyType?: 'redirectTo' | 'switchTab' | 'reLaunch';
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface SmartGridItemEvents {
|
|
43
43
|
/**
|
|
44
44
|
* 点击格子时触发
|
|
45
45
|
*/
|
|
46
|
-
onClick?:
|
|
46
|
+
onClick?: SmartEventHandler;
|
|
47
47
|
}
|
|
48
|
-
export interface
|
|
48
|
+
export interface SmartGridItemExternalClassName extends SmartBaseExternalClassName {
|
|
49
49
|
/**
|
|
50
50
|
* 内容样式类
|
|
51
51
|
*/
|
|
@@ -59,7 +59,7 @@ export interface VantGridItemExternalClassName extends VantBaseExternalClassName
|
|
|
59
59
|
*/
|
|
60
60
|
textClass?: string;
|
|
61
61
|
}
|
|
62
|
-
export interface
|
|
62
|
+
export interface SmartGridItemSlot {
|
|
63
63
|
/**
|
|
64
64
|
* 是否使用自定义内容的插槽
|
|
65
65
|
*
|
|
@@ -67,4 +67,4 @@ export interface VantGridItemSlot {
|
|
|
67
67
|
*/
|
|
68
68
|
useSlot?: boolean;
|
|
69
69
|
}
|
|
70
|
-
export type
|
|
70
|
+
export type SmartGridItem = SmartComponent<SmartGridItemProps, SmartGridItemEvents, SmartGridItemExternalClassName, SmartGridItemSlot>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
2
|
+
export interface SmartIconProps {
|
|
3
3
|
/**
|
|
4
4
|
* 图标名称或图片链接
|
|
5
5
|
*/
|
|
@@ -33,15 +33,15 @@ export interface VantIconProps {
|
|
|
33
33
|
/**
|
|
34
34
|
* 类名前缀
|
|
35
35
|
*
|
|
36
|
-
* @default '
|
|
36
|
+
* @default 'smart-icon'
|
|
37
37
|
*/
|
|
38
38
|
classPrefix?: string;
|
|
39
39
|
}
|
|
40
|
-
export interface
|
|
40
|
+
export interface SmartIconEvents {
|
|
41
41
|
/**
|
|
42
42
|
* 点击图标时触发
|
|
43
43
|
*/
|
|
44
|
-
onClick?:
|
|
44
|
+
onClick?: SmartEventHandler;
|
|
45
45
|
}
|
|
46
|
-
export type
|
|
47
|
-
export type
|
|
46
|
+
export type SmartIconExternalClassName = SmartBaseExternalClassName;
|
|
47
|
+
export type SmartIcon = SmartComponent<SmartIconProps, SmartIconEvents, SmartIconExternalClassName>;
|