@tarojs/components 3.5.0-beta.0 → 3.5.0-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/cjs/taro-rich-text-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +8 -3
- package/dist/cjs/taro-tabbar.cjs.entry.js +1 -1
- package/dist/cjs/taro-video-control_3.cjs.entry.js +19 -13
- package/dist/collection/components/rich-text/rich-text.js +1 -1
- package/dist/collection/components/swiper/swiper.js +8 -3
- package/dist/collection/components/tabbar/tabbar.js +1 -1
- package/dist/collection/components/video/style/index.css +0 -1
- package/dist/collection/components/video/utils.js +6 -7
- package/dist/collection/components/video/video-control.js +3 -3
- package/dist/collection/components/video/video.js +10 -3
- package/dist/esm/taro-rich-text-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +8 -3
- package/dist/esm/taro-tabbar.entry.js +1 -1
- package/dist/esm/taro-video-control_3.entry.js +19 -13
- 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-video-control_3.entry.js +2 -2
- package/dist/taro-components/{p-64f6f87c.system.entry.js → p-12615394.system.entry.js} +2 -2
- package/dist/taro-components/p-1b11a8d4.system.entry.js +1 -0
- package/dist/taro-components/p-1d5fa0f3.entry.js +1 -0
- package/dist/taro-components/{p-bb3d337d.entry.js → p-9eb01395.entry.js} +2 -2
- package/dist/taro-components/p-a2fd3c03.system.js +1 -1
- package/dist/taro-components/{p-49df1b65.system.entry.js → p-c59f3780.system.entry.js} +1 -1
- package/dist/taro-components/{p-7419e765.entry.js → p-f980e090.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/video/utils.d.ts +1 -3
- package/dist/types/components/video/video-control.d.ts +1 -1
- package/dist-h5/react/utils/reactify-wc.js +5 -2
- package/package.json +7 -3
- package/types/Ad.d.ts +6 -6
- package/types/Button.d.ts +12 -12
- package/types/Camera.d.ts +10 -10
- package/types/Canvas.d.ts +1 -1
- package/types/Checkbox.d.ts +4 -4
- package/types/CheckboxGroup.d.ts +3 -3
- package/types/Form.d.ts +2 -2
- package/types/Input.d.ts +19 -19
- package/types/LivePlayer.d.ts +8 -8
- package/types/Map.d.ts +28 -28
- package/types/MovableArea.d.ts +1 -1
- package/types/MovableView.d.ts +18 -18
- package/types/OpenData.d.ts +6 -6
- package/types/PageContainer.d.ts +14 -14
- package/types/Radio.d.ts +5 -5
- package/types/RadioGroup.d.ts +2 -2
- package/types/RichText.d.ts +6 -1
- package/types/ScrollView.d.ts +3 -3
- package/types/Swiper.d.ts +5 -5
- package/types/Switch.d.ts +2 -2
- package/types/Textarea.d.ts +21 -21
- package/types/Video.d.ts +13 -13
- package/types/WebView.d.ts +5 -5
- package/dist/taro-components/p-97af3986.system.entry.js +0 -1
- package/dist/taro-components/p-fc28dbdd.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-8c7cf814.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o([["p-de726095",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["p-8a2b7701",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["p-
|
|
1
|
+
import{p as e,b as o}from"./p-8c7cf814.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o([["p-de726095",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["p-8a2b7701",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["p-f980e090",[[4,"taro-swiper-core",{indicatorDots:[4,"indicator-dots"],indicatorColor:[1,"indicator-color"],indicatorActiveColor:[1,"indicator-active-color"],autoplay:[4],current:[2],interval:[2],duration:[2],circular:[4],vertical:[4],previousMargin:[1,"previous-margin"],nextMargin:[1,"next-margin"],displayMultipleItems:[2,"display-multiple-items"],full:[4],swiperWrapper:[32],swiper:[32],isWillLoadCalled:[32],observer:[32],observerFirst:[32],observerLast:[32]}],[0,"taro-swiper-item-core",{itemId:[1,"item-id"]}]]],["p-8c6d8802",[[0,"taro-ad-core"]]],["p-e6ec7abc",[[0,"taro-ad-custom-core"]]],["p-884e6eab",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["p-549636ca",[[0,"taro-block-core"]]],["p-17b78ad7",[[4,"taro-button-core",{disabled:[4],hoverClass:[1,"hover-class"],type:[1],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],size:[1],plain:[4],loading:[4],formType:[1,"form-type"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-fee2ad82",[[0,"taro-camera-core"]]],["p-7d457a6a",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["p-880791ee",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["p-c1642977",[[4,"taro-cover-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-b31e6cf0",[[0,"taro-custom-wrapper-core"]]],["p-13d03572",[[0,"taro-editor-core"]]],["p-aca73ca4",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-087d704b",[[0,"taro-functional-page-navigator-core"]]],["p-c995a3aa",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["p-92f26e22",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["p-a9c3e575",[[0,"taro-input-core",{value:[1],type:[1],password:[4],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],confirmType:[1,"confirm-type"],name:[1],nativeProps:[16]}]]],["p-c33b552b",[[0,"taro-keyboard-accessory-core"]]],["p-7f726d39",[[4,"taro-label-core",{for:[1]}]]],["p-615b87e8",[[0,"taro-live-player-core"]]],["p-1fbf755f",[[0,"taro-live-pusher-core"]]],["p-c6d14c2b",[[0,"taro-map-core"]]],["p-14484d41",[[0,"taro-match-media-core"]]],["p-917185f3",[[0,"taro-movable-area-core"]]],["p-ee1ffbb0",[[0,"taro-movable-view-core"]]],["p-b640bd56",[[0,"taro-navigation-bar-core"]]],["p-3b067d1f",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["p-e56a303b",[[0,"taro-official-account-core"]]],["p-68246408",[[0,"taro-open-data-core"]]],["p-085c4322",[[0,"taro-page-container-core"]]],["p-3e7aced1",[[0,"taro-page-meta-core"]]],["p-0afc53da",[[0,"taro-picker-view-column-core",{col:[1],initialPosition:[1,"initial-position"],paddingVertical:[2,"padding-vertical"],isInit:[32],isMove:[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]]]],["p-88e3bc92",[[4,"taro-picker-view-core",{indicatorStyle:[1,"indicator-style"],indicatorClass:[1,"indicator-class"],value:[16],maskStyle:[1,"mask-style"],maskClass:[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-06352f55",[[0,"taro-progress-core",{percent:[2],showInfo:[4,"show-info"],borderRadius:[8,"border-radius"],fontSize:[8,"font-size"],strokeWidth:[8,"stroke-width"],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],active:[4]}]]],["p-3e1e4626",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["p-55646f03",[[0,"taro-rich-text-core",{nodes:[1]}]]],["p-f5377a15",[[4,"taro-scroll-view-core",{scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],upperThreshold:[8,"upper-threshold"],lowerThreshold:[8,"lower-threshold"],mpScrollTop:[8,"scroll-top"],mpScrollLeft:[8,"scroll-left"],mpScrollIntoView:[1,"scroll-into-view"],scrollWithAnimation:[4,"scroll-with-animation"]}]]],["p-b455351e",[[0,"taro-share-element-core"]]],["p-7f8ddefe",[[0,"taro-slider-core",{min:[2],max:[2],step:[2],disabled:[4],value:[1026],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],blockSize:[2,"block-size"],blockColor:[1,"block-color"],showValue:[4,"show-value"],name:[1],val:[32],totalWidth:[32],touching:[32],ogX:[32],touchId:[32],percent:[32],ogPercent:[32],isWillLoadCalled:[32]}]]],["p-f425f3b5",[[0,"taro-slot-core"]]],["p-58cbfd17",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["p-1d5fa0f3",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["p-8ca394d6",[[4,"taro-text-core",{selectable:[4]}]]],["p-34d60fc8",[[0,"taro-textarea-core",{value:[1],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],autoHeight:[4,"auto-height"],name:[1],nativeProps:[16],line:[32]}]]],["p-1e44fcfd",[[4,"taro-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-9ff180ae",[[0,"taro-voip-room-core"]]],["p-c0875abf",[[0,"taro-web-view-core",{src:[1]}]]],["p-e5fdbc1c",[[4,"taro-picker-core",{mode:[1],disabled:[4],range:[16],rangeKey:[1,"range-key"],value:[8],start:[1],end:[1],fields:[1],name:[1],pickerValue:[32],height:[32],hidden:[32],fadeOut:[32],isWillLoadCalled:[32]}],[0,"taro-picker-group",{mode:[1],range:[16],rangeKey:[1,"range-key"],height:[2],columnId:[1,"column-id"],updateHeight:[16],onColumnChange:[16],updateDay:[16],startY:[32],preY:[32],hadMove:[32],touchEnd:[32],isMove:[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-9eb01395",[[0,"taro-video-core",{src:[1],duration:[2],controls:[4],autoplay:[4],loop:[4],muted:[4],initialTime:[2,"initial-time"],poster:[1],objectFit:[1,"object-fit"],showProgress:[4,"show-progress"],showFullscreenBtn:[4,"show-fullscreen-btn"],showPlayBtn:[4,"show-play-btn"],showCenterPlayBtn:[4,"show-center-play-btn"],showMuteBtn:[4,"show-mute-btn"],danmuList:[16],danmuBtn:[4,"danmu-btn"],enableDanmu:[4,"enable-danmu"],enablePlayGesture:[4,"enable-play-gesture"],enableProgressGesture:[4,"enable-progress-gesture"],vslideGesture:[4,"vslide-gesture"],vslideGestureInFullscreen:[4,"vslide-gesture-in-fullscreen"],nativeProps:[16],_duration:[32],_enableDanmu:[32],isPlaying:[32],isFirst:[32],isFullScreen:[32],fullScreenTimestamp:[32],isMute:[32],play:[64],pause:[64],stop:[64],seek:[64],requestFullScreen:[64],exitFullScreen:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{controls:[4],currentTime:[2,"current-time"],duration:[2],isPlaying:[4,"is-playing"],pauseFunc:[16],playFunc:[16],seekFunc:[16],showPlayBtn:[4,"show-play-btn"],showProgress:[4,"show-progress"],setProgressBall:[64],toggleVisibility:[64],getIsDraggingProgressBall:[64],setCurrentTime:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{enable:[4],danmuList:[32],sendDanmu:[64],tick:[64]}]]]],e)));
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export declare const formatTime: (time?: number | undefined) => string;
|
|
2
2
|
export declare const calcDist: (x: number, y: number) => number;
|
|
3
3
|
export declare const normalizeNumber: (number: number) => number;
|
|
4
|
-
|
|
5
|
-
* @returns: {requestFullscreen: 'requestFullscreen', exitFullscreen: 'exitFullscreen', ...}
|
|
6
|
-
*/
|
|
4
|
+
export declare let scene: string;
|
|
7
5
|
export declare const screenFn: Record<string, any>;
|
|
8
6
|
export declare const isHls: (url: any) => boolean;
|
|
@@ -23,7 +23,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
23
23
|
import React, { createElement, createRef } from 'react'; // eslint-disable-next-line
|
|
24
24
|
|
|
25
25
|
var h = React.createElement;
|
|
26
|
-
var SCROLL_VIEW = 'taro-scroll-view-core';
|
|
26
|
+
var SCROLL_VIEW = 'taro-scroll-view-core';
|
|
27
|
+
var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; // 为了不要覆盖 wc 中 host 内置的 class 和 stencil 加入的 class
|
|
27
28
|
|
|
28
29
|
function getClassName(wc, prevProps, props) {
|
|
29
30
|
var classList = Array.from(wc.classList);
|
|
@@ -48,8 +49,10 @@ function updateStyle(dom, key, val) {
|
|
|
48
49
|
if (/^--/.test(key)) {
|
|
49
50
|
// css variable
|
|
50
51
|
dom.style.setProperty(key, val);
|
|
51
|
-
} else {
|
|
52
|
+
} else if (typeof val !== 'number' || IS_NON_DIMENSIONAL.test(key)) {
|
|
52
53
|
dom.style[key] = val;
|
|
54
|
+
} else {
|
|
55
|
+
dom.style[key] = val + 'px';
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components",
|
|
3
|
-
"version": "3.5.0-beta.
|
|
3
|
+
"version": "3.5.0-beta.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "dist/index.js",
|
|
6
6
|
"main:h5": "dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@stencil/core": "~2.13.0",
|
|
43
43
|
"@stencil/sass": "1.5.2",
|
|
44
|
-
"@tarojs/taro": "3.5.0-beta.
|
|
44
|
+
"@tarojs/taro": "3.5.0-beta.3",
|
|
45
45
|
"better-scroll": "^1.14.1",
|
|
46
46
|
"classnames": "^2.2.5",
|
|
47
47
|
"hls.js": "^1.1.5",
|
|
@@ -54,7 +54,11 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"jquery": "^3.4.1",
|
|
56
56
|
"karmatic": "^2.1.0",
|
|
57
|
+
"react": "^17.0.2",
|
|
58
|
+
"react-dom": "^17.0.2",
|
|
57
59
|
"simulant": "^0.2.2",
|
|
60
|
+
"style-loader": "1.3.0",
|
|
61
|
+
"webpack": "4.46.0",
|
|
58
62
|
"workbox-build": "4.3.1"
|
|
59
63
|
},
|
|
60
64
|
"peerDependenciesMeta": {
|
|
@@ -68,5 +72,5 @@
|
|
|
68
72
|
"optional": true
|
|
69
73
|
}
|
|
70
74
|
},
|
|
71
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "bd1aa21707e51500eac9b16526e4ba4171fa8e5f"
|
|
72
76
|
}
|
package/types/Ad.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { StandardProps, CommonEventFunction } from './common'
|
|
|
3
3
|
|
|
4
4
|
interface AdProps extends StandardProps {
|
|
5
5
|
/** 广告单元id,可在[小程序管理后台](https://mp.weixin.qq.com/)的流量主模块新建
|
|
6
|
-
* @supported weapp
|
|
6
|
+
* @supported weapp, tt
|
|
7
7
|
*/
|
|
8
8
|
unitId: string
|
|
9
9
|
|
|
10
10
|
/** 广告自动刷新的间隔时间,单位为秒,参数值必须大于等于30(该参数不传入时 Banner 广告不会自动刷新)
|
|
11
|
-
* @supported weapp
|
|
11
|
+
* @supported weapp, tt
|
|
12
12
|
*/
|
|
13
13
|
adIntervals?: number
|
|
14
14
|
|
|
@@ -23,17 +23,17 @@ interface AdProps extends StandardProps {
|
|
|
23
23
|
adTheme?: 'white' | 'black'
|
|
24
24
|
|
|
25
25
|
/** 广告加载成功的回调
|
|
26
|
-
* @supported weapp
|
|
26
|
+
* @supported weapp, tt
|
|
27
27
|
*/
|
|
28
28
|
onLoad?: CommonEventFunction
|
|
29
29
|
|
|
30
30
|
/** 当广告发生错误时,触发的事件,可以通过该事件获取错误码及原因,事件对象event.detail = {errCode: 1002}
|
|
31
|
-
* @supported weapp
|
|
31
|
+
* @supported weapp, tt
|
|
32
32
|
*/
|
|
33
33
|
onError?: CommonEventFunction<AdProps.onErrorEventDetail>
|
|
34
34
|
|
|
35
35
|
/** 广告关闭的回调
|
|
36
|
-
* @supported weapp
|
|
36
|
+
* @supported weapp, tt
|
|
37
37
|
*/
|
|
38
38
|
onClose?: CommonEventFunction
|
|
39
39
|
}
|
|
@@ -109,7 +109,7 @@ declare namespace AdProps {
|
|
|
109
109
|
|
|
110
110
|
/** Banner 广告
|
|
111
111
|
* @classification open
|
|
112
|
-
* @supported weapp
|
|
112
|
+
* @supported weapp, tt
|
|
113
113
|
* @example_react
|
|
114
114
|
* ```tsx
|
|
115
115
|
* class App extends Component {
|
package/types/Button.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { StyleProp, ViewStyle } from 'react-native'
|
|
|
4
4
|
|
|
5
5
|
interface ButtonProps extends StandardProps {
|
|
6
6
|
/** 按钮的大小
|
|
7
|
-
* @supported weapp, h5, rn, alipay
|
|
7
|
+
* @supported weapp, h5, rn, alipay, tt
|
|
8
8
|
* @default default
|
|
9
9
|
*/
|
|
10
10
|
size?: keyof ButtonProps.Size
|
|
11
11
|
|
|
12
12
|
/** 按钮的样式类型
|
|
13
|
-
* @supported weapp, h5, rn, alipay
|
|
13
|
+
* @supported weapp, h5, rn, alipay, tt
|
|
14
14
|
* @default default
|
|
15
15
|
*/
|
|
16
16
|
type?: keyof ButtonProps.Type
|
|
@@ -22,30 +22,30 @@ interface ButtonProps extends StandardProps {
|
|
|
22
22
|
plain?: boolean
|
|
23
23
|
|
|
24
24
|
/** 是否禁用
|
|
25
|
-
* @supported weapp, h5, rn, alipay
|
|
25
|
+
* @supported weapp, h5, rn, alipay, tt
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
28
|
disabled?: boolean
|
|
29
29
|
|
|
30
30
|
/** 名称前是否带 loading 图标
|
|
31
|
-
* @supported weapp, h5, rn, alipay
|
|
31
|
+
* @supported weapp, h5, rn, alipay, tt
|
|
32
32
|
* @default false
|
|
33
33
|
*/
|
|
34
34
|
loading?: boolean
|
|
35
35
|
|
|
36
36
|
/** 用于 `<form/>` 组件,点击分别会触发 `<form/>` 组件的 submit/reset 事件
|
|
37
|
-
* @supported weapp, alipay
|
|
37
|
+
* @supported weapp, alipay, tt
|
|
38
38
|
*/
|
|
39
39
|
formType?: keyof ButtonProps.FormType
|
|
40
40
|
|
|
41
41
|
/** 微信开放能力
|
|
42
|
-
* @supported weapp, alipay, qq
|
|
42
|
+
* @supported weapp, alipay, qq, tt
|
|
43
43
|
*/
|
|
44
44
|
openType?: ButtonProps.OpenType
|
|
45
45
|
|
|
46
46
|
/** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
|
|
47
47
|
* @default button-hover
|
|
48
|
-
* @supported weapp, alipay, h5
|
|
48
|
+
* @supported weapp, alipay, h5, tt
|
|
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, alipay
|
|
61
|
+
* @supported weapp, alipay, tt
|
|
62
62
|
*/
|
|
63
63
|
hoverStopPropagation?: boolean
|
|
64
64
|
|
|
65
65
|
/** 按住后多久出现点击态,单位毫秒
|
|
66
66
|
* @default 20
|
|
67
|
-
* @supported weapp, alipay, h5, rn
|
|
67
|
+
* @supported weapp, alipay, h5, rn, tt
|
|
68
68
|
*/
|
|
69
69
|
hoverStartTime?: number
|
|
70
70
|
|
|
71
71
|
/** 手指松开后点击态保留时间,单位毫秒
|
|
72
72
|
* @default 70
|
|
73
|
-
* @supported weapp, alipay, h5, rn
|
|
73
|
+
* @supported weapp, alipay, h5, rn, tt
|
|
74
74
|
*/
|
|
75
75
|
hoverStayTime?: number
|
|
76
76
|
|
|
@@ -164,7 +164,7 @@ interface ButtonProps extends StandardProps {
|
|
|
164
164
|
/** 获取用户手机号回调
|
|
165
165
|
*
|
|
166
166
|
* 生效时机:`open-type="getphonenumber"`
|
|
167
|
-
* @supported weapp
|
|
167
|
+
* @supported weapp, tt
|
|
168
168
|
*/
|
|
169
169
|
onGetPhoneNumber?: CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>
|
|
170
170
|
|
|
@@ -389,7 +389,7 @@ declare namespace ButtonProps {
|
|
|
389
389
|
|
|
390
390
|
/** 按钮
|
|
391
391
|
* @classification forms
|
|
392
|
-
* @supported weapp, h5, rn
|
|
392
|
+
* @supported weapp, h5, rn, tt
|
|
393
393
|
* @example_react
|
|
394
394
|
* ```tsx
|
|
395
395
|
* export default class PageButton extends Component {
|
package/types/Camera.d.ts
CHANGED
|
@@ -4,31 +4,31 @@ import { StandardProps, CommonEventFunction } from './common'
|
|
|
4
4
|
interface CameraProps extends StandardProps {
|
|
5
5
|
/** 模式,有效值为normal, scanCode
|
|
6
6
|
* @default "normal"
|
|
7
|
-
* @supported weapp, rn
|
|
7
|
+
* @supported weapp, rn, tt
|
|
8
8
|
*/
|
|
9
9
|
mode?: keyof CameraProps.Mode
|
|
10
10
|
|
|
11
11
|
/** 分辨率,不支持动态修改
|
|
12
12
|
* @default "medium"
|
|
13
|
-
* @supported weapp
|
|
13
|
+
* @supported weapp, tt
|
|
14
14
|
*/
|
|
15
15
|
resolution?: keyof CameraProps.Resolution
|
|
16
16
|
|
|
17
17
|
/** 摄像头朝向
|
|
18
18
|
* @default "back"
|
|
19
|
-
* @supported weapp, rn
|
|
19
|
+
* @supported weapp, rn, tt
|
|
20
20
|
*/
|
|
21
21
|
devicePosition?: keyof CameraProps.DevicePosition
|
|
22
22
|
|
|
23
23
|
/** 闪光灯
|
|
24
24
|
* @default "auto"
|
|
25
|
-
* @supported weapp, rn
|
|
25
|
+
* @supported weapp, rn, tt
|
|
26
26
|
*/
|
|
27
27
|
flash?: keyof CameraProps.Flash
|
|
28
28
|
|
|
29
29
|
/** 指定期望的相机帧数据尺寸
|
|
30
30
|
* @default "medium"
|
|
31
|
-
* @supported weapp
|
|
31
|
+
* @supported weapp, tt
|
|
32
32
|
*/
|
|
33
33
|
frameSize?: keyof CameraProps.FrameSize
|
|
34
34
|
|
|
@@ -41,23 +41,23 @@ interface CameraProps extends StandardProps {
|
|
|
41
41
|
|
|
42
42
|
/** 摄像头在非正常终止时触发,
|
|
43
43
|
* 如退出后台等情况
|
|
44
|
-
* @supported weapp, rn
|
|
44
|
+
* @supported weapp, rn, tt
|
|
45
45
|
*/
|
|
46
46
|
onStop?: CommonEventFunction
|
|
47
47
|
|
|
48
48
|
/** 用户不允许使用摄像头时触发
|
|
49
|
-
* @supported weapp, rn
|
|
49
|
+
* @supported weapp, rn, tt
|
|
50
50
|
*/
|
|
51
51
|
onError?: CommonEventFunction
|
|
52
52
|
|
|
53
53
|
/** 相机初始化完成时触发
|
|
54
|
-
* @supported weapp, rn
|
|
54
|
+
* @supported weapp, rn, tt
|
|
55
55
|
*/
|
|
56
56
|
onInitDone?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
|
|
57
57
|
|
|
58
58
|
/** 在成功识别到一维码时触发,
|
|
59
59
|
* 仅在 mode="scanCode" 时生效
|
|
60
|
-
* @supported weapp, rn
|
|
60
|
+
* @supported weapp, rn, tt
|
|
61
61
|
*/
|
|
62
62
|
onScanCode?: CommonEventFunction
|
|
63
63
|
}
|
|
@@ -115,7 +115,7 @@ declare namespace CameraProps {
|
|
|
115
115
|
|
|
116
116
|
/** 系统相机
|
|
117
117
|
* @classification media
|
|
118
|
-
* @supported weapp, rn
|
|
118
|
+
* @supported weapp, rn, tt
|
|
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
package/types/Checkbox.d.ts
CHANGED
|
@@ -4,24 +4,24 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
|
4
4
|
interface CheckboxProps extends StandardProps {
|
|
5
5
|
|
|
6
6
|
/** `<Checkbox/>`标识,选中时触发`<CheckboxGroup/>`的 change 事件,并携带 `<Checkbox/>` 的 value
|
|
7
|
-
* @supported weapp, rn
|
|
7
|
+
* @supported weapp, rn, tt
|
|
8
8
|
*/
|
|
9
9
|
value: string
|
|
10
10
|
|
|
11
11
|
/** 是否禁用
|
|
12
|
-
* @supported weapp, h5, rn
|
|
12
|
+
* @supported weapp, h5, rn, tt
|
|
13
13
|
* @default false
|
|
14
14
|
*/
|
|
15
15
|
disabled?: boolean
|
|
16
16
|
|
|
17
17
|
/** 当前是否选中,可用来设置默认选中
|
|
18
|
-
* @supported weapp, h5, rn
|
|
18
|
+
* @supported weapp, h5, rn, tt
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
21
|
checked?: boolean
|
|
22
22
|
|
|
23
23
|
/** checkbox的颜色,同 css 的 color
|
|
24
|
-
* @supported weapp, h5, rn
|
|
24
|
+
* @supported weapp, h5, rn, tt
|
|
25
25
|
*/
|
|
26
26
|
color?: string
|
|
27
27
|
|
package/types/CheckboxGroup.d.ts
CHANGED
|
@@ -3,21 +3,21 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
|
3
3
|
|
|
4
4
|
interface CheckboxGroupProps extends StandardProps, FormItemProps {
|
|
5
5
|
/** 表单组件中加上 name 来作为 key
|
|
6
|
-
* @supported h5
|
|
6
|
+
* @supported h5, tt
|
|
7
7
|
*/
|
|
8
8
|
name?: string
|
|
9
9
|
|
|
10
10
|
/** `<CheckboxGroup/>` 中选中项发生改变是触发 change 事件
|
|
11
11
|
*
|
|
12
12
|
* event.detail = { value: [选中的checkbox的 value 的数组] }
|
|
13
|
-
* @supported weapp, h5, rn
|
|
13
|
+
* @supported weapp, h5, rn, tt
|
|
14
14
|
*/
|
|
15
15
|
onChange?: CommonEventFunction<{ value: string[] }>
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/** 多项选择器,内部由多个checkbox组成
|
|
19
19
|
* @classification forms
|
|
20
|
-
* @supported weapp, h5, rn
|
|
20
|
+
* @supported weapp, h5, rn, tt
|
|
21
21
|
* @example
|
|
22
22
|
* ```tsx
|
|
23
23
|
* export default class PageCheckbox extends Component {
|
package/types/Form.d.ts
CHANGED
|
@@ -20,12 +20,12 @@ interface FormProps extends StandardProps {
|
|
|
20
20
|
|
|
21
21
|
/** 携带 form 中的数据触发 submit 事件
|
|
22
22
|
* event.detail = { value : {'name': 'value'} , formId: '' }
|
|
23
|
-
* @supported weapp, rn
|
|
23
|
+
* @supported weapp, rn, tt
|
|
24
24
|
*/
|
|
25
25
|
onSubmit?: CommonEventFunction<FormProps.onSubmitEventDetail>
|
|
26
26
|
|
|
27
27
|
/** 表单重置时会触发 reset 事件
|
|
28
|
-
* @supported weapp, h5, rn
|
|
28
|
+
* @supported weapp, h5, rn, tt
|
|
29
29
|
*/
|
|
30
30
|
onReset?: CommonEventFunction
|
|
31
31
|
}
|
package/types/Input.d.ts
CHANGED
|
@@ -3,35 +3,35 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
|
3
3
|
|
|
4
4
|
interface InputProps extends StandardProps, FormItemProps {
|
|
5
5
|
/** 输入框的初始内容
|
|
6
|
-
* @supported weapp, h5, rn
|
|
6
|
+
* @supported weapp, h5, rn, tt
|
|
7
7
|
*/
|
|
8
8
|
value?: string
|
|
9
9
|
|
|
10
10
|
/** input 的类型
|
|
11
11
|
* @default "text"
|
|
12
|
-
* @supported weapp, h5, rn
|
|
12
|
+
* @supported weapp, h5, rn, tt
|
|
13
13
|
* @rn 部分支持
|
|
14
14
|
*/
|
|
15
15
|
type?: 'text' | 'number' | 'idcard' | 'digit' | 'safe-password' | 'nickname'
|
|
16
16
|
|
|
17
17
|
/** 是否是密码类型
|
|
18
|
-
* @supported weapp, h5, rn
|
|
18
|
+
* @supported weapp, h5, rn, tt
|
|
19
19
|
*/
|
|
20
20
|
password?: boolean
|
|
21
21
|
|
|
22
22
|
/** 输入框为空时占位符
|
|
23
|
-
* @supported weapp, h5, rn
|
|
23
|
+
* @supported weapp, h5, rn, tt
|
|
24
24
|
*/
|
|
25
25
|
placeholder?: string
|
|
26
26
|
|
|
27
27
|
/** 指定 placeholder 的样式
|
|
28
|
-
* @supported weapp, rn
|
|
28
|
+
* @supported weapp, rn, tt
|
|
29
29
|
*/
|
|
30
30
|
placeholderStyle?: string
|
|
31
31
|
|
|
32
32
|
/** 指定 placeholder 的样式类
|
|
33
33
|
* @default "input-placeholder"
|
|
34
|
-
* @supported weapp
|
|
34
|
+
* @supported weapp, tt
|
|
35
35
|
*/
|
|
36
36
|
placeholderClass?: string
|
|
37
37
|
|
|
@@ -41,19 +41,19 @@ interface InputProps extends StandardProps, FormItemProps {
|
|
|
41
41
|
placeholderTextColor?: string
|
|
42
42
|
|
|
43
43
|
/** 是否禁用
|
|
44
|
-
* @supported weapp, h5, rn
|
|
44
|
+
* @supported weapp, h5, rn, tt
|
|
45
45
|
*/
|
|
46
46
|
disabled?: boolean
|
|
47
47
|
|
|
48
48
|
/** 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
49
49
|
* @default 140
|
|
50
|
-
* @supported weapp, h5, rn
|
|
50
|
+
* @supported weapp, h5, rn, tt
|
|
51
51
|
*/
|
|
52
52
|
maxlength?: number
|
|
53
53
|
|
|
54
54
|
/** 指定光标与键盘的距离,单位 px 。取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离
|
|
55
55
|
* @default 0
|
|
56
|
-
* @supported weapp
|
|
56
|
+
* @supported weapp, tt
|
|
57
57
|
*/
|
|
58
58
|
cursorSpacing?: number
|
|
59
59
|
|
|
@@ -64,13 +64,13 @@ interface InputProps extends StandardProps, FormItemProps {
|
|
|
64
64
|
autoFocus?: boolean
|
|
65
65
|
|
|
66
66
|
/** 获取焦点
|
|
67
|
-
* @supported weapp, h5, rn
|
|
67
|
+
* @supported weapp, h5, rn, tt
|
|
68
68
|
*/
|
|
69
69
|
focus?: boolean
|
|
70
70
|
|
|
71
71
|
/** 设置键盘右下角按钮的文字
|
|
72
72
|
* @default done
|
|
73
|
-
* @supported weapp, rn
|
|
73
|
+
* @supported weapp, rn, tt
|
|
74
74
|
*/
|
|
75
75
|
confirmType?: 'send' | 'search' | 'next' | 'go' | 'done'
|
|
76
76
|
|
|
@@ -81,25 +81,25 @@ interface InputProps extends StandardProps, FormItemProps {
|
|
|
81
81
|
confirmHold?: boolean
|
|
82
82
|
|
|
83
83
|
/** 指定focus时的光标位置
|
|
84
|
-
* @supported weapp, rn
|
|
84
|
+
* @supported weapp, rn, tt
|
|
85
85
|
*/
|
|
86
86
|
cursor?: number
|
|
87
87
|
|
|
88
88
|
/** 光标起始位置,自动聚集时有效,需与selection-end搭配使用
|
|
89
89
|
* @default -1
|
|
90
|
-
* @supported weapp, rn
|
|
90
|
+
* @supported weapp, rn, tt
|
|
91
91
|
*/
|
|
92
92
|
selectionStart?: number
|
|
93
93
|
|
|
94
94
|
/** 光标结束位置,自动聚集时有效,需与selection-start搭配使用
|
|
95
95
|
* @default -1
|
|
96
|
-
* @supported weapp, rn
|
|
96
|
+
* @supported weapp, rn, tt
|
|
97
97
|
*/
|
|
98
98
|
selectionEnd?: number
|
|
99
99
|
|
|
100
100
|
/** 键盘弹起时,是否自动上推页面
|
|
101
101
|
* @default false
|
|
102
|
-
* @supported weapp
|
|
102
|
+
* @supported weapp, tt
|
|
103
103
|
*/
|
|
104
104
|
adjustPosition?: boolean
|
|
105
105
|
|
|
@@ -166,26 +166,26 @@ interface InputProps extends StandardProps, FormItemProps {
|
|
|
166
166
|
controlled?: boolean
|
|
167
167
|
|
|
168
168
|
/** 当键盘输入时,触发input事件,event.detail = {value, cursor, keyCode},处理函数可以直接 return 一个字符串,将替换输入框的内容。
|
|
169
|
-
* @supported weapp, h5, rn
|
|
169
|
+
* @supported weapp, h5, rn, tt
|
|
170
170
|
*/
|
|
171
171
|
onInput?: CommonEventFunction<InputProps.inputEventDetail>
|
|
172
172
|
|
|
173
173
|
/** 输入框聚焦时触发,event.detail = { value, height },height 为键盘高度
|
|
174
|
-
* @supported weapp, h5, rn
|
|
174
|
+
* @supported weapp, h5, rn, tt
|
|
175
175
|
*/
|
|
176
176
|
onFocus?: CommonEventFunction<InputProps.inputForceEventDetail>
|
|
177
177
|
|
|
178
178
|
/** 输入框失去焦点时触发
|
|
179
179
|
*
|
|
180
180
|
* event.detail = {value: value}
|
|
181
|
-
* @supported weapp, h5, rn
|
|
181
|
+
* @supported weapp, h5, rn, tt
|
|
182
182
|
*/
|
|
183
183
|
onBlur?: CommonEventFunction<InputProps.inputValueEventDetail>
|
|
184
184
|
|
|
185
185
|
/** 点击完成按钮时触发
|
|
186
186
|
*
|
|
187
187
|
* event.detail = {value: value}
|
|
188
|
-
* @supported weapp, rn
|
|
188
|
+
* @supported weapp, rn, tt
|
|
189
189
|
* @h5 借用[Form 组件](./form)的`onSubmit`事件来替代
|
|
190
190
|
*/
|
|
191
191
|
onConfirm?: CommonEventFunction<InputProps.inputValueEventDetail>
|
package/types/LivePlayer.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { StandardProps, CommonEventFunction, NetStatus } from './common'
|
|
|
3
3
|
|
|
4
4
|
interface LivePlayerProps extends StandardProps {
|
|
5
5
|
/** 音视频地址。目前仅支持 flv, rtmp 格式
|
|
6
|
-
* @supported weapp
|
|
6
|
+
* @supported weapp, tt
|
|
7
7
|
*/
|
|
8
8
|
src?: string
|
|
9
9
|
|
|
@@ -15,25 +15,25 @@ interface LivePlayerProps extends StandardProps {
|
|
|
15
15
|
|
|
16
16
|
/** 自动播放
|
|
17
17
|
* @default false
|
|
18
|
-
* @supported weapp
|
|
18
|
+
* @supported weapp, tt
|
|
19
19
|
*/
|
|
20
20
|
autoplay?: boolean
|
|
21
21
|
|
|
22
22
|
/** 是否静音
|
|
23
23
|
* @default false
|
|
24
|
-
* @supported weapp
|
|
24
|
+
* @supported weapp, tt
|
|
25
25
|
*/
|
|
26
26
|
muted?: boolean
|
|
27
27
|
|
|
28
28
|
/** 画面方向
|
|
29
29
|
* @default "vertical"
|
|
30
|
-
* @supported weapp
|
|
30
|
+
* @supported weapp, tt
|
|
31
31
|
*/
|
|
32
32
|
orientation?: keyof LivePlayerProps.Orientation
|
|
33
33
|
|
|
34
34
|
/** 填充模式
|
|
35
35
|
* @default "contain"
|
|
36
|
-
* @supported weapp
|
|
36
|
+
* @supported weapp, tt
|
|
37
37
|
*/
|
|
38
38
|
objectFit?: keyof LivePlayerProps.objectFit
|
|
39
39
|
|
|
@@ -80,12 +80,12 @@ interface LivePlayerProps extends StandardProps {
|
|
|
80
80
|
pictureInPictureMode?: ('push' | 'pop')[] | 'push' | 'pop' | ''
|
|
81
81
|
|
|
82
82
|
/** 播放状态变化事件,detail = {code}
|
|
83
|
-
* @supported weapp
|
|
83
|
+
* @supported weapp, tt
|
|
84
84
|
*/
|
|
85
85
|
onStateChange?: CommonEventFunction<LivePlayerProps.onStateChangeEventDetail>
|
|
86
86
|
|
|
87
87
|
/** 全屏变化事件,detail = {direction, fullScreen}
|
|
88
|
-
* @supported weapp
|
|
88
|
+
* @supported weapp, tt
|
|
89
89
|
*/
|
|
90
90
|
onFullScreenChange?: CommonEventFunction<LivePlayerProps.onFullScreenChangeEventDetail>
|
|
91
91
|
|
|
@@ -208,7 +208,7 @@ declare namespace LivePlayerProps {
|
|
|
208
208
|
*
|
|
209
209
|
* 需要先通过类目审核,再在小程序管理后台,“设置”-“接口设置”中自助开通该组件权限。
|
|
210
210
|
* @classification media
|
|
211
|
-
* @supported weapp
|
|
211
|
+
* @supported weapp, tt
|
|
212
212
|
* @example_react
|
|
213
213
|
* ```tsx
|
|
214
214
|
* class App extends Components {
|