@tarojs/components 3.5.3 → 3.5.4-alpha.0
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-input-core.cjs.entry.js +1 -0
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -2
- package/dist/collection/components/input/input.js +1 -0
- package/dist/collection/components/swiper/swiper.js +2 -2
- package/dist/esm/taro-input-core.entry.js +1 -0
- package/dist/esm/taro-swiper-core_2.entry.js +2 -2
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/{p-cd88d81a.system.entry.js → p-13f0b11f.system.entry.js} +1 -1
- package/dist/taro-components/p-1b356f4d.entry.js +1 -0
- package/dist/taro-components/{p-e1ed00f7.entry.js → p-63a0c6b0.entry.js} +1 -1
- package/dist/taro-components/p-a39276ff.system.entry.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/package.json +3 -3
- package/types/Picker.d.ts +25 -0
- package/types/Video.d.ts +23 -47
- package/dist/taro-components/p-06bef0f9.entry.js +0 -1
- package/dist/taro-components/p-6e9805e2.system.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var e,n,i,o;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.g}],execute:function(){var s="taro-input-core{display:block}input{display:block;overflow:hidden;height:1.4rem;text-overflow:clip;text-align:inherit;white-space:nowrap}";function a(t,e,n){if(e==="search")t="search";if(n)t="password";if(typeof t==="undefined"){return"text"}if(!t){throw new Error("unexpected type")}if(t==="digit")t="number";return t}function u(t){return t!==null&&t!==void 0?t:""}var r=t("taro_input_core",function(){function t(t){var i=this;e(this,t);this.onInput=n(this,"input",7);this.onPaste=n(this,"paste",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onConfirm=n(this,"confirm",7);this.onChange=n(this,"change",7);this.onKeyDown=n(this,"keydown",7);this.isOnComposition=false;this.isOnPaste=false;this.onInputExcuted=false;this.password=false;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.confirmType="done";this.nativeProps={};this.handleInput=function(t){t.stopPropagation();var e=i,n=e.type,o=e.maxlength,s=e.confirmType,u=e.password;if(!i.isOnComposition&&!i.onInputExcuted){var r=t.target.value;var l=a(n,s,u);i.onInputExcuted=true;if(l==="number"&&r&&o<=r.length){r=r.substring(0,o);t.target.value=r}i.value=r;i.onInput.emit({value:r,cursor:r.length});i.onInputExcuted=false}};this.handlePaste=function(t){i.isOnPaste=true;i.onPaste.emit({value:t.target.value})};this.handleFocus=function(t){i.onInputExcuted=false;i.onFocus.emit({value:t.target.value})};this.handleBlur=function(t){i.onBlur.emit({value:t.target.value})};this.handleChange=function(t){t.stopPropagation();i.onChange.emit({value:t.target.value});if(i.isOnPaste){i.isOnPaste=false;i.value=t.target.value;i.onInput.emit({value:t.target.value,cursor:t.target.value.length})}};this.handleKeyDown=function(t){var e=t.target.value;var n=t.keyCode||t.code;i.onInputExcuted=false;t.stopPropagation();i.onKeyDown.emit({value:e,cursor:e.length,keyCode:n});n===13&&i.onConfirm.emit({value:e})};this.handleComposition=function(t){if(!(t.target instanceof HTMLInputElement))return;if(t.type==="compositionend"){i.isOnComposition=false;i.value=t.target.value;i.onInput.emit({value:t.target.value,cursor:t.target.value.length})}else{i.isOnComposition=true}}}t.prototype.watchFocus=function(t,e){var n;if(!e&&t){(n=this.inputRef)===null||n===void 0?void 0:n.focus()}};t.prototype.watchValue=function(t){var e=u(t);if(this.inputRef&&this.inputRef.value!==e){this.inputRef.value=e}};t.prototype.componentDidLoad=function(){var t=this;var e,n,i;if(this.type==="file"){this.fileListener=function(){t.onInput.emit()};(e=this.inputRef)===null||e===void 0?void 0:e.addEventListener("change",this.fileListener)}else{(n=this.inputRef)===null||n===void 0?void 0:n.addEventListener("compositionstart",this.handleComposition);(i=this.inputRef)===null||i===void 0?void 0:i.addEventListener("compositionend",this.handleComposition)}Object.defineProperty(this.el,"value",{get:function(){var e;return(e=t.inputRef)===null||e===void 0?void 0:e.value},set:function(e){return t.value=e},configurable:true})};t.prototype.disconnectedCallback=function(){var t;if(this.type==="file"){(t=this.inputRef)===null||t===void 0?void 0:t.removeEventListener("change",this.fileListener)}};t.prototype.render=function(){var t=this;var e=this,n=e.value,o=e.type,s=e.password,r=e.placeholder,l=e.autoFocus,h=e.disabled,p=e.maxlength,c=e.confirmType,f=e.name,d=e.nativeProps;return i("input",Object.assign({ref:function(e){t.inputRef=e},class:"weui-input",value:u(n),type:a(o,c,s),placeholder:r,autoFocus:l,disabled:h,maxlength:p,name:f,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,onCompositionStart:this.handleComposition,onCompositionEnd:this.handleComposition},d))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{autoFocus:["watchFocus"],value:["watchValue"]}},enumerable:false,configurable:true});return t}());r.style=s}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-059912fd.js";(()=>{const o=import.meta.url,
|
|
1
|
+
import{p as e,b as o}from"./p-059912fd.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((e=>o([["p-92699438",[[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-fec6ac36",[[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-63a0c6b0",[[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-7ab91097",[[0,"taro-ad-core"]]],["p-9fcb40a3",[[0,"taro-ad-custom-core"]]],["p-8c8be53b",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["p-72f858e4",[[0,"taro-block-core"]]],["p-7f93fa08",[[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-4f805045",[[0,"taro-camera-core"]]],["p-ff84986d",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["p-ffefd74f",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["p-362998cf",[[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-8aea3de3",[[0,"taro-custom-wrapper-core"]]],["p-db1f2db7",[[0,"taro-editor-core"]]],["p-ab1256fe",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-95a36917",[[0,"taro-functional-page-navigator-core"]]],["p-b2800ccd",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["p-888fac99",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["p-1b356f4d",[[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-443fb8b0",[[0,"taro-keyboard-accessory-core"]]],["p-b7639674",[[4,"taro-label-core",{for:[1]}]]],["p-c0c8b2be",[[0,"taro-live-player-core"]]],["p-e3f39099",[[0,"taro-live-pusher-core"]]],["p-3c7cdf6f",[[0,"taro-map-core"]]],["p-22e33350",[[0,"taro-match-media-core"]]],["p-f8b9c4b0",[[0,"taro-movable-area-core",{scaleArea:[4,"scale-area"]}]]],["p-1e530acd",[[4,"taro-movable-view-core",{x:[8],y:[8],direction:[1],outOfBounds:[4,"out-of-bounds"],inertia:[4],friction:[2],damping:[2],disabled:[4],scale:[4],scaleMin:[2,"scale-min"],scaleMax:[2,"scale-max"],scaleValue:[2,"scale-value"],animation:[4],setParent:[64],endScale:[64],setScale:[64]}]]],["p-7e23b551",[[0,"taro-navigation-bar-core"]]],["p-3c6090fd",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["p-90a6c15a",[[0,"taro-official-account-core"]]],["p-c8da5c10",[[0,"taro-open-data-core"]]],["p-77ad7941",[[0,"taro-page-container-core"]]],["p-6da73376",[[0,"taro-page-meta-core"]]],["p-9a0e70b1",[[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-9b39a940",[[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-b3b677fc",[[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-eec00033",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["p-7407013d",[[0,"taro-rich-text-core",{nodes:[1]}]]],["p-410d449f",[[0,"taro-root-portal-core"]]],["p-ef006b23",[[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-7325d380",[[0,"taro-share-element-core"]]],["p-886571e5",[[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-7f0a12a9",[[0,"taro-slot-core"]]],["p-4ada10aa",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["p-5733124c",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["p-dff55efd",[[4,"taro-text-core",{selectable:[4]}]]],["p-00201a61",[[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-5a2305e7",[[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-49b64020",[[0,"taro-voip-room-core"]]],["p-25df0ce9",[[0,"taro-web-view-core",{src:[1]}]]],["p-fa2a9bab",[[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-7e8943d8",[[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)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.4-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "dist/index.js",
|
|
6
6
|
"main:h5": "dist/index.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@stencil/core": "~2.13.0",
|
|
34
34
|
"@stencil/sass": "1.5.2",
|
|
35
|
-
"@tarojs/taro": "3.5.
|
|
36
|
-
"@tarojs/router": "3.5.
|
|
35
|
+
"@tarojs/taro": "3.5.4-alpha.0",
|
|
36
|
+
"@tarojs/router": "3.5.4-alpha.0",
|
|
37
37
|
"better-scroll": "^1.14.1",
|
|
38
38
|
"classnames": "^2.2.5",
|
|
39
39
|
"hls.js": "^1.1.5",
|
package/types/Picker.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
|
+
import { StyleProp, TextStyle, ViewStyle } from 'react-native'
|
|
2
3
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
4
|
|
|
4
5
|
/** 选择器通用参数 */
|
|
@@ -59,6 +60,18 @@ interface PickerSelectorProps extends PickerStandardProps {
|
|
|
59
60
|
* @default 0
|
|
60
61
|
*/
|
|
61
62
|
value?: number
|
|
63
|
+
/**
|
|
64
|
+
* mode为 selector 或 multiSelector 时 itemStyle 有效
|
|
65
|
+
* @supported rn
|
|
66
|
+
* @default {}
|
|
67
|
+
*/
|
|
68
|
+
itemStyle?: StyleProp<TextStyle>
|
|
69
|
+
/**
|
|
70
|
+
* mode为 selector 或 multiSelector 时 indicatorStyle 有效
|
|
71
|
+
* @supported rn
|
|
72
|
+
* @default {}
|
|
73
|
+
*/
|
|
74
|
+
indicatorStyle?: StyleProp<ViewStyle>
|
|
62
75
|
/**
|
|
63
76
|
* value 改变时触发 change 事件,event.detail = {value}
|
|
64
77
|
* @supported weapp, h5, rn
|
|
@@ -94,6 +107,18 @@ interface PickerMultiSelectorProps extends PickerStandardProps {
|
|
|
94
107
|
* @default []
|
|
95
108
|
*/
|
|
96
109
|
value: number[] | string[] | Record<string, any>[]
|
|
110
|
+
/**
|
|
111
|
+
* mode为 selector 或 multiSelector 时 itemStyle 有效
|
|
112
|
+
* @supported rn
|
|
113
|
+
* @default {}
|
|
114
|
+
*/
|
|
115
|
+
itemStyle?: StyleProp<TextStyle>
|
|
116
|
+
/**
|
|
117
|
+
* mode为 selector 或 multiSelector 时 indicatorStyle 有效
|
|
118
|
+
* @supported rn
|
|
119
|
+
* @default {}
|
|
120
|
+
*/
|
|
121
|
+
indicatorStyle?: StyleProp<ViewStyle>
|
|
97
122
|
/**
|
|
98
123
|
* 当 value 改变时触发 change 事件,event.detail = {value}
|
|
99
124
|
* @supported weapp, h5, rn
|
package/types/Video.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ interface VideoProps extends StandardProps {
|
|
|
8
8
|
src: string
|
|
9
9
|
|
|
10
10
|
/** 指定视频时长
|
|
11
|
-
* @supported weapp, swan, alipay, rn
|
|
12
|
-
* @h5 待定
|
|
11
|
+
* @supported weapp, h5, swan, alipay, rn
|
|
13
12
|
*/
|
|
14
13
|
duration?: number
|
|
15
14
|
|
|
@@ -20,22 +19,19 @@ interface VideoProps extends StandardProps {
|
|
|
20
19
|
controls?: boolean
|
|
21
20
|
|
|
22
21
|
/** 弹幕列表
|
|
23
|
-
* @supported weapp, swan
|
|
24
|
-
* @h5 待定
|
|
22
|
+
* @supported weapp, h5, swan
|
|
25
23
|
*/
|
|
26
24
|
danmuList?: any[]
|
|
27
25
|
|
|
28
26
|
/** 是否显示弹幕按钮,只在初始化时有效,不能动态变更
|
|
29
27
|
* @default false
|
|
30
|
-
* @supported weapp, swan
|
|
31
|
-
* @h5 待定
|
|
28
|
+
* @supported weapp, h5, swan
|
|
32
29
|
*/
|
|
33
30
|
danmuBtn?: boolean
|
|
34
31
|
|
|
35
32
|
/** 是否展示弹幕,只在初始化时有效,不能动态变更
|
|
36
33
|
* @default false
|
|
37
|
-
* @supported weapp, swan
|
|
38
|
-
* @h5 待定
|
|
34
|
+
* @supported weapp, h5, swan
|
|
39
35
|
*/
|
|
40
36
|
enableDanmu?: boolean
|
|
41
37
|
|
|
@@ -64,55 +60,47 @@ interface VideoProps extends StandardProps {
|
|
|
64
60
|
|
|
65
61
|
/** 在非全屏模式下,是否开启亮度与音量调节手势
|
|
66
62
|
* @default false
|
|
67
|
-
* @h5 待定
|
|
68
63
|
*/
|
|
69
64
|
pageGesture?: boolean
|
|
70
65
|
|
|
71
66
|
/** 设置全屏时视频的方向,不指定则根据宽高比自动判断。有效值为 0(正常竖向), 90(屏幕逆时针90度), -90(屏幕顺时针90度)
|
|
72
67
|
* @supported weapp, swan, alipay
|
|
73
|
-
* @h5 待定
|
|
74
68
|
*/
|
|
75
69
|
direction?: number
|
|
76
70
|
|
|
77
71
|
/** 若不设置,宽度大于240时才会显示
|
|
78
72
|
* @default true
|
|
79
|
-
* @supported weapp, swan, tt
|
|
80
|
-
* @h5 待定
|
|
73
|
+
* @supported weapp, h5, swan, tt
|
|
81
74
|
*/
|
|
82
75
|
showProgress?: boolean
|
|
83
76
|
|
|
84
77
|
/** 是否显示全屏按钮
|
|
85
78
|
* @default true
|
|
86
|
-
* @supported weapp, swan, alipay, tt
|
|
87
|
-
* @h5 待定
|
|
79
|
+
* @supported weapp, h5, swan, alipay, tt
|
|
88
80
|
*/
|
|
89
81
|
showFullscreenBtn?: boolean
|
|
90
82
|
|
|
91
83
|
/** 是否显示视频底部控制栏的播放按钮
|
|
92
84
|
* @default true
|
|
93
|
-
* @supported weapp, swan, alipay, tt
|
|
94
|
-
* @h5 待定
|
|
85
|
+
* @supported weapp, h5, swan, alipay, tt
|
|
95
86
|
*/
|
|
96
87
|
showPlayBtn?: boolean
|
|
97
88
|
|
|
98
89
|
/** 是否显示视频中间的播放按钮
|
|
99
90
|
* @default true
|
|
100
|
-
* @supported weapp, swan, alipay, rn
|
|
101
|
-
* @h5 待定
|
|
91
|
+
* @supported weapp, h5, swan, alipay, rn
|
|
102
92
|
*/
|
|
103
93
|
showCenterPlayBtn?: boolean
|
|
104
94
|
|
|
105
95
|
/** 是否开启控制进度的手势
|
|
106
96
|
* @default true
|
|
107
|
-
* @supported weapp, swan, alipay, tt
|
|
108
|
-
* @h5 待定
|
|
97
|
+
* @supported weapp, h5, swan, alipay, tt
|
|
109
98
|
*/
|
|
110
99
|
enableProgressGesture?: boolean
|
|
111
100
|
|
|
112
101
|
/** 当视频大小与 video 容器大小不一致时,视频的表现形式
|
|
113
102
|
* @default "contain"
|
|
114
|
-
* @supported weapp, swan, alipay, tt
|
|
115
|
-
* @h5 待定
|
|
103
|
+
* @supported weapp, h5, swan, alipay, tt
|
|
116
104
|
*/
|
|
117
105
|
objectFit?: keyof VideoProps.ObjectFit
|
|
118
106
|
|
|
@@ -123,14 +111,12 @@ interface VideoProps extends StandardProps {
|
|
|
123
111
|
|
|
124
112
|
/** 是否显示静音按钮
|
|
125
113
|
* @default false
|
|
126
|
-
* @supported weapp, tt
|
|
127
|
-
* @h5 待定
|
|
114
|
+
* @supported weapp, h5, tt
|
|
128
115
|
*/
|
|
129
116
|
showMuteBtn?: boolean
|
|
130
117
|
|
|
131
118
|
/** 视频的标题,全屏时在顶部展示
|
|
132
119
|
* @supported weapp
|
|
133
|
-
* @h5 待定
|
|
134
120
|
*/
|
|
135
121
|
title?: string
|
|
136
122
|
|
|
@@ -140,42 +126,36 @@ interface VideoProps extends StandardProps {
|
|
|
140
126
|
*
|
|
141
127
|
* @default 'bottom'
|
|
142
128
|
* @supported weapp, tt
|
|
143
|
-
* @h5 待定
|
|
144
129
|
*/
|
|
145
130
|
playBtnPosition?: keyof VideoProps.PlayBtnPosition
|
|
146
131
|
|
|
147
132
|
/** 是否开启播放手势,即双击切换播放/暂停
|
|
148
133
|
* @default false
|
|
149
|
-
* @supported weapp, tt
|
|
150
|
-
* @h5 待定
|
|
134
|
+
* @supported weapp, h5, tt
|
|
151
135
|
*/
|
|
152
136
|
enablePlayGesture?: boolean
|
|
153
137
|
|
|
154
138
|
/** 当跳转到其它小程序页面时,是否自动暂停本页面的视频
|
|
155
139
|
* @default true
|
|
156
140
|
* @supported weapp
|
|
157
|
-
* @h5 待定
|
|
158
141
|
*/
|
|
159
142
|
autoPauseIfNavigate?: boolean
|
|
160
143
|
|
|
161
144
|
/** 当跳转到其它微信原生页面时,是否自动暂停本页面的视频
|
|
162
145
|
* @default true
|
|
163
146
|
* @supported weapp
|
|
164
|
-
* @h5 待定
|
|
165
147
|
*/
|
|
166
148
|
autoPauseIfOpenNative?: boolean
|
|
167
149
|
|
|
168
150
|
/** 在非全屏模式下,是否开启亮度与音量调节手势(同 `page-gesture`)
|
|
169
151
|
* @default false
|
|
170
|
-
* @supported weapp, swan, tt
|
|
171
|
-
* @h5 待定
|
|
152
|
+
* @supported weapp, h5, swan, tt
|
|
172
153
|
*/
|
|
173
154
|
vslideGesture?: boolean
|
|
174
155
|
|
|
175
156
|
/** 在全屏模式下,是否开启亮度与音量调节手势
|
|
176
157
|
* @default true
|
|
177
|
-
* @supported weapp, tt
|
|
178
|
-
* @h5 待定
|
|
158
|
+
* @supported weapp, h5, tt
|
|
179
159
|
*/
|
|
180
160
|
vslideGestureInFullscreen?: boolean
|
|
181
161
|
|
|
@@ -223,19 +203,19 @@ interface VideoProps extends StandardProps {
|
|
|
223
203
|
* @supported weapp
|
|
224
204
|
*/
|
|
225
205
|
showScreenLockButton?: boolean
|
|
226
|
-
|
|
206
|
+
|
|
227
207
|
/**
|
|
228
208
|
* 是否显示截屏按钮,仅在全屏时显示
|
|
229
209
|
* @supported weapp
|
|
230
210
|
*/
|
|
231
211
|
showSnapshotButton?: boolean
|
|
232
|
-
|
|
212
|
+
|
|
233
213
|
/**
|
|
234
214
|
* 是否展示后台音频播放按钮
|
|
235
215
|
* @supported weapp
|
|
236
216
|
*/
|
|
237
217
|
showBackgroundPlaybackButton?: boolean
|
|
238
|
-
|
|
218
|
+
|
|
239
219
|
/**
|
|
240
220
|
* 进入后台音频播放后的通知栏图标(Android 独有)
|
|
241
221
|
* @supported weapp
|
|
@@ -266,17 +246,13 @@ interface VideoProps extends StandardProps {
|
|
|
266
246
|
|
|
267
247
|
/** 当视频进入和退出全屏时触发
|
|
268
248
|
*
|
|
269
|
-
*
|
|
270
|
-
* @supported weapp, swan, alipay, rn, tt
|
|
271
|
-
* @h5 待定
|
|
249
|
+
* @supported weapp, h5, swan, alipay, rn, tt
|
|
272
250
|
*/
|
|
273
251
|
onFullscreenChange?: CommonEventFunction<VideoProps.onFullscreenChangeEventDetail>
|
|
274
252
|
|
|
275
|
-
/**
|
|
253
|
+
/** 视频出现缓冲时触发
|
|
276
254
|
*
|
|
277
|
-
* event.detail = {fullScreen, direction},direction 取为 vertical 或 horizontal
|
|
278
255
|
* @supported weapp, swan, tt
|
|
279
|
-
* @h5 待定
|
|
280
256
|
*/
|
|
281
257
|
onWaiting?: CommonEventFunction<VideoProps.onWaitingEventDetail>
|
|
282
258
|
|
|
@@ -284,9 +260,9 @@ interface VideoProps extends StandardProps {
|
|
|
284
260
|
* @supported weapp, h5, swan, alipay, tt, rn
|
|
285
261
|
*/
|
|
286
262
|
onError?: CommonEventFunction
|
|
263
|
+
|
|
287
264
|
/** 加载进度变化时触发,只支持一段加载
|
|
288
|
-
* @supported weapp, alipay
|
|
289
|
-
* @h5 待定
|
|
265
|
+
* @supported weapp, h5, alipay
|
|
290
266
|
*/
|
|
291
267
|
onProgress?: CommonEventFunction<VideoProps.onProgressEventDetail>
|
|
292
268
|
|
|
@@ -360,13 +336,13 @@ declare namespace VideoProps {
|
|
|
360
336
|
}
|
|
361
337
|
interface onFullscreenChangeEventDetail {
|
|
362
338
|
/** 方向 */
|
|
363
|
-
direction:
|
|
339
|
+
direction: 'vertical' | 'horizontal'
|
|
364
340
|
/** 全屏 */
|
|
365
341
|
fullScreen: number | boolean
|
|
366
342
|
}
|
|
367
343
|
interface onWaitingEventDetail {
|
|
368
344
|
/** 方向 */
|
|
369
|
-
direction:
|
|
345
|
+
direction: 'vertical' | 'horizontal'
|
|
370
346
|
/** 全屏 */
|
|
371
347
|
fullScreen: number | boolean
|
|
372
348
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,g as h}from"./p-059912fd.js";function e(t,i,s){if("search"===i&&(t="search"),s&&(t="password"),void 0===t)return"text";if(!t)throw new Error("unexpected type");return"digit"===t&&(t="number"),t}function o(t){return null!=t?t:""}let n=class{constructor(s){t(this,s),this.onInput=i(this,"input",7),this.onPaste=i(this,"paste",7),this.onFocus=i(this,"focus",7),this.onBlur=i(this,"blur",7),this.onConfirm=i(this,"confirm",7),this.onChange=i(this,"change",7),this.onKeyDown=i(this,"keydown",7),this.isOnComposition=!1,this.isOnPaste=!1,this.onInputExcuted=!1,this.password=!1,this.disabled=!1,this.maxlength=140,this.autoFocus=!1,this.confirmType="done",this.nativeProps={},this.handleInput=t=>{t.stopPropagation();const{type:i,maxlength:s,confirmType:h,password:o}=this;if(!this.isOnComposition&&!this.onInputExcuted){let n=t.target.value;const a=e(i,h,o);this.onInputExcuted=!0,"number"===a&&n&&s<=n.length&&(n=n.substring(0,s),t.target.value=n),this.value=n,this.onInput.emit({value:n,cursor:n.length})}},this.handlePaste=t=>{this.isOnPaste=!0,this.onPaste.emit({value:t.target.value})},this.handleFocus=t=>{this.onInputExcuted=!1,this.onFocus.emit({value:t.target.value})},this.handleBlur=t=>{this.onBlur.emit({value:t.target.value})},this.handleChange=t=>{t.stopPropagation(),this.onChange.emit({value:t.target.value}),this.isOnPaste&&(this.isOnPaste=!1,this.value=t.target.value,this.onInput.emit({value:t.target.value,cursor:t.target.value.length}))},this.handleKeyDown=t=>{const{value:i}=t.target,s=t.keyCode||t.code;this.onInputExcuted=!1,t.stopPropagation(),this.onKeyDown.emit({value:i,cursor:i.length,keyCode:s}),13===s&&this.onConfirm.emit({value:i})},this.handleComposition=t=>{t.target instanceof HTMLInputElement&&("compositionend"===t.type?(this.isOnComposition=!1,this.value=t.target.value,this.onInput.emit({value:t.target.value,cursor:t.target.value.length})):this.isOnComposition=!0)}}watchFocus(t,i){var s;!i&&t&&(null===(s=this.inputRef)||void 0===s||s.focus())}watchValue(t){const i=o(t);this.inputRef&&this.inputRef.value!==i&&(this.inputRef.value=i)}componentDidLoad(){var t,i,s;"file"===this.type?(this.fileListener=()=>{this.onInput.emit()},null===(t=this.inputRef)||void 0===t||t.addEventListener("change",this.fileListener)):(null===(i=this.inputRef)||void 0===i||i.addEventListener("compositionstart",this.handleComposition),null===(s=this.inputRef)||void 0===s||s.addEventListener("compositionend",this.handleComposition)),Object.defineProperty(this.el,"value",{get:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value},set:t=>this.value=t,configurable:!0})}disconnectedCallback(){var t;"file"===this.type&&(null===(t=this.inputRef)||void 0===t||t.removeEventListener("change",this.fileListener))}render(){const{value:t,type:i,password:h,placeholder:n,autoFocus:a,disabled:r,maxlength:u,confirmType:l,name:c,nativeProps:p}=this;return s("input",Object.assign({ref:t=>{this.inputRef=t},class:"weui-input",value:o(t),type:e(i,l,h),placeholder:n,autoFocus:a,disabled:r,maxlength:u,name:c,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,onCompositionStart:this.handleComposition,onCompositionEnd:this.handleComposition},p))}get el(){return h(this)}static get watchers(){return{autoFocus:["watchFocus"],value:["watchValue"]}}};n.style="taro-input-core{display:block}input{display:block;overflow:hidden;height:1.4rem;text-overflow:clip;text-align:inherit;white-space:nowrap}";export{n as taro_input_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var e,n,i,o;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.g}],execute:function(){var s="taro-input-core{display:block}input{display:block;overflow:hidden;height:1.4rem;text-overflow:clip;text-align:inherit;white-space:nowrap}";function a(t,e,n){if(e==="search")t="search";if(n)t="password";if(typeof t==="undefined"){return"text"}if(!t){throw new Error("unexpected type")}if(t==="digit")t="number";return t}function u(t){return t!==null&&t!==void 0?t:""}var r=t("taro_input_core",function(){function t(t){var i=this;e(this,t);this.onInput=n(this,"input",7);this.onPaste=n(this,"paste",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onConfirm=n(this,"confirm",7);this.onChange=n(this,"change",7);this.onKeyDown=n(this,"keydown",7);this.isOnComposition=false;this.isOnPaste=false;this.onInputExcuted=false;this.password=false;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.confirmType="done";this.nativeProps={};this.handleInput=function(t){t.stopPropagation();var e=i,n=e.type,o=e.maxlength,s=e.confirmType,u=e.password;if(!i.isOnComposition&&!i.onInputExcuted){var r=t.target.value;var l=a(n,s,u);i.onInputExcuted=true;if(l==="number"&&r&&o<=r.length){r=r.substring(0,o);t.target.value=r}i.value=r;i.onInput.emit({value:r,cursor:r.length})}};this.handlePaste=function(t){i.isOnPaste=true;i.onPaste.emit({value:t.target.value})};this.handleFocus=function(t){i.onInputExcuted=false;i.onFocus.emit({value:t.target.value})};this.handleBlur=function(t){i.onBlur.emit({value:t.target.value})};this.handleChange=function(t){t.stopPropagation();i.onChange.emit({value:t.target.value});if(i.isOnPaste){i.isOnPaste=false;i.value=t.target.value;i.onInput.emit({value:t.target.value,cursor:t.target.value.length})}};this.handleKeyDown=function(t){var e=t.target.value;var n=t.keyCode||t.code;i.onInputExcuted=false;t.stopPropagation();i.onKeyDown.emit({value:e,cursor:e.length,keyCode:n});n===13&&i.onConfirm.emit({value:e})};this.handleComposition=function(t){if(!(t.target instanceof HTMLInputElement))return;if(t.type==="compositionend"){i.isOnComposition=false;i.value=t.target.value;i.onInput.emit({value:t.target.value,cursor:t.target.value.length})}else{i.isOnComposition=true}}}t.prototype.watchFocus=function(t,e){var n;if(!e&&t){(n=this.inputRef)===null||n===void 0?void 0:n.focus()}};t.prototype.watchValue=function(t){var e=u(t);if(this.inputRef&&this.inputRef.value!==e){this.inputRef.value=e}};t.prototype.componentDidLoad=function(){var t=this;var e,n,i;if(this.type==="file"){this.fileListener=function(){t.onInput.emit()};(e=this.inputRef)===null||e===void 0?void 0:e.addEventListener("change",this.fileListener)}else{(n=this.inputRef)===null||n===void 0?void 0:n.addEventListener("compositionstart",this.handleComposition);(i=this.inputRef)===null||i===void 0?void 0:i.addEventListener("compositionend",this.handleComposition)}Object.defineProperty(this.el,"value",{get:function(){var e;return(e=t.inputRef)===null||e===void 0?void 0:e.value},set:function(e){return t.value=e},configurable:true})};t.prototype.disconnectedCallback=function(){var t;if(this.type==="file"){(t=this.inputRef)===null||t===void 0?void 0:t.removeEventListener("change",this.fileListener)}};t.prototype.render=function(){var t=this;var e=this,n=e.value,o=e.type,s=e.password,r=e.placeholder,l=e.autoFocus,h=e.disabled,p=e.maxlength,c=e.confirmType,f=e.name,d=e.nativeProps;return i("input",Object.assign({ref:function(e){t.inputRef=e},class:"weui-input",value:u(n),type:a(o,c,s),placeholder:r,autoFocus:l,disabled:h,maxlength:p,name:f,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,onCompositionStart:this.handleComposition,onCompositionEnd:this.handleComposition},d))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{autoFocus:["watchFocus"],value:["watchValue"]}},enumerable:false,configurable:true});return t}());r.style=s}}}));
|