@tarojs/components 3.5.0-canary.0 → 3.5.0-canary.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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-ad-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-input-core.cjs.entry.js +15 -4
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-live-player-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-map-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-match-media-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-navigator-core.cjs.entry.js +10 -6
- package/dist/cjs/taro-official-account-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-page-container-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +7 -3
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +3 -3
- package/dist/cjs/taro-share-element-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-slot-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +10 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +37 -31
- package/dist/cjs/taro-textarea-core.cjs.entry.js +3 -3
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +19 -0
- package/dist/collection/collection-manifest.json +20 -4
- package/dist/collection/components/ad/ad.js +11 -0
- package/dist/collection/components/ad-custom/ad-custom.js +11 -0
- package/dist/collection/components/editor/editor.js +11 -0
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +11 -0
- package/dist/collection/components/image/image.js +1 -1
- package/dist/collection/components/image/style/index.css +2 -2
- package/dist/collection/components/input/input.js +29 -4
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +11 -0
- package/dist/collection/components/live-player/live-player.js +11 -0
- package/dist/collection/components/live-pusher/live-pusher.js +11 -0
- package/dist/collection/components/map/map.js +11 -0
- package/dist/collection/components/match-media/match-media.js +11 -0
- package/dist/collection/components/{movable-view → movable-area}/movable-area.js +0 -0
- package/dist/collection/components/{movable-view → movable-area}/movable-view.js +0 -0
- package/dist/collection/components/navigation-bar/navigation-bar.js +11 -0
- package/dist/collection/components/navigator/navigator.js +1 -1
- package/dist/collection/components/official-account/official-account.js +11 -0
- package/dist/collection/components/page-container/page-container.js +11 -0
- package/dist/collection/components/page-meta/page-meta.js +11 -0
- package/dist/collection/components/{picker-view-column → picker-view}/picker-view-column.js +0 -0
- package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.js +1 -1
- package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/style/index.css +0 -0
- package/dist/collection/components/scroll-view/scroll-view.js +3 -3
- package/dist/collection/components/share-element/share-element.js +11 -0
- package/dist/collection/components/slot/slot.js +11 -0
- package/dist/collection/components/swiper/swiper.js +10 -1
- package/dist/collection/components/tabbar/style/index.css +1 -1
- package/dist/collection/components/tabbar/tabbar.js +10 -4
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/voip-room/voip-room.js +11 -0
- package/dist/collection/utils/index.js +50 -64
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-ad-core.entry.js +15 -0
- package/dist/esm/taro-ad-custom-core.entry.js +15 -0
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-editor-core.entry.js +15 -0
- package/dist/esm/taro-functional-page-navigator-core.entry.js +15 -0
- package/dist/esm/taro-image-core.entry.js +2 -2
- package/dist/esm/taro-input-core.entry.js +15 -4
- package/dist/esm/taro-keyboard-accessory-core.entry.js +15 -0
- package/dist/esm/taro-live-player-core.entry.js +15 -0
- package/dist/esm/taro-live-pusher-core.entry.js +15 -0
- package/dist/esm/taro-map-core.entry.js +15 -0
- package/dist/esm/taro-match-media-core.entry.js +15 -0
- package/dist/esm/taro-navigation-bar-core.entry.js +15 -0
- package/dist/esm/taro-navigator-core.entry.js +1 -1
- package/dist/esm/taro-official-account-core.entry.js +15 -0
- package/dist/esm/taro-page-container-core.entry.js +15 -0
- package/dist/esm/taro-page-meta-core.entry.js +15 -0
- package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm/taro-scroll-view-core.entry.js +3 -3
- package/dist/esm/taro-share-element-core.entry.js +15 -0
- package/dist/esm/taro-slot-core.entry.js +15 -0
- package/dist/esm/taro-swiper-core_2.entry.js +10 -1
- package/dist/esm/taro-tabbar.entry.js +12 -10
- package/dist/esm/taro-textarea-core.entry.js +3 -3
- package/dist/esm/taro-voip-room-core.entry.js +15 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-ad-core.entry.js +1 -0
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -0
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-editor-core.entry.js +1 -0
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -0
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -0
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -0
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -0
- package/dist/esm-es5/taro-map-core.entry.js +1 -0
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -0
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -0
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -0
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -0
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -0
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -0
- package/dist/esm-es5/taro-slot-core.entry.js +1 -0
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js +1 -0
- package/dist/taro-components/p-0303f9e0.entry.js +1 -0
- package/dist/taro-components/p-0472e474.system.entry.js +1 -0
- package/dist/taro-components/p-04818461.system.entry.js +1 -0
- package/dist/taro-components/p-065ec61d.entry.js +1 -0
- package/dist/taro-components/p-06af26db.system.entry.js +1 -0
- package/dist/taro-components/p-0c2982fc.system.entry.js +1 -0
- package/dist/taro-components/p-0ee69803.entry.js +1 -0
- package/dist/taro-components/p-14dbbb42.entry.js +1 -0
- package/dist/taro-components/p-15bea37d.entry.js +1 -0
- package/dist/taro-components/p-2d2f8064.entry.js +1 -0
- package/dist/taro-components/{p-627a5064.system.entry.js → p-2dc57c71.system.entry.js} +1 -1
- package/dist/taro-components/{p-64993f48.entry.js → p-32937866.entry.js} +1 -1
- package/dist/taro-components/p-3334ac67.system.entry.js +1 -0
- package/dist/taro-components/p-336f2b2a.system.entry.js +1 -0
- package/dist/taro-components/p-33ee636a.system.js +1 -1
- package/dist/taro-components/p-3c0230ba.entry.js +1 -0
- package/dist/taro-components/p-3dfb1807.entry.js +1 -0
- package/dist/taro-components/p-527a38ee.system.entry.js +1 -0
- package/dist/taro-components/p-56618f09.entry.js +1 -0
- package/dist/taro-components/p-59d38db0.entry.js +1 -0
- package/dist/taro-components/{p-12ae0a33.entry.js → p-63ff7fa7.entry.js} +1 -1
- package/dist/taro-components/p-7423fc3b.system.entry.js +1 -0
- package/dist/taro-components/p-7721e046.entry.js +1 -0
- package/dist/taro-components/p-7cdad34e.system.entry.js +1 -0
- package/dist/taro-components/p-8b2bf902.system.entry.js +1 -0
- package/dist/taro-components/p-92e95d3f.entry.js +1 -0
- package/dist/taro-components/p-94502fc3.entry.js +1 -0
- package/dist/taro-components/p-98b47fc9.system.entry.js +1 -0
- package/dist/taro-components/p-99cb65a6.system.entry.js +1 -0
- package/dist/taro-components/p-9dc9c615.system.entry.js +1 -0
- package/dist/taro-components/p-9eb7dfa8.entry.js +1 -0
- package/dist/taro-components/p-abe415b4.system.entry.js +1 -0
- package/dist/taro-components/{p-3aac5746.system.entry.js → p-b15d0302.system.entry.js} +1 -1
- package/dist/taro-components/p-b55fedc1.entry.js +1 -0
- package/dist/taro-components/p-b6d6c744.entry.js +1 -0
- package/dist/taro-components/p-b87cf623.entry.js +1 -0
- package/dist/taro-components/p-cb395e7d.entry.js +1 -0
- package/dist/taro-components/{p-6965567d.entry.js → p-cc818a13.entry.js} +1 -1
- package/dist/taro-components/p-cdffee54.system.entry.js +1 -0
- package/dist/taro-components/p-cf55a63c.entry.js +1 -0
- package/dist/taro-components/p-cfbfeee8.entry.js +1 -0
- package/dist/taro-components/p-d1c2481c.system.entry.js +1 -0
- package/dist/taro-components/p-df5a19b0.system.entry.js +1 -0
- package/dist/taro-components/p-e03fa2d5.system.entry.js +1 -0
- package/dist/taro-components/p-e1040131.entry.js +1 -0
- package/dist/taro-components/p-e2f6448d.system.entry.js +1 -0
- package/dist/taro-components/p-ebf5b2eb.system.entry.js +1 -0
- package/dist/taro-components/p-fcc1c676.system.entry.js +1 -0
- package/dist/taro-components/{p-13c1404f.system.entry.js → p-fd0d1168.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.css +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/ad/ad.d.ts +4 -0
- package/dist/types/components/ad-custom/ad-custom.d.ts +4 -0
- package/dist/types/components/editor/editor.d.ts +4 -0
- package/dist/types/components/functional-page-navigator/functional-page-navigator.d.ts +4 -0
- package/dist/types/components/input/input.d.ts +3 -0
- package/dist/types/components/keyboard-accessory/keyboard-accessory.d.ts +4 -0
- package/dist/types/components/live-player/live-player.d.ts +4 -0
- package/dist/types/components/live-pusher/live-pusher.d.ts +4 -0
- package/dist/types/components/map/map.d.ts +4 -0
- package/dist/types/components/match-media/match-media.d.ts +4 -0
- package/dist/types/components/{movable-view → movable-area}/movable-area.d.ts +0 -0
- package/dist/types/components/{movable-view → movable-area}/movable-view.d.ts +0 -0
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +4 -0
- package/dist/types/components/official-account/official-account.d.ts +4 -0
- package/dist/types/components/page-container/page-container.d.ts +4 -0
- package/dist/types/components/page-meta/page-meta.d.ts +4 -0
- package/dist/types/components/{picker-view-column → picker-view}/picker-view-column.d.ts +0 -0
- package/dist/types/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.d.ts +0 -0
- package/dist/types/components/share-element/share-element.d.ts +4 -0
- package/dist/types/components/slot/slot.d.ts +4 -0
- package/dist/types/components/swiper/swiper.d.ts +1 -0
- package/dist/types/components/tabbar/tabbar.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- package/dist/types/components/voip-room/voip-room.d.ts +4 -0
- package/dist/types/components.d.ts +209 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist-h5/react/index.js +2 -1
- package/dist-h5/vue/components/picker.js +2 -1
- package/package.json +3 -3
- package/types/Ad.d.ts +19 -7
- package/types/AdCustom.d.ts +50 -0
- package/types/Audio.d.ts +22 -2
- package/types/Button.d.ts +87 -14
- package/types/Camera.d.ts +1 -1
- package/types/Canvas.d.ts +14 -1
- package/types/Checkbox.d.ts +65 -1
- package/types/CoverImage.d.ts +50 -8
- package/types/CoverView.d.ts +51 -8
- package/types/Editor.d.ts +57 -0
- package/types/Form.d.ts +33 -2
- package/types/Icon.d.ts +17 -1
- package/types/Image.d.ts +30 -4
- package/types/Input.d.ts +66 -5
- package/types/KeyboardAccessory.d.ts +29 -0
- package/types/Label.d.ts +18 -4
- package/types/LivePlayer.d.ts +7 -1
- package/types/LivePusher.d.ts +7 -1
- package/types/Map.d.ts +55 -1
- package/types/MatchMedia.d.ts +24 -5
- package/types/MovableArea.d.ts +9 -3
- package/types/MovableView.d.ts +21 -7
- package/types/OfficialAccount.d.ts +0 -6
- package/types/OpenData.d.ts +7 -1
- package/types/PageContainer.d.ts +121 -0
- package/types/Picker.d.ts +64 -1
- package/types/PickerView.d.ts +66 -2
- package/types/PickerViewColumn.d.ts +1 -1
- package/types/Progress.d.ts +12 -1
- package/types/Radio.d.ts +77 -1
- package/types/RichText.d.ts +33 -1
- package/types/ScrollView.d.ts +91 -9
- package/types/ShareElement.d.ts +39 -0
- package/types/Slider.d.ts +14 -1
- package/types/Swiper.d.ts +26 -1
- package/types/SwiperItem.d.ts +28 -3
- package/types/Switch.d.ts +21 -3
- package/types/Text.d.ts +38 -1
- package/types/Textarea.d.ts +17 -1
- package/types/Video.d.ts +41 -21
- package/types/View.d.ts +34 -2
- package/types/VoipRoom.d.ts +70 -0
- package/types/WebView.d.ts +7 -1
- package/types/common.d.ts +3 -8
- package/types/index.d.ts +72 -46
- package/virtual-list/react/createListComponent.js +4 -3
- package/dist/taro-components/p-10a6c489.system.entry.js +0 -1
- package/dist/taro-components/p-12638ebc.system.entry.js +0 -1
- package/dist/taro-components/p-2438fcd4.system.entry.js +0 -1
- package/dist/taro-components/p-3eebeb1c.system.entry.js +0 -1
- package/dist/taro-components/p-46cf6431.system.entry.js +0 -1
- package/dist/taro-components/p-66237ac0.entry.js +0 -1
- package/dist/taro-components/p-71de9bd6.entry.js +0 -1
- package/dist/taro-components/p-7a64a3d2.entry.js +0 -1
- package/dist/taro-components/p-b8e0ad7d.entry.js +0 -1
- package/dist/taro-components/p-f98e0224.entry.js +0 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps, CommonEventFunction, BaseEventOrigFunction } from './common'
|
|
3
|
+
|
|
4
|
+
interface PageContainerProps extends StandardProps {
|
|
5
|
+
/** 是否显示容器组件
|
|
6
|
+
* @default false
|
|
7
|
+
* @supported weapp
|
|
8
|
+
*/
|
|
9
|
+
show?: boolean
|
|
10
|
+
|
|
11
|
+
/** 动画时长,单位毫秒
|
|
12
|
+
* @default 300
|
|
13
|
+
* @supported weapp
|
|
14
|
+
*/
|
|
15
|
+
duration?: number
|
|
16
|
+
|
|
17
|
+
/** z-index 层级
|
|
18
|
+
* @default 100
|
|
19
|
+
* @supported weapp
|
|
20
|
+
*/
|
|
21
|
+
zIndex?: number
|
|
22
|
+
|
|
23
|
+
/** 是否显示遮罩层
|
|
24
|
+
* @default true
|
|
25
|
+
* @supported weapp
|
|
26
|
+
*/
|
|
27
|
+
overlay?: boolean
|
|
28
|
+
|
|
29
|
+
/** 弹出位置,可选值为 top bottom right center
|
|
30
|
+
* @default bottom
|
|
31
|
+
* @supported weapp
|
|
32
|
+
*/
|
|
33
|
+
position?: keyof PageContainerProps.position
|
|
34
|
+
|
|
35
|
+
/** 是否显示圆角
|
|
36
|
+
* @default false
|
|
37
|
+
* @supported weapp
|
|
38
|
+
*/
|
|
39
|
+
round?: boolean
|
|
40
|
+
|
|
41
|
+
/** 自定义遮罩层样式
|
|
42
|
+
* @default false
|
|
43
|
+
* @supported weapp
|
|
44
|
+
*/
|
|
45
|
+
closeOnSlideDown?: boolean
|
|
46
|
+
|
|
47
|
+
/** 是否在下滑一段距离后关闭
|
|
48
|
+
* @supported weapp
|
|
49
|
+
*/
|
|
50
|
+
overlayStyle?: boolean
|
|
51
|
+
|
|
52
|
+
/** 自定义弹出层样式
|
|
53
|
+
* @supported weapp
|
|
54
|
+
*/
|
|
55
|
+
customStyle?: boolean
|
|
56
|
+
|
|
57
|
+
/** 进入前触发
|
|
58
|
+
* @supported weapp
|
|
59
|
+
*/
|
|
60
|
+
onBeforeEnter?: CommonEventFunction
|
|
61
|
+
|
|
62
|
+
/** 进入中触发
|
|
63
|
+
* @supported weapp
|
|
64
|
+
*/
|
|
65
|
+
onEnter?: CommonEventFunction
|
|
66
|
+
|
|
67
|
+
/** 进入后触发
|
|
68
|
+
* @supported weapp
|
|
69
|
+
*/
|
|
70
|
+
onAfterEnter?: CommonEventFunction
|
|
71
|
+
|
|
72
|
+
/** 离开前触发
|
|
73
|
+
* @supported weapp
|
|
74
|
+
*/
|
|
75
|
+
onBeforeLeave?: CommonEventFunction
|
|
76
|
+
|
|
77
|
+
/** 离开中触发
|
|
78
|
+
* @supported weapp
|
|
79
|
+
*/
|
|
80
|
+
onLeave?: CommonEventFunction
|
|
81
|
+
|
|
82
|
+
/** 离开后触发
|
|
83
|
+
* @supported weapp
|
|
84
|
+
*/
|
|
85
|
+
onAfterLeave?: CommonEventFunction
|
|
86
|
+
|
|
87
|
+
/** 点击遮罩层时触发
|
|
88
|
+
* @supported weapp
|
|
89
|
+
*/
|
|
90
|
+
onClickOverlay?: CommonEventFunction
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare namespace PageContainerProps {
|
|
94
|
+
/** 弹出位置 */
|
|
95
|
+
interface position {
|
|
96
|
+
/** 上方弹出 */
|
|
97
|
+
top
|
|
98
|
+
/** 下方弹出 */
|
|
99
|
+
bottom
|
|
100
|
+
/** 左边弹出 */
|
|
101
|
+
left
|
|
102
|
+
/** 右边弹出 */
|
|
103
|
+
right
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** 页面容器
|
|
108
|
+
*
|
|
109
|
+
* 小程序如果在页面内进行复杂的界面设计(如在页面内弹出半屏的弹窗、在页面内加载一个全屏的子页面等),用户进行返回操作会直接离开当前页面,不符合用户预期,预期应为关闭当前弹出的组件。
|
|
110
|
+
* 为此提供“假页”容器组件,效果类似于 `popup` 弹出层,页面内存在该容器时,当用户进行返回操作,关闭该容器不关闭页面。返回操作包括三种情形,右滑手势、安卓物理返回键和调用 `navigateBack` 接口。
|
|
111
|
+
*
|
|
112
|
+
* Bug & Tip
|
|
113
|
+
* 1. tip: 当前页面最多只有 1 个容器,若已存在容器的情况下,无法增加新的容器
|
|
114
|
+
* 2. tip: wx.navigateBack 无法在页面栈顶调用,此时没有上一级页面
|
|
115
|
+
* @classification viewContainer
|
|
116
|
+
* @supported weapp
|
|
117
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/component/page-container.html
|
|
118
|
+
*/
|
|
119
|
+
declare const PageContainer: ComponentType<PageContainerProps>
|
|
120
|
+
|
|
121
|
+
export { PageContainer, PageContainerProps }
|
package/types/Picker.d.ts
CHANGED
|
@@ -247,7 +247,7 @@ declare namespace PickerRegionProps {
|
|
|
247
247
|
* 从底部弹起的滚动选择器
|
|
248
248
|
* @classification forms
|
|
249
249
|
* @supported weapp, h5, rn, swan, alipay, tt
|
|
250
|
-
* @
|
|
250
|
+
* @example_react
|
|
251
251
|
* ```tsx
|
|
252
252
|
* export default class PagePicker extends Component {
|
|
253
253
|
* state = {
|
|
@@ -314,6 +314,69 @@ declare namespace PickerRegionProps {
|
|
|
314
314
|
* }
|
|
315
315
|
* }
|
|
316
316
|
* ```
|
|
317
|
+
* @example_vue
|
|
318
|
+
* ```html
|
|
319
|
+
* <template>
|
|
320
|
+
* <view class="page-body">
|
|
321
|
+
* <view class="page-section">
|
|
322
|
+
* <text>地区选择器</text>
|
|
323
|
+
* <view>
|
|
324
|
+
* <picker mode="selector" :range="selector" `@change="onChange">
|
|
325
|
+
* <view class="picker">
|
|
326
|
+
* 当前选择:{{selectorChecked}}
|
|
327
|
+
* </view>
|
|
328
|
+
* </picker>
|
|
329
|
+
* </view>
|
|
330
|
+
* </view>
|
|
331
|
+
* <view class="page-section">
|
|
332
|
+
* <text>时间选择器</text>
|
|
333
|
+
* <view>
|
|
334
|
+
* <picker mode="time" `@change="onTimeChange">
|
|
335
|
+
* <view class="picker">
|
|
336
|
+
* 当前选择:{{timeSel}}
|
|
337
|
+
* </view>
|
|
338
|
+
* </picker>
|
|
339
|
+
* </view>
|
|
340
|
+
* </view>
|
|
341
|
+
* <view class="page-section">
|
|
342
|
+
* <text>日期选择器</text>
|
|
343
|
+
* <view>
|
|
344
|
+
* <picker mode="date" `@change="onDateChange">
|
|
345
|
+
* <view class="picker">
|
|
346
|
+
* 当前选择:{{dateSel}}
|
|
347
|
+
* </view>
|
|
348
|
+
* </picker>
|
|
349
|
+
* </view>
|
|
350
|
+
* </view>
|
|
351
|
+
* </view>
|
|
352
|
+
* </template>
|
|
353
|
+
*
|
|
354
|
+
* <script>
|
|
355
|
+
* export default {
|
|
356
|
+
* data() {
|
|
357
|
+
* return {
|
|
358
|
+
* selector: ['美国', '中国', '巴西', '日本'],
|
|
359
|
+
* selectorChecked: '美国',
|
|
360
|
+
* timeSel: '12:01',
|
|
361
|
+
* dateSel: '2018-04-22'
|
|
362
|
+
* }
|
|
363
|
+
* },
|
|
364
|
+
* methods: {
|
|
365
|
+
* onChange: function(e) {
|
|
366
|
+
* this.selectorChecked = this.selector[e.detail.value]
|
|
367
|
+
* },
|
|
368
|
+
*
|
|
369
|
+
* onTimeChange: function(e) {
|
|
370
|
+
* this.timeSel = e.detail.value
|
|
371
|
+
* },
|
|
372
|
+
*
|
|
373
|
+
* onDateChange: function(e) {
|
|
374
|
+
* this.dateSel = e.detail.value
|
|
375
|
+
* }
|
|
376
|
+
* }
|
|
377
|
+
* }
|
|
378
|
+
* </script>
|
|
379
|
+
* ```
|
|
317
380
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker.html
|
|
318
381
|
*/
|
|
319
382
|
declare const Picker: ComponentType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
package/types/PickerView.d.ts
CHANGED
|
@@ -28,6 +28,12 @@ interface PickerViewProps extends StandardProps {
|
|
|
28
28
|
*/
|
|
29
29
|
maskClass?: string
|
|
30
30
|
|
|
31
|
+
/** 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件。
|
|
32
|
+
* @supported weapp
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
immediateChange?: boolean
|
|
36
|
+
|
|
31
37
|
/** 当滚动选择,value 改变时触发 change 事件,event.detail = {value: value};value为数组,表示 picker-view 内的 picker-view-column 当前选择的是第几项(下标从 0 开始)
|
|
32
38
|
* @supported weapp, swan, alipay, tt, rn
|
|
33
39
|
*/
|
|
@@ -53,8 +59,8 @@ declare namespace PickerViewProps {
|
|
|
53
59
|
/** 嵌入页面的滚动选择器
|
|
54
60
|
* 其中只可放置 picker-view-column 组件,其它节点不会显示
|
|
55
61
|
* @classification forms
|
|
56
|
-
* @supported weapp, swan, alipay, tt
|
|
57
|
-
* @
|
|
62
|
+
* @supported weapp, swan, alipay, tt, h5, rn
|
|
63
|
+
* @example_react
|
|
58
64
|
* ```tsx
|
|
59
65
|
* export default class Picks extends Component {
|
|
60
66
|
*
|
|
@@ -125,7 +131,65 @@ declare namespace PickerViewProps {
|
|
|
125
131
|
* )
|
|
126
132
|
* }
|
|
127
133
|
* }
|
|
134
|
+
* ```
|
|
135
|
+
* @example_vue
|
|
136
|
+
* ```html
|
|
137
|
+
* <template>
|
|
138
|
+
* <view class="taro-example">
|
|
139
|
+
* <view>{{year}}年{{month}}月{{day}}日</view>
|
|
140
|
+
* <picker-view indicator-style="height: 30px;" style="width: 100%; height: 300px;" :value="value" `@change="onChange">
|
|
141
|
+
* <picker-view-column>
|
|
142
|
+
* <view v-for="(item, index) in years" :key="index">{{item}}年</view>
|
|
143
|
+
* </picker-view-column>
|
|
144
|
+
* <picker-view-column>
|
|
145
|
+
* <view v-for="(item, index) in months" :key="index">{{item}}月</view>
|
|
146
|
+
* </picker-view-column>
|
|
147
|
+
* <picker-view-column>
|
|
148
|
+
* <view v-for="(item, index) in days" :key="index">{{item}}日</view>
|
|
149
|
+
* </picker-view-column>
|
|
150
|
+
* </picker-view>
|
|
151
|
+
* </view>
|
|
152
|
+
* </template>
|
|
128
153
|
*
|
|
154
|
+
* <script>
|
|
155
|
+
* export default {
|
|
156
|
+
* name: "Index",
|
|
157
|
+
* data() {
|
|
158
|
+
* const date = new Date()
|
|
159
|
+
* const years = []
|
|
160
|
+
* const months = []
|
|
161
|
+
* const days = []
|
|
162
|
+
* for (let i = 1990; i <= date.getFullYear(); i++) {
|
|
163
|
+
* years.push(i)
|
|
164
|
+
* }
|
|
165
|
+
* for (let i = 1; i <= 12; i++) {
|
|
166
|
+
* months.push(i)
|
|
167
|
+
* }
|
|
168
|
+
* for (let i = 1; i <= 31; i++) {
|
|
169
|
+
* days.push(i)
|
|
170
|
+
* }
|
|
171
|
+
* return {
|
|
172
|
+
* years: years,
|
|
173
|
+
* year: date.getFullYear(),
|
|
174
|
+
* months: months,
|
|
175
|
+
* month: 2,
|
|
176
|
+
* days: days,
|
|
177
|
+
* day: 2,
|
|
178
|
+
* value: [3, 1, 1]
|
|
179
|
+
* }
|
|
180
|
+
* },
|
|
181
|
+
*
|
|
182
|
+
* methods: {
|
|
183
|
+
* onChange: function(e) {
|
|
184
|
+
* const val = e.detail.value
|
|
185
|
+
* console.log(val)
|
|
186
|
+
* this.year = this.years[val[0]]
|
|
187
|
+
* this.month = this.months[val[1]]
|
|
188
|
+
* this.day = this.days[val[2]]
|
|
189
|
+
* }
|
|
190
|
+
* }
|
|
191
|
+
* }
|
|
192
|
+
* </script>
|
|
129
193
|
* ```
|
|
130
194
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view.html
|
|
131
195
|
*/
|
|
@@ -4,7 +4,7 @@ import { StandardProps, CommonEventFunction } from './common'
|
|
|
4
4
|
/** 滚动选择器子项
|
|
5
5
|
* 仅可放置于 `<PickerView />` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致
|
|
6
6
|
* @classification forms
|
|
7
|
-
* @supported weapp, swan, alipay, tt
|
|
7
|
+
* @supported weapp, swan, alipay, tt, rn
|
|
8
8
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html
|
|
9
9
|
*/
|
|
10
10
|
declare const PickerViewColumn: ComponentType<StandardProps>
|
package/types/Progress.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ interface ProgressProps extends StandardProps {
|
|
|
78
78
|
/** 进度条。组件属性的长度单位默认为 px
|
|
79
79
|
* @classification base
|
|
80
80
|
* @supported weapp, swan, alipay, tt, h5, rn
|
|
81
|
-
* @
|
|
81
|
+
* @example_react
|
|
82
82
|
* ```tsx
|
|
83
83
|
* export default class PageView extends Component {
|
|
84
84
|
* constructor() {
|
|
@@ -97,6 +97,17 @@ interface ProgressProps extends StandardProps {
|
|
|
97
97
|
* }
|
|
98
98
|
* }
|
|
99
99
|
* ```
|
|
100
|
+
* @example_vue
|
|
101
|
+
* ```html
|
|
102
|
+
* <template>
|
|
103
|
+
* <view class="components-page">
|
|
104
|
+
* <progress percent="20" stroke-width="2" :show-info="true" />
|
|
105
|
+
* <progress percent="40" stroke-width="2" :active="true" />
|
|
106
|
+
* <progress percent="60" stroke-width="2" :active="true" />
|
|
107
|
+
* <progress percent="80" stroke-width="2" :active="true" active-color="blue" />
|
|
108
|
+
* </view>
|
|
109
|
+
* </template>
|
|
110
|
+
* ```
|
|
100
111
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/progress.html
|
|
101
112
|
*/
|
|
102
113
|
declare const Progress: ComponentType<ProgressProps>
|
package/types/Radio.d.ts
CHANGED
|
@@ -24,12 +24,17 @@ interface RadioProps extends StandardProps {
|
|
|
24
24
|
* @supported weapp, rn
|
|
25
25
|
*/
|
|
26
26
|
color?: string
|
|
27
|
+
|
|
28
|
+
/** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
|
|
29
|
+
* @supported h5
|
|
30
|
+
*/
|
|
31
|
+
nativeProps?: Record<string, unknown>
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
/** 单选项目
|
|
30
35
|
* @classification forms
|
|
31
36
|
* @supported weapp, h5, rn
|
|
32
|
-
* @
|
|
37
|
+
* @example_react
|
|
33
38
|
* ```tsx
|
|
34
39
|
* export default class PageRadio extends Component {
|
|
35
40
|
* state = {
|
|
@@ -96,6 +101,77 @@ interface RadioProps extends StandardProps {
|
|
|
96
101
|
* }
|
|
97
102
|
* }
|
|
98
103
|
* ```
|
|
104
|
+
* @example_vue
|
|
105
|
+
* ```html
|
|
106
|
+
* <template>
|
|
107
|
+
* <view class="container">
|
|
108
|
+
* <view class="page-section">
|
|
109
|
+
* <text>默认样式</text>
|
|
110
|
+
* <radio value="选中" :checked="true">选中</radio>
|
|
111
|
+
* <radio style="margin-left: 20rpx;" value="未选中">未选中</radio>
|
|
112
|
+
* </view>
|
|
113
|
+
* <view class="page-section">
|
|
114
|
+
* <text>推荐展示样式(Taro 团队成员):</text>
|
|
115
|
+
* <radio-group `@change="onChange">
|
|
116
|
+
* <label v-for="item in list" class="checkbox-list__label">
|
|
117
|
+
* <radio class="checkbox-list__checkbox" :value="item.value" :checked="item.checked">{{ item.text }}</radio>
|
|
118
|
+
* </label>
|
|
119
|
+
* </radio-group>
|
|
120
|
+
* </view>
|
|
121
|
+
* </view>
|
|
122
|
+
* </template>
|
|
123
|
+
*
|
|
124
|
+
* <script>
|
|
125
|
+
* export default {
|
|
126
|
+
* data() {
|
|
127
|
+
* return {
|
|
128
|
+
* list: [
|
|
129
|
+
* {
|
|
130
|
+
* value: 'yuche',
|
|
131
|
+
* text: 'yuche',
|
|
132
|
+
* checked: false
|
|
133
|
+
* },
|
|
134
|
+
* {
|
|
135
|
+
* value: 'cjj',
|
|
136
|
+
* text: 'cjj',
|
|
137
|
+
* checked: false
|
|
138
|
+
* },
|
|
139
|
+
* {
|
|
140
|
+
* value: 'xiexiaoli',
|
|
141
|
+
* text: 'xiexiaoli',
|
|
142
|
+
* checked: false
|
|
143
|
+
* },
|
|
144
|
+
* {
|
|
145
|
+
* value: 'honly',
|
|
146
|
+
* text: 'honly',
|
|
147
|
+
* checked: false
|
|
148
|
+
* },
|
|
149
|
+
* {
|
|
150
|
+
* value: 'cs',
|
|
151
|
+
* text: 'cs',
|
|
152
|
+
* checked: false
|
|
153
|
+
* },
|
|
154
|
+
* {
|
|
155
|
+
* value: 'zhutianjian',
|
|
156
|
+
* text: 'zhutianjian',
|
|
157
|
+
* checked: false
|
|
158
|
+
* },
|
|
159
|
+
* {
|
|
160
|
+
* value: '隔壁老李',
|
|
161
|
+
* text: '隔壁老李',
|
|
162
|
+
* checked: true
|
|
163
|
+
* }
|
|
164
|
+
* ]
|
|
165
|
+
* }
|
|
166
|
+
* },
|
|
167
|
+
* methods: {
|
|
168
|
+
* onChange: function(e) {
|
|
169
|
+
* console.log(e.detail.value)
|
|
170
|
+
* }
|
|
171
|
+
* }
|
|
172
|
+
* }
|
|
173
|
+
* </script>
|
|
174
|
+
* ```
|
|
99
175
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/radio.html
|
|
100
176
|
*/
|
|
101
177
|
declare const Radio: ComponentType<RadioProps>
|
package/types/RichText.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ declare namespace RichTextProps {
|
|
|
65
65
|
/** 富文本
|
|
66
66
|
* @classification base
|
|
67
67
|
* @supported weapp, swan, alipay, tt, h5, rn
|
|
68
|
-
* @
|
|
68
|
+
* @example_react
|
|
69
69
|
* ```tsx
|
|
70
70
|
* class App extends Components {
|
|
71
71
|
* state = {
|
|
@@ -88,6 +88,38 @@ declare namespace RichTextProps {
|
|
|
88
88
|
* }
|
|
89
89
|
* }
|
|
90
90
|
* ```
|
|
91
|
+
* @example_vue
|
|
92
|
+
* ```html
|
|
93
|
+
* <template>
|
|
94
|
+
* <view class="components-page">
|
|
95
|
+
* <rich-text :nodes="nodes"></rich-text>
|
|
96
|
+
* </view>
|
|
97
|
+
* </template>
|
|
98
|
+
*
|
|
99
|
+
* <script>
|
|
100
|
+
* export default {
|
|
101
|
+
* name: 'Index',
|
|
102
|
+
* data() {
|
|
103
|
+
* return {
|
|
104
|
+
* nodes: [{
|
|
105
|
+
* name: 'div',
|
|
106
|
+
* attrs: {
|
|
107
|
+
* class: 'div_class',
|
|
108
|
+
* style: 'line-height: 60px; color: red;'
|
|
109
|
+
* },
|
|
110
|
+
* children: [{
|
|
111
|
+
* type: 'text',
|
|
112
|
+
* text: 'Hello World!'
|
|
113
|
+
* }]
|
|
114
|
+
* }]
|
|
115
|
+
* }
|
|
116
|
+
* },
|
|
117
|
+
* onReady () {
|
|
118
|
+
* console.log('onReady')
|
|
119
|
+
* }
|
|
120
|
+
* }
|
|
121
|
+
* </script>
|
|
122
|
+
* ```
|
|
91
123
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html
|
|
92
124
|
*/
|
|
93
125
|
declare const RichText: ComponentType<RichTextProps>
|
package/types/ScrollView.d.ts
CHANGED
|
@@ -98,31 +98,31 @@ interface ScrollViewProps extends StandardProps {
|
|
|
98
98
|
refresherTriggered?: boolean
|
|
99
99
|
|
|
100
100
|
/** 启用 scroll-view 增强特性
|
|
101
|
-
* @supported weapp
|
|
101
|
+
* @supported weapp
|
|
102
102
|
* @default false
|
|
103
103
|
*/
|
|
104
104
|
enhanced?: boolean
|
|
105
105
|
|
|
106
106
|
/** iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效)
|
|
107
|
-
* @supported weapp
|
|
107
|
+
* @supported weapp
|
|
108
108
|
* @default true
|
|
109
109
|
*/
|
|
110
110
|
bounces?: boolean
|
|
111
111
|
|
|
112
112
|
/** 滚动条显隐控制 (同时开启 enhanced 属性后生效)
|
|
113
|
-
* @supported weapp
|
|
113
|
+
* @supported weapp
|
|
114
114
|
* @default true
|
|
115
115
|
*/
|
|
116
116
|
showScrollbar?: boolean
|
|
117
117
|
|
|
118
118
|
/** 分页滑动效果 (同时开启 enhanced 属性后生效)
|
|
119
|
-
* @supported weapp
|
|
119
|
+
* @supported weapp
|
|
120
120
|
* @default false
|
|
121
121
|
*/
|
|
122
122
|
pagingEnabled?: boolean
|
|
123
123
|
|
|
124
124
|
/** boolean false 滑动减速速率控制 (同时开启 enhanced 属性后生效)
|
|
125
|
-
* @supported weapp
|
|
125
|
+
* @supported weapp
|
|
126
126
|
* @default false
|
|
127
127
|
*/
|
|
128
128
|
fastDeceleration?: boolean
|
|
@@ -164,17 +164,17 @@ interface ScrollViewProps extends StandardProps {
|
|
|
164
164
|
onRefresherAbort?: CommonEventFunction
|
|
165
165
|
|
|
166
166
|
/** 滑动开始事件 (同时开启 enhanced 属性后生效)
|
|
167
|
-
* @supported weapp
|
|
167
|
+
* @supported weapp
|
|
168
168
|
*/
|
|
169
169
|
onDragStart?: CommonEventFunction
|
|
170
170
|
|
|
171
171
|
/** 滑动事件 (同时开启 enhanced 属性后生效)
|
|
172
|
-
* @supported weapp
|
|
172
|
+
* @supported weapp
|
|
173
173
|
*/
|
|
174
174
|
onDragging?: CommonEventFunction
|
|
175
175
|
|
|
176
176
|
/** 滑动结束事件 (同时开启 enhanced 属性后生效)
|
|
177
|
-
* @supported weapp
|
|
177
|
+
* @supported weapp
|
|
178
178
|
*/
|
|
179
179
|
onDragEnd?: CommonEventFunction
|
|
180
180
|
}
|
|
@@ -200,7 +200,8 @@ declare namespace ScrollViewProps {
|
|
|
200
200
|
* H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。
|
|
201
201
|
* 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。
|
|
202
202
|
* @classification viewContainer
|
|
203
|
-
* @
|
|
203
|
+
* @supported weapp, swan, alipay, tt, h5, rn
|
|
204
|
+
* @example_react
|
|
204
205
|
* ```tsx
|
|
205
206
|
* export default class PageView extends Component {
|
|
206
207
|
* constructor() {
|
|
@@ -255,6 +256,87 @@ declare namespace ScrollViewProps {
|
|
|
255
256
|
* }
|
|
256
257
|
* }
|
|
257
258
|
* ```
|
|
259
|
+
* @example_vue
|
|
260
|
+
* ```html
|
|
261
|
+
* <template>
|
|
262
|
+
* <view class="container">
|
|
263
|
+
* <view class="page-body">
|
|
264
|
+
* <view class="page-section">
|
|
265
|
+
* <view class="page-section-title">
|
|
266
|
+
* <text>Vertical Scroll - 纵向滚动</text>
|
|
267
|
+
* </view>
|
|
268
|
+
* <view class="page-section-spacing">
|
|
269
|
+
* <scroll-view :scroll-y="true" style="height: 300rpx;" `@scrolltoupper="upper" `@scrolltolower="lower" `@scroll="scroll" :scroll-into-view="toView" :scroll-top="scrollTop">
|
|
270
|
+
* <view id="demo1" class="scroll-view-item demo-text-1">1</view>
|
|
271
|
+
* <view id="demo2" class="scroll-view-item demo-text-2">2</view>
|
|
272
|
+
* <view id="demo3" class="scroll-view-item demo-text-3">3</view>
|
|
273
|
+
* </scroll-view>
|
|
274
|
+
* </view>
|
|
275
|
+
* </view>
|
|
276
|
+
* <view class="page-section">
|
|
277
|
+
* <view class="page-section-title">
|
|
278
|
+
* <text>Horizontal Scroll - 横向滚动</text>
|
|
279
|
+
* </view>
|
|
280
|
+
* <view class="page-section-spacing">
|
|
281
|
+
* <scroll-view class="scroll-view_H" :scroll-x="true" `@scroll="scroll" style="width: 100%">
|
|
282
|
+
* <view id="demo21" class="scroll-view-item_H demo-text-1">a</view>
|
|
283
|
+
* <view id="demo22" class="scroll-view-item_H demo-text-2">b</view>
|
|
284
|
+
* <view id="demo23" class="scroll-view-item_H demo-text-3">c</view>
|
|
285
|
+
* </scroll-view>
|
|
286
|
+
* </view>
|
|
287
|
+
* </view>
|
|
288
|
+
* </view>
|
|
289
|
+
* </view>
|
|
290
|
+
* </template>
|
|
291
|
+
*
|
|
292
|
+
* <script>
|
|
293
|
+
* const order = ['demo1', 'demo2', 'demo3']
|
|
294
|
+
* export default {
|
|
295
|
+
* name: 'Index',
|
|
296
|
+
* data() {
|
|
297
|
+
* return {
|
|
298
|
+
* scrollTop: 0,
|
|
299
|
+
* toView: 'demo2'
|
|
300
|
+
* }
|
|
301
|
+
* },
|
|
302
|
+
*
|
|
303
|
+
* methods: {
|
|
304
|
+
* upper(e) {
|
|
305
|
+
* console.log('upper:', e)
|
|
306
|
+
* },
|
|
307
|
+
*
|
|
308
|
+
* lower(e) {
|
|
309
|
+
* console.log('lower:', e)
|
|
310
|
+
* },
|
|
311
|
+
*
|
|
312
|
+
* scroll(e) {
|
|
313
|
+
* console.log('scroll:', e)
|
|
314
|
+
* }
|
|
315
|
+
* }
|
|
316
|
+
* }
|
|
317
|
+
* </script>
|
|
318
|
+
*
|
|
319
|
+
* <style>
|
|
320
|
+
* .page-section-spacing{
|
|
321
|
+
* margin-top: 60rpx;
|
|
322
|
+
* }
|
|
323
|
+
* .scroll-view_H{
|
|
324
|
+
* white-space: nowrap;
|
|
325
|
+
* }
|
|
326
|
+
* .scroll-view-item{
|
|
327
|
+
* height: 300rpx;
|
|
328
|
+
* }
|
|
329
|
+
* .scroll-view-item_H{
|
|
330
|
+
* display: inline-block;
|
|
331
|
+
* width: 100%;
|
|
332
|
+
* height: 300rpx;
|
|
333
|
+
* }
|
|
334
|
+
*
|
|
335
|
+
* .demo-text-1 { background: #ccc; }
|
|
336
|
+
* .demo-text-2 { background: #999; }
|
|
337
|
+
* .demo-text-3 { background: #666; }
|
|
338
|
+
* </style>
|
|
339
|
+
* ```
|
|
258
340
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html
|
|
259
341
|
*/
|
|
260
342
|
declare const ScrollView: ComponentType<ScrollViewProps>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
+
|
|
4
|
+
interface ShareElementProps extends StandardProps {
|
|
5
|
+
/** 映射标记
|
|
6
|
+
* @supported weapp
|
|
7
|
+
*/
|
|
8
|
+
key: string
|
|
9
|
+
|
|
10
|
+
/** 是否进行动画
|
|
11
|
+
* @default false
|
|
12
|
+
* @supported weapp
|
|
13
|
+
*/
|
|
14
|
+
transform?: boolean
|
|
15
|
+
|
|
16
|
+
/** 动画时长,单位毫秒
|
|
17
|
+
* @default 300
|
|
18
|
+
* @supported weapp
|
|
19
|
+
*/
|
|
20
|
+
duration?: number
|
|
21
|
+
|
|
22
|
+
/** css缓动函数
|
|
23
|
+
* @default ease-out
|
|
24
|
+
* @supported weapp
|
|
25
|
+
*/
|
|
26
|
+
easingFunction?: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** 共享元素
|
|
30
|
+
*
|
|
31
|
+
* 共享元素是一种动画形式,类似于 [`flutter Hero`](https://flutterchina.club/animations/hero-animations/) 动画,表现为元素像是在页面间穿越一样。该组件需与 [`page-container`](https://developers.weixin.qq.com/miniprogram/dev/component/page-container.html) 组件结合使用。
|
|
32
|
+
* 使用时需在当前页放置 `share-element` 组件,同时在 `page-container` 容器中放置对应的 `share-element` 组件,对应关系通过属性值 key 映射。当设置 `page-container` `显示时,transform` 属性为 `true` 的共享元素会产生动画。当前页面容器退出时,会产生返回动画。
|
|
33
|
+
* @classification viewContainer
|
|
34
|
+
* @supported weapp
|
|
35
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/component/share-element.html
|
|
36
|
+
*/
|
|
37
|
+
declare const ShareElement: ComponentType<ShareElementProps>
|
|
38
|
+
|
|
39
|
+
export { ShareElement, ShareElementProps }
|
package/types/Slider.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ declare namespace SliderProps {
|
|
|
94
94
|
/** 滑动选择器
|
|
95
95
|
* @classification forms
|
|
96
96
|
* @supported weapp, h5, rn, swan, alipay, tt
|
|
97
|
-
* @
|
|
97
|
+
* @example_react
|
|
98
98
|
* ```tsx
|
|
99
99
|
* export default class PageView extends Component {
|
|
100
100
|
* constructor() {
|
|
@@ -115,6 +115,19 @@ declare namespace SliderProps {
|
|
|
115
115
|
* }
|
|
116
116
|
* }
|
|
117
117
|
* ```
|
|
118
|
+
* @example_vue
|
|
119
|
+
* ```html
|
|
120
|
+
* <template>
|
|
121
|
+
* <view class="components-page">
|
|
122
|
+
* <text>设置 step</text>
|
|
123
|
+
* <slider step="1" value="50"/>
|
|
124
|
+
* <text>显示当前 value</text>
|
|
125
|
+
* <slider step="1" value="50" :show-value="true" />
|
|
126
|
+
* <text>设置最小/最大值</text>
|
|
127
|
+
* <slider step="1" value="100" :show-value="true" min="50" max="200"/>
|
|
128
|
+
* </view>
|
|
129
|
+
* </template>
|
|
130
|
+
* ```
|
|
118
131
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/slider.html
|
|
119
132
|
*/
|
|
120
133
|
declare const Slider: ComponentType<SliderProps>
|