@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
package/types/Audio.d.ts
CHANGED
|
@@ -72,6 +72,11 @@ interface AudioProps extends StandardProps {
|
|
|
72
72
|
* @supported weapp, h5, swan
|
|
73
73
|
*/
|
|
74
74
|
onEnded?: CommonEventFunction
|
|
75
|
+
|
|
76
|
+
/** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
|
|
77
|
+
* @supported h5
|
|
78
|
+
*/
|
|
79
|
+
nativeProps?: Record<string, unknown>
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
declare namespace AudioProps {
|
|
@@ -102,7 +107,7 @@ declare namespace AudioProps {
|
|
|
102
107
|
* @classification media
|
|
103
108
|
* @deprecated
|
|
104
109
|
* @supported weapp, h5, swan
|
|
105
|
-
* @
|
|
110
|
+
* @example_react
|
|
106
111
|
* ```tsx
|
|
107
112
|
* export default class PageView extends Component {
|
|
108
113
|
* constructor() {
|
|
@@ -113,7 +118,7 @@ declare namespace AudioProps {
|
|
|
113
118
|
* return (
|
|
114
119
|
* <View className='components-page'>
|
|
115
120
|
* <Audio
|
|
116
|
-
* src='
|
|
121
|
+
* src='https://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46'
|
|
117
122
|
* controls={true}
|
|
118
123
|
* autoplay={false}
|
|
119
124
|
* loop={false}
|
|
@@ -126,6 +131,21 @@ declare namespace AudioProps {
|
|
|
126
131
|
* }
|
|
127
132
|
* }
|
|
128
133
|
* ```
|
|
134
|
+
* @example_vue
|
|
135
|
+
* ```html
|
|
136
|
+
* <template>
|
|
137
|
+
* <view class="components-page">
|
|
138
|
+
* <audio
|
|
139
|
+
* id="video"
|
|
140
|
+
* src="https://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46"
|
|
141
|
+
* :controls="true"
|
|
142
|
+
* :autoplay="false"
|
|
143
|
+
* :loop="false"
|
|
144
|
+
* :muted="true"
|
|
145
|
+
* />
|
|
146
|
+
* </view>
|
|
147
|
+
* </template>
|
|
148
|
+
* ```
|
|
129
149
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/audio.html
|
|
130
150
|
*/
|
|
131
151
|
declare const Audio: ComponentType<AudioProps>
|
package/types/Button.d.ts
CHANGED
|
@@ -4,48 +4,48 @@ import { StyleProp, ViewStyle } from 'react-native'
|
|
|
4
4
|
|
|
5
5
|
interface ButtonProps extends StandardProps {
|
|
6
6
|
/** 按钮的大小
|
|
7
|
-
* @supported weapp, h5, rn
|
|
7
|
+
* @supported weapp, h5, rn, alipay
|
|
8
8
|
* @default default
|
|
9
9
|
*/
|
|
10
10
|
size?: keyof ButtonProps.size
|
|
11
11
|
|
|
12
12
|
/** 按钮的样式类型
|
|
13
|
-
* @supported weapp, h5, rn
|
|
13
|
+
* @supported weapp, h5, rn, alipay
|
|
14
14
|
* @default default
|
|
15
15
|
*/
|
|
16
16
|
type?: keyof ButtonProps.type
|
|
17
17
|
|
|
18
18
|
/** 按钮是否镂空,背景色透明
|
|
19
|
-
* @supported weapp, h5, rn
|
|
19
|
+
* @supported weapp, h5, rn, alipay
|
|
20
20
|
* @default false
|
|
21
21
|
*/
|
|
22
22
|
plain?: boolean
|
|
23
23
|
|
|
24
24
|
/** 是否禁用
|
|
25
|
-
* @supported weapp, h5, rn
|
|
25
|
+
* @supported weapp, h5, rn, alipay
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
28
|
disabled?: boolean
|
|
29
29
|
|
|
30
30
|
/** 名称前是否带 loading 图标
|
|
31
|
-
* @supported weapp, h5, rn
|
|
31
|
+
* @supported weapp, h5, rn, alipay
|
|
32
32
|
* @default false
|
|
33
33
|
*/
|
|
34
34
|
loading?: boolean
|
|
35
35
|
|
|
36
36
|
/** 用于 `<form/>` 组件,点击分别会触发 `<form/>` 组件的 submit/reset 事件
|
|
37
|
-
* @supported weapp
|
|
37
|
+
* @supported weapp, alipay
|
|
38
38
|
*/
|
|
39
39
|
formType?: keyof ButtonProps.formType
|
|
40
40
|
|
|
41
41
|
/** 微信开放能力
|
|
42
|
-
* @supported weapp
|
|
42
|
+
* @supported weapp, alipay, qq
|
|
43
43
|
*/
|
|
44
|
-
openType?: ButtonProps.openType
|
|
44
|
+
openType?: ButtonProps.openType
|
|
45
45
|
|
|
46
46
|
/** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
|
|
47
47
|
* @default button-hover
|
|
48
|
-
* @supported weapp, h5
|
|
48
|
+
* @supported weapp, alipay, h5
|
|
49
49
|
* @rn 支持 hoverStyle 属性,但框架未支持 hoverClass
|
|
50
50
|
*/
|
|
51
51
|
hoverClass?: string
|
|
@@ -58,19 +58,19 @@ interface ButtonProps extends StandardProps {
|
|
|
58
58
|
|
|
59
59
|
/** 指定是否阻止本节点的祖先节点出现点击态
|
|
60
60
|
* @default false
|
|
61
|
-
* @supported weapp
|
|
61
|
+
* @supported weapp, alipay
|
|
62
62
|
*/
|
|
63
63
|
hoverStopPropagation?: boolean
|
|
64
64
|
|
|
65
65
|
/** 按住后多久出现点击态,单位毫秒
|
|
66
66
|
* @default 20
|
|
67
|
-
* @supported weapp, h5, rn
|
|
67
|
+
* @supported weapp, alipay, h5, rn
|
|
68
68
|
*/
|
|
69
69
|
hoverStartTime?: number
|
|
70
70
|
|
|
71
71
|
/** 手指松开后点击态保留时间,单位毫秒
|
|
72
72
|
* @default 70
|
|
73
|
-
* @supported weapp, h5, rn
|
|
73
|
+
* @supported weapp, alipay, h5, rn
|
|
74
74
|
*/
|
|
75
75
|
hoverStayTime?: number
|
|
76
76
|
|
|
@@ -222,7 +222,7 @@ declare namespace ButtonProps {
|
|
|
222
222
|
reset
|
|
223
223
|
}
|
|
224
224
|
/** open-type 的合法值 */
|
|
225
|
-
type openType = keyof openTypeKeys["weapp"] | keyof openTypeKeys["alipay"] |
|
|
225
|
+
type openType = keyof openTypeKeys["weapp"] | keyof openTypeKeys["alipay"] | keyof openTypeKeys["qq"]
|
|
226
226
|
/** open-type 的合法值 */
|
|
227
227
|
interface openTypeKeys {
|
|
228
228
|
weapp: {
|
|
@@ -374,7 +374,7 @@ declare namespace ButtonProps {
|
|
|
374
374
|
/** 按钮
|
|
375
375
|
* @classification forms
|
|
376
376
|
* @supported weapp, h5, rn
|
|
377
|
-
* @
|
|
377
|
+
* @example_react
|
|
378
378
|
* ```tsx
|
|
379
379
|
* export default class PageButton extends Component {
|
|
380
380
|
* state = {
|
|
@@ -447,6 +447,79 @@ declare namespace ButtonProps {
|
|
|
447
447
|
* }
|
|
448
448
|
* }
|
|
449
449
|
* ```
|
|
450
|
+
* @example_vue
|
|
451
|
+
* ```html
|
|
452
|
+
* <template>
|
|
453
|
+
* <view class="container">
|
|
454
|
+
* <button
|
|
455
|
+
* v-for="item in btn"
|
|
456
|
+
* :size="item.size ? item.size : ''"
|
|
457
|
+
* :type="item.type ? item.type : ''"
|
|
458
|
+
* :loading="item.loading ? item.loading : false"
|
|
459
|
+
* :disabled="item.disabled ? item.disabled : false"
|
|
460
|
+
* >
|
|
461
|
+
* {{ item.text }}
|
|
462
|
+
* </button>
|
|
463
|
+
* <button class="btn-max-w" :plain="true" type="primary">按钮</button>
|
|
464
|
+
* <button class="btn-max-w" :plain="true" type="primary" :disabled="true">不可点击的按钮</button>
|
|
465
|
+
* <button class="btn-max-w" :plain="true">按钮</button>
|
|
466
|
+
* <button class="btn-max-w" :plain="true" :disabled="true">按钮</button>
|
|
467
|
+
* <button size="mini" type="primary">按钮</button>
|
|
468
|
+
* <button size="mini" >按钮</button>
|
|
469
|
+
* <button size="mini" type="warn">按钮</button>
|
|
470
|
+
* </view>
|
|
471
|
+
* </template>
|
|
472
|
+
*
|
|
473
|
+
* <script>
|
|
474
|
+
* export default {
|
|
475
|
+
* data() {
|
|
476
|
+
* return {
|
|
477
|
+
* btn: [
|
|
478
|
+
* {
|
|
479
|
+
* text: '页面主操作 Normal',
|
|
480
|
+
* size: 'default',
|
|
481
|
+
* type: 'primary'
|
|
482
|
+
* },
|
|
483
|
+
* {
|
|
484
|
+
* text: '页面主操作 Loading',
|
|
485
|
+
* size: 'default',
|
|
486
|
+
* type: 'primary',
|
|
487
|
+
* loading: true,
|
|
488
|
+
* },
|
|
489
|
+
* {
|
|
490
|
+
* text: '页面主操作 Disabled',
|
|
491
|
+
* size: 'default',
|
|
492
|
+
* type: 'primary',
|
|
493
|
+
* disabled: true,
|
|
494
|
+
* },
|
|
495
|
+
* {
|
|
496
|
+
* text: '页面次要操作 Normal',
|
|
497
|
+
* size: 'default',
|
|
498
|
+
* type: 'default'
|
|
499
|
+
* },
|
|
500
|
+
* {
|
|
501
|
+
* text: '页面次要操作 Disabled',
|
|
502
|
+
* size: 'default',
|
|
503
|
+
* type: 'default',
|
|
504
|
+
* disabled: true,
|
|
505
|
+
* },
|
|
506
|
+
* {
|
|
507
|
+
* text: '警告类操作 Normal',
|
|
508
|
+
* size: 'default',
|
|
509
|
+
* type: 'warn'
|
|
510
|
+
* },
|
|
511
|
+
* {
|
|
512
|
+
* text: '警告类操作 Disabled',
|
|
513
|
+
* size: 'default',
|
|
514
|
+
* type: 'warn',
|
|
515
|
+
* disabled: true,
|
|
516
|
+
* }
|
|
517
|
+
* ]
|
|
518
|
+
* }
|
|
519
|
+
* }
|
|
520
|
+
* }
|
|
521
|
+
* </script>
|
|
522
|
+
* ```
|
|
450
523
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/button.html
|
|
451
524
|
*/
|
|
452
525
|
declare const Button: ComponentType<ButtonProps>
|
package/types/Camera.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ declare namespace CameraProps {
|
|
|
115
115
|
|
|
116
116
|
/** 系统相机
|
|
117
117
|
* @classification media
|
|
118
|
-
* @supported weapp
|
|
118
|
+
* @supported weapp, rn
|
|
119
119
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/camera.html
|
|
120
120
|
*/
|
|
121
121
|
declare const Camera: ComponentType<CameraProps>
|
package/types/Canvas.d.ts
CHANGED
|
@@ -47,6 +47,11 @@ interface CanvasProps extends StandardProps<any, CanvasTouchEvent> {
|
|
|
47
47
|
* @supported weapp
|
|
48
48
|
*/
|
|
49
49
|
onError?: CommonEventFunction<CanvasProps.onErrorEventDetail>
|
|
50
|
+
|
|
51
|
+
/** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
|
|
52
|
+
* @supported h5
|
|
53
|
+
*/
|
|
54
|
+
nativeProps?: Record<string, unknown>
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
declare namespace CanvasProps {
|
|
@@ -60,16 +65,24 @@ declare namespace CanvasProps {
|
|
|
60
65
|
* `<Canvas />` 组件的 RN 版本尚未实现。
|
|
61
66
|
* @classification canvas
|
|
62
67
|
* @supported weapp
|
|
63
|
-
* @
|
|
68
|
+
* @example_react
|
|
64
69
|
* ```tsx
|
|
65
70
|
* class App extends Components {
|
|
66
71
|
* render () {
|
|
72
|
+
* // 如果是支付宝小程序,则要加上 id 属性,值和canvasId一致
|
|
67
73
|
* return (
|
|
68
74
|
* <Canvas style='width: 300px; height: 200px;' canvasId='canvas' />
|
|
69
75
|
* )
|
|
70
76
|
* }
|
|
71
77
|
* }
|
|
72
78
|
* ```
|
|
79
|
+
* @example_vue
|
|
80
|
+
* ```html
|
|
81
|
+
* <template>
|
|
82
|
+
* <!-- 如果是支付宝小程序,则要加上 id 属性,值和canvasId一致 -->
|
|
83
|
+
* <canvas style="width: 300px; height: 200px;" canvas-id="canvas" />
|
|
84
|
+
* </template>
|
|
85
|
+
* ```
|
|
73
86
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html
|
|
74
87
|
*/
|
|
75
88
|
declare const Canvas: ComponentType<CanvasProps>
|
package/types/Checkbox.d.ts
CHANGED
|
@@ -29,12 +29,17 @@ interface CheckboxProps extends StandardProps {
|
|
|
29
29
|
* @supported h5, rn
|
|
30
30
|
*/
|
|
31
31
|
onChange?: CommonEventFunction<{ value: string[] }>
|
|
32
|
+
|
|
33
|
+
/** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
|
|
34
|
+
* @supported h5
|
|
35
|
+
*/
|
|
36
|
+
nativeProps?: Record<string, unknown>
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
/** 多选项目
|
|
35
40
|
* @classification forms
|
|
36
41
|
* @supported weapp, h5, rn
|
|
37
|
-
* @
|
|
42
|
+
* @example_react
|
|
38
43
|
* ```tsx
|
|
39
44
|
* export default class PageCheckbox extends Component {
|
|
40
45
|
* state = {
|
|
@@ -94,6 +99,65 @@ interface CheckboxProps extends StandardProps {
|
|
|
94
99
|
* }
|
|
95
100
|
* }
|
|
96
101
|
* ```
|
|
102
|
+
* @example_vue
|
|
103
|
+
* ```html
|
|
104
|
+
* <template>
|
|
105
|
+
* <view class="container">
|
|
106
|
+
* <view class="page-section">
|
|
107
|
+
* <text>默认样式</text>
|
|
108
|
+
* <checkbox value="选中" :checked="true">选中</checkbox>
|
|
109
|
+
* <checkbox style="margin-left: 20rpx;" value="未选中">未选中</checkbox>
|
|
110
|
+
* </view>
|
|
111
|
+
* <view class="page-section">
|
|
112
|
+
* <text>推荐展示样式(Taro 团队成员):</text>
|
|
113
|
+
* <label v-for="item in list" class="checkbox-list__label">
|
|
114
|
+
* <checkbox class="checkbox-list__checkbox" :value="item.value" :checked="item.checked">{{ item.text }}</checkbox>
|
|
115
|
+
* </label>
|
|
116
|
+
* </view>
|
|
117
|
+
* </view>
|
|
118
|
+
* </template>
|
|
119
|
+
*
|
|
120
|
+
* <script>
|
|
121
|
+
* export default {
|
|
122
|
+
* data() {
|
|
123
|
+
* return {
|
|
124
|
+
* list: [
|
|
125
|
+
* {
|
|
126
|
+
* value: '美国',
|
|
127
|
+
* text: '美国',
|
|
128
|
+
* checked: false
|
|
129
|
+
* },
|
|
130
|
+
* {
|
|
131
|
+
* value: '中国',
|
|
132
|
+
* text: '中国',
|
|
133
|
+
* checked: true
|
|
134
|
+
* },
|
|
135
|
+
* {
|
|
136
|
+
* value: '巴西',
|
|
137
|
+
* text: '巴西',
|
|
138
|
+
* checked: false
|
|
139
|
+
* },
|
|
140
|
+
* {
|
|
141
|
+
* value: '日本',
|
|
142
|
+
* text: '日本',
|
|
143
|
+
* checked: false
|
|
144
|
+
* },
|
|
145
|
+
* {
|
|
146
|
+
* value: '英国',
|
|
147
|
+
* text: '英国',
|
|
148
|
+
* checked: false
|
|
149
|
+
* },
|
|
150
|
+
* {
|
|
151
|
+
* value: '法国',
|
|
152
|
+
* text: '法国',
|
|
153
|
+
* checked: false
|
|
154
|
+
* }
|
|
155
|
+
* ]
|
|
156
|
+
* }
|
|
157
|
+
* }
|
|
158
|
+
* }
|
|
159
|
+
* </script>
|
|
160
|
+
* ```
|
|
97
161
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/checkbox.html
|
|
98
162
|
*/
|
|
99
163
|
declare const Checkbox: ComponentType<CheckboxProps>
|
package/types/CoverImage.d.ts
CHANGED
|
@@ -3,39 +3,81 @@ import { StandardProps, CommonEventFunction } from './common'
|
|
|
3
3
|
|
|
4
4
|
interface CoverImageProps extends StandardProps {
|
|
5
5
|
/** 图标路径,支持临时路径、网络地址、云文件ID。暂不支持base64格式。
|
|
6
|
-
* @supported weapp
|
|
6
|
+
* @supported weapp, h5
|
|
7
7
|
*/
|
|
8
8
|
src: string
|
|
9
9
|
|
|
10
10
|
/** 图片加载成功时触发
|
|
11
|
-
* @supported weapp
|
|
11
|
+
* @supported weapp, h5
|
|
12
12
|
*/
|
|
13
13
|
onLoad?: CommonEventFunction
|
|
14
14
|
|
|
15
15
|
/** 图片加载失败时触发
|
|
16
|
-
* @supported weapp
|
|
16
|
+
* @supported weapp, h5
|
|
17
17
|
*/
|
|
18
18
|
onError?: CommonEventFunction
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/** 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。
|
|
22
22
|
* @classification viewContainer
|
|
23
|
-
* @supported weapp, swan, alipay
|
|
24
|
-
* @
|
|
23
|
+
* @supported weapp, swan, alipay, h5
|
|
24
|
+
* @example_react
|
|
25
25
|
* ```tsx
|
|
26
|
+
* // js
|
|
26
27
|
* class App extends Components {
|
|
27
28
|
* render () {
|
|
28
29
|
* return (
|
|
30
|
+
* <View className='container'>
|
|
29
31
|
* <Video id='myVideo' src='src'>
|
|
30
|
-
* <CoverView
|
|
31
|
-
* <CoverView
|
|
32
|
-
* <CoverImage
|
|
32
|
+
* <CoverView className='controls'>
|
|
33
|
+
* <CoverView className='play' onClick='play'>
|
|
34
|
+
* <CoverImage className='img' src='src' />
|
|
33
35
|
* </CoverView>
|
|
34
36
|
* </CoverView>
|
|
35
37
|
* </Video>
|
|
36
38
|
* )
|
|
37
39
|
* }
|
|
38
40
|
* }
|
|
41
|
+
* // css
|
|
42
|
+
* .container {
|
|
43
|
+
* position: relative;
|
|
44
|
+
* }
|
|
45
|
+
* .controls {
|
|
46
|
+
* position: absolute;
|
|
47
|
+
* top: 50%;
|
|
48
|
+
* left: 50%;
|
|
49
|
+
* width: 300px;
|
|
50
|
+
* height: 225px;
|
|
51
|
+
* transform: translate(-50%, -50%);
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
* @example_vue
|
|
55
|
+
* ```html
|
|
56
|
+
* <template>
|
|
57
|
+
* <view class="container">
|
|
58
|
+
* <video id='myvideo' src='https://ugccsy.qq.com/uwMROfz2r5zBIaQXGdGnC2dfDma3J1MItM3912IN4IRQvkRM/o31507f7lcd.mp4?sdtfrom=v1010&guid=aa18cf106b7fdb7e40f2d20b206f2b4f&vkey=63B0FCCC7FC3ADC342C166D86571AE02772258CD9B515B065DC68DF3919D8C288AE831D570ED5E8FE0FF3E81E170D04FF11F874BFDDACF7AAA2C0CFF2ACB39FB1A94DAD1AB859BDA53E4DD6DBCDC1217CEF789A9AC079924E2BBC599EED7A1FFDD60A727F2EB7E7B6472CE63DD4B683C9199DFC78A6A6C4D9891E05467C4B64E'>
|
|
59
|
+
* </video>
|
|
60
|
+
* <cover-view class='controls'>
|
|
61
|
+
* <cover-view class='play' `@tap='play'>
|
|
62
|
+
* <cover-image class='img' src='https://img10.360buyimg.com/ling/s345x208_jfs/t1/133501/7/9865/382161/5f5ee31fEbdd6a418/0cdc0156ffff3c23.png' />
|
|
63
|
+
* </cover-view>
|
|
64
|
+
* </cover-view>
|
|
65
|
+
* </view>
|
|
66
|
+
* </template>
|
|
67
|
+
*
|
|
68
|
+
* <style>
|
|
69
|
+
* .container {
|
|
70
|
+
* position: relative;
|
|
71
|
+
* }
|
|
72
|
+
* .controls {
|
|
73
|
+
* position: absolute;
|
|
74
|
+
* top: 50%;
|
|
75
|
+
* left: 50%;
|
|
76
|
+
* width: 300px;
|
|
77
|
+
* height: 225px;
|
|
78
|
+
* transform: translate(-50%, -50%);
|
|
79
|
+
* }
|
|
80
|
+
* </style>
|
|
39
81
|
* ```
|
|
40
82
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/cover-image.html
|
|
41
83
|
*/
|
package/types/CoverView.d.ts
CHANGED
|
@@ -21,22 +21,65 @@ interface CoverViewProps extends ViewProps {
|
|
|
21
21
|
|
|
22
22
|
/** 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。
|
|
23
23
|
* @classification viewContainer
|
|
24
|
-
* @supported weapp, swan, alipay
|
|
25
|
-
* @
|
|
24
|
+
* @supported weapp, swan, alipay, h5
|
|
25
|
+
* @example_react
|
|
26
26
|
* ```tsx
|
|
27
|
+
* // js
|
|
27
28
|
* class App extends Components {
|
|
28
29
|
* render () {
|
|
29
30
|
* return (
|
|
30
|
-
* <
|
|
31
|
-
* <
|
|
32
|
-
* <CoverView
|
|
33
|
-
* <
|
|
31
|
+
* <View className='container'>
|
|
32
|
+
* <Video id='myVideo' src='src'>
|
|
33
|
+
* <CoverView className='controls'>
|
|
34
|
+
* <CoverView className='play' onClick='play'>
|
|
35
|
+
* <CoverImage className='img' src='src' />
|
|
36
|
+
* </CoverView>
|
|
34
37
|
* </CoverView>
|
|
35
|
-
* </
|
|
36
|
-
* </
|
|
38
|
+
* </Video>
|
|
39
|
+
* </View>
|
|
37
40
|
* )
|
|
38
41
|
* }
|
|
39
42
|
* }
|
|
43
|
+
* // css
|
|
44
|
+
* .container {
|
|
45
|
+
* position: relative;
|
|
46
|
+
* }
|
|
47
|
+
* .controls {
|
|
48
|
+
* position: absolute;
|
|
49
|
+
* top: 50%;
|
|
50
|
+
* left: 50%;
|
|
51
|
+
* width: 300px;
|
|
52
|
+
* height: 225px;
|
|
53
|
+
* transform: translate(-50%, -50%);
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
* @example_vue
|
|
57
|
+
* ```html
|
|
58
|
+
* <template>
|
|
59
|
+
* <view class="container">
|
|
60
|
+
* <video id='myvideo' src='https://ugccsy.qq.com/uwMROfz2r5zBIaQXGdGnC2dfDma3J1MItM3912IN4IRQvkRM/o31507f7lcd.mp4?sdtfrom=v1010&guid=aa18cf106b7fdb7e40f2d20b206f2b4f&vkey=63B0FCCC7FC3ADC342C166D86571AE02772258CD9B515B065DC68DF3919D8C288AE831D570ED5E8FE0FF3E81E170D04FF11F874BFDDACF7AAA2C0CFF2ACB39FB1A94DAD1AB859BDA53E4DD6DBCDC1217CEF789A9AC079924E2BBC599EED7A1FFDD60A727F2EB7E7B6472CE63DD4B683C9199DFC78A6A6C4D9891E05467C4B64E'>
|
|
61
|
+
* </video>
|
|
62
|
+
* <cover-view class='controls'>
|
|
63
|
+
* <cover-view class='play' `@tap='play'>
|
|
64
|
+
* <cover-image class='img' src='https://img10.360buyimg.com/ling/s345x208_jfs/t1/133501/7/9865/382161/5f5ee31fEbdd6a418/0cdc0156ffff3c23.png' />
|
|
65
|
+
* </cover-view>
|
|
66
|
+
* </cover-view>
|
|
67
|
+
* </view>
|
|
68
|
+
* </template>
|
|
69
|
+
*
|
|
70
|
+
* <style>
|
|
71
|
+
* .container {
|
|
72
|
+
* position: relative;
|
|
73
|
+
* }
|
|
74
|
+
* .controls {
|
|
75
|
+
* position: absolute;
|
|
76
|
+
* top: 50%;
|
|
77
|
+
* left: 50%;
|
|
78
|
+
* width: 300px;
|
|
79
|
+
* height: 225px;
|
|
80
|
+
* transform: translate(-50%, -50%);
|
|
81
|
+
* }
|
|
82
|
+
* </style>
|
|
40
83
|
* ```
|
|
41
84
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/cover-view.html
|
|
42
85
|
*/
|
package/types/Editor.d.ts
CHANGED
|
@@ -79,6 +79,63 @@ declare namespace EditorProps {
|
|
|
79
79
|
* *编辑器内支持部分 HTML 标签和内联样式,不支持 **class** 和 **id***
|
|
80
80
|
* @classification forms
|
|
81
81
|
* @supported weapp
|
|
82
|
+
* @example_react
|
|
83
|
+
* ```tsx
|
|
84
|
+
* class App extends Components {
|
|
85
|
+
* state = {
|
|
86
|
+
* placeholder: '来,输入隔壁的名字试试...'
|
|
87
|
+
* }
|
|
88
|
+
*
|
|
89
|
+
* editorReady = e => {
|
|
90
|
+
* Taro.createSelectorQuery().select('#editor').context((res) => {
|
|
91
|
+
* this.editorCtx = res.context
|
|
92
|
+
* }).exec()
|
|
93
|
+
* }
|
|
94
|
+
*
|
|
95
|
+
* undo = e => {
|
|
96
|
+
* this.editorCtx.undo()
|
|
97
|
+
* }
|
|
98
|
+
*
|
|
99
|
+
* render () {
|
|
100
|
+
* return (
|
|
101
|
+
* <View>
|
|
102
|
+
* <Editor id='editor' className='editor' placeholder={this.state.placeholder} onReady={this.editorReady}></Editor>
|
|
103
|
+
* <Button type='warn' onClick={this.undo}>撤销</Button>
|
|
104
|
+
* </View>
|
|
105
|
+
* )
|
|
106
|
+
* }
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
* @example_vue
|
|
110
|
+
* ```html
|
|
111
|
+
* <template>
|
|
112
|
+
* <view class="container">
|
|
113
|
+
* <editor id="editor" class="editor" :placeholder="placeholder" `@ready="editorReady"></editor>
|
|
114
|
+
* <button type="warn" `@tap="undo">撤销</button>
|
|
115
|
+
* </view>
|
|
116
|
+
* </template>
|
|
117
|
+
*
|
|
118
|
+
* <script>
|
|
119
|
+
* import Taro from '@tarojs/taro'
|
|
120
|
+
* export default {
|
|
121
|
+
* data() {
|
|
122
|
+
* return {
|
|
123
|
+
* placeholder: '来,输入隔壁的名字试试...'
|
|
124
|
+
* }
|
|
125
|
+
* },
|
|
126
|
+
* methods: {
|
|
127
|
+
* editorReady() {
|
|
128
|
+
* Taro.createSelectorQuery().select('#editor').context((res) => {
|
|
129
|
+
* this.editorCtx = res.context
|
|
130
|
+
* }).exec()
|
|
131
|
+
* },
|
|
132
|
+
* undo() {
|
|
133
|
+
* this.editorCtx.undo()
|
|
134
|
+
* }
|
|
135
|
+
* }
|
|
136
|
+
* }
|
|
137
|
+
* </script>
|
|
138
|
+
* ```
|
|
82
139
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/editor.html
|
|
83
140
|
*/
|
|
84
141
|
declare const Editor: ComponentType<EditorProps>
|
package/types/Form.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ interface FormProps extends StandardProps {
|
|
|
20
20
|
|
|
21
21
|
/** 携带 form 中的数据触发 submit 事件
|
|
22
22
|
* event.detail = { value : {'name': 'value'} , formId: '' }
|
|
23
|
-
* @supported weapp
|
|
23
|
+
* @supported weapp, rn
|
|
24
24
|
*/
|
|
25
25
|
onSubmit?: CommonEventFunction<FormProps.onSubmitEventDetail>
|
|
26
26
|
|
|
@@ -50,7 +50,7 @@ declare namespace FormProps {
|
|
|
50
50
|
* 当点击 form 表单中 form-type 为 submit 的 button 组件时,会将表单组件中的 value 值进行提交,需要在表单组件中加上 name 来作为 key。
|
|
51
51
|
* @classification forms
|
|
52
52
|
* @supported weapp, h5, rn
|
|
53
|
-
* @
|
|
53
|
+
* @example_react
|
|
54
54
|
* ```tsx
|
|
55
55
|
* class App extends Component {
|
|
56
56
|
*
|
|
@@ -73,6 +73,37 @@ declare namespace FormProps {
|
|
|
73
73
|
* }
|
|
74
74
|
* }
|
|
75
75
|
* ```
|
|
76
|
+
* @example_vue
|
|
77
|
+
* ```html
|
|
78
|
+
* <template>
|
|
79
|
+
* <form `@submit="formSubmit" `@reset="formReset" >
|
|
80
|
+
* <view class="taro-example-body">
|
|
81
|
+
* <switch name="switch" class="form-switch"></Switch>
|
|
82
|
+
* </view>
|
|
83
|
+
* <view class="taro-example-btns">
|
|
84
|
+
* <button form-type="submit">Submit</button>
|
|
85
|
+
* <button type="default" form-type="reset">Reset</button>
|
|
86
|
+
* </view>
|
|
87
|
+
* </form>
|
|
88
|
+
* </template>
|
|
89
|
+
*
|
|
90
|
+
* <script>
|
|
91
|
+
* export default {
|
|
92
|
+
* data() {
|
|
93
|
+
* return {}
|
|
94
|
+
* },
|
|
95
|
+
* methods: {
|
|
96
|
+
* formSubmit (e) {
|
|
97
|
+
* console.log(e)
|
|
98
|
+
* },
|
|
99
|
+
*
|
|
100
|
+
* formReset (e) {
|
|
101
|
+
* console.log(e)
|
|
102
|
+
* }
|
|
103
|
+
* }
|
|
104
|
+
* }
|
|
105
|
+
* </script>
|
|
106
|
+
* ```
|
|
76
107
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/form.html
|
|
77
108
|
*/
|
|
78
109
|
declare const Form: ComponentType<FormProps>
|
package/types/Icon.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ declare namespace IconProps {
|
|
|
50
50
|
/** 图标。组件属性的长度单位默认为 px
|
|
51
51
|
* @classification base
|
|
52
52
|
* @supported weapp, swan, alipay, tt, h5, rn
|
|
53
|
-
* @
|
|
53
|
+
* @example_react
|
|
54
54
|
* ```tsx
|
|
55
55
|
* export default class PageView extends Component {
|
|
56
56
|
* constructor() {
|
|
@@ -76,6 +76,22 @@ declare namespace IconProps {
|
|
|
76
76
|
* }
|
|
77
77
|
* }
|
|
78
78
|
* ```
|
|
79
|
+
* @example_vue
|
|
80
|
+
* <template>
|
|
81
|
+
* <view class="components-page">
|
|
82
|
+
* <icon size="60" type="success" />
|
|
83
|
+
* <icon size="60" type="info" />
|
|
84
|
+
* <icon size="60" type="warn" color="#ccc" />
|
|
85
|
+
* <icon size="60" type="warn" />
|
|
86
|
+
* <icon size="60" type="waiting" />
|
|
87
|
+
* <icon size="20" type="success_no_circle" />
|
|
88
|
+
* <icon size="20" type="warn" />
|
|
89
|
+
* <icon size="20" type="success" />
|
|
90
|
+
* <icon size="20" type="download" />
|
|
91
|
+
* <icon size="20" type="clear" color="red" />
|
|
92
|
+
* <icon size="20" type="search" />
|
|
93
|
+
* </view>
|
|
94
|
+
* </template>
|
|
79
95
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/icon.html
|
|
80
96
|
*/
|
|
81
97
|
declare const Icon: ComponentType<IconProps>
|