@tarojs/components 3.3.14 → 3.3.15
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-components.cjs.js +1 -1
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +17 -3
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +49 -3
- package/dist/cjs/taro-input-core.cjs.entry.js +4 -4
- package/dist/cjs/taro-tabbar.cjs.entry.js +66 -20
- package/dist/cjs/taro-textarea-core.cjs.entry.js +63 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cover-image/cover-image.js +94 -0
- package/dist/collection/components/cover-image/style/index.css +5 -0
- package/dist/collection/components/cover-view/cover-view.js +166 -4
- package/dist/collection/components/cover-view/style/cover-view.css +3 -0
- package/dist/collection/components/input/input.js +4 -4
- package/dist/collection/components/tabbar/tabbar.js +70 -20
- package/dist/collection/components/textarea/style/index.css +6 -2
- package/dist/collection/components/textarea/textarea.js +98 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-cover-image-core.entry.js +18 -4
- package/dist/esm/taro-cover-view-core.entry.js +50 -4
- package/dist/esm/taro-input-core.entry.js +4 -4
- package/dist/esm/taro-tabbar.entry.js +66 -20
- package/dist/esm/taro-textarea-core.entry.js +63 -3
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.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/taro-components/p-139d4d14.entry.js +1 -0
- package/dist/taro-components/p-30bfacb9.system.js +1 -1
- package/dist/taro-components/p-33bcdee9.entry.js +1 -0
- package/dist/taro-components/p-39bee235.entry.js +1 -0
- package/dist/taro-components/p-79b3c05a.entry.js +1 -0
- package/dist/taro-components/p-8235b7b7.system.entry.js +1 -0
- package/dist/taro-components/p-9bd65170.system.entry.js +1 -0
- package/dist/taro-components/p-be2d1c4a.system.entry.js +1 -0
- package/dist/taro-components/p-cb8099dd.entry.js +1 -0
- package/dist/taro-components/p-d8363f59.system.entry.js +1 -0
- package/dist/taro-components/{p-2ef4681b.system.entry.js → p-d9494012.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/cover-image/cover-image.d.ts +11 -0
- package/dist/types/components/cover-view/cover-view.d.ts +14 -2
- package/dist/types/components/tabbar/tabbar.d.ts +20 -1
- package/dist/types/components/textarea/textarea.d.ts +6 -0
- package/dist/types/components.d.ts +18 -0
- package/dist-h5/vue/createComponent.js +4 -0
- package/dist-h5/vue/createFormsComponent.js +8 -1
- package/package.json +4 -4
- package/dist/collection/components/cover-view/cover-image.js +0 -11
- package/dist/taro-components/p-2c5d57af.entry.js +0 -1
- package/dist/taro-components/p-382cabbc.system.entry.js +0 -1
- package/dist/taro-components/p-70f40e3a.entry.js +0 -1
- package/dist/taro-components/p-af9ec312.system.entry.js +0 -1
- package/dist/taro-components/p-b6e0dca6.entry.js +0 -1
- package/dist/taro-components/p-c221cebb.system.entry.js +0 -1
- package/dist/taro-components/p-c5722042.entry.js +0 -1
- package/dist/taro-components/p-f8d0dabb.entry.js +0 -1
- package/dist/taro-components/p-f9013b36.system.entry.js +0 -1
- package/dist/types/components/cover-view/cover-image.d.ts +0 -4
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["taro-checkbox-core_2.cjs",[[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"]]]]],["taro-radio-core_2.cjs",[[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"]]]]],["taro-swiper-core_2.cjs",[[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"]}]]],["taro-audio-core.cjs",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-block-core.cjs",[[0,"taro-block-core"]]],["taro-button-core.cjs",[[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"]]]]],["taro-camera-core.cjs",[[0,"taro-camera-core"]]],["taro-canvas-core.cjs",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-cover-image-core.cjs",[[0,"taro-cover-image-core"]]],["taro-cover-view-core.cjs",[[
|
|
17
|
+
return index.bootstrapLazy([["taro-checkbox-core_2.cjs",[[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"]]]]],["taro-radio-core_2.cjs",[[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"]]]]],["taro-swiper-core_2.cjs",[[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"]}]]],["taro-audio-core.cjs",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-block-core.cjs",[[0,"taro-block-core"]]],["taro-button-core.cjs",[[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"]]]]],["taro-camera-core.cjs",[[0,"taro-camera-core"]]],["taro-canvas-core.cjs",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-cover-image-core.cjs",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["taro-cover-view-core.cjs",[[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"]]]]],["taro-custom-wrapper-core.cjs",[[0,"taro-custom-wrapper-core"]]],["taro-form-core.cjs",[[4,"taro-form-core",{"slotParent":[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-icon-core.cjs",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core.cjs",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-input-core.cjs",[[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],"_value":[32]}]]],["taro-label-core.cjs",[[4,"taro-label-core",{"for":[1]}]]],["taro-movable-area-core.cjs",[[0,"taro-movable-area-core"]]],["taro-movable-view-core.cjs",[[0,"taro-movable-view-core"]]],["taro-navigator-core.cjs",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-open-data-core.cjs",[[0,"taro-open-data-core"]]],["taro-picker-view-column-core.cjs",[[0,"taro-picker-view-column-core"]]],["taro-picker-view-core.cjs",[[0,"taro-picker-view-core"]]],["taro-progress-core.cjs",[[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]}]]],["taro-pull-to-refresh.cjs",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["taro-rich-text-core.cjs",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-scroll-view-core.cjs",[[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"]}]]],["taro-slider-core.cjs",[[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]}]]],["taro-switch-core.cjs",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tabbar.cjs",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["taro-text-core.cjs",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core.cjs",[[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]}]]],["taro-view-core.cjs",[[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"]]]]],["taro-web-view-core.cjs",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2.cjs",[[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"]]]]],["taro-video-control_3.cjs",[[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]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["taro-checkbox-core_2.cjs",[[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"]]]]],["taro-radio-core_2.cjs",[[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"]]]]],["taro-swiper-core_2.cjs",[[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"]}]]],["taro-audio-core.cjs",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-block-core.cjs",[[0,"taro-block-core"]]],["taro-button-core.cjs",[[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"]]]]],["taro-camera-core.cjs",[[0,"taro-camera-core"]]],["taro-canvas-core.cjs",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-cover-image-core.cjs",[[0,"taro-cover-image-core"]]],["taro-cover-view-core.cjs",[[
|
|
18
|
+
return index.bootstrapLazy([["taro-checkbox-core_2.cjs",[[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"]]]]],["taro-radio-core_2.cjs",[[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"]]]]],["taro-swiper-core_2.cjs",[[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"]}]]],["taro-audio-core.cjs",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-block-core.cjs",[[0,"taro-block-core"]]],["taro-button-core.cjs",[[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"]]]]],["taro-camera-core.cjs",[[0,"taro-camera-core"]]],["taro-canvas-core.cjs",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-cover-image-core.cjs",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["taro-cover-view-core.cjs",[[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"]]]]],["taro-custom-wrapper-core.cjs",[[0,"taro-custom-wrapper-core"]]],["taro-form-core.cjs",[[4,"taro-form-core",{"slotParent":[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-icon-core.cjs",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core.cjs",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-input-core.cjs",[[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],"_value":[32]}]]],["taro-label-core.cjs",[[4,"taro-label-core",{"for":[1]}]]],["taro-movable-area-core.cjs",[[0,"taro-movable-area-core"]]],["taro-movable-view-core.cjs",[[0,"taro-movable-view-core"]]],["taro-navigator-core.cjs",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-open-data-core.cjs",[[0,"taro-open-data-core"]]],["taro-picker-view-column-core.cjs",[[0,"taro-picker-view-column-core"]]],["taro-picker-view-core.cjs",[[0,"taro-picker-view-core"]]],["taro-progress-core.cjs",[[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]}]]],["taro-pull-to-refresh.cjs",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["taro-rich-text-core.cjs",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-scroll-view-core.cjs",[[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"]}]]],["taro-slider-core.cjs",[[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]}]]],["taro-switch-core.cjs",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tabbar.cjs",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["taro-text-core.cjs",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core.cjs",[[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]}]]],["taro-view-core.cjs",[[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"]]]]],["taro-web-view-core.cjs",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2.cjs",[[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"]]]]],["taro-video-control_3.cjs",[[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]}]]]], options);
|
|
19
19
|
});
|
|
@@ -4,16 +4,30 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-7464647f.js');
|
|
6
6
|
|
|
7
|
+
const indexCss = "taro-cover-image-core{overflow:hidden;width:320px;height:240px}";
|
|
8
|
+
|
|
7
9
|
let CoverImage = class {
|
|
8
10
|
constructor(hostRef) {
|
|
9
11
|
index.registerInstance(this, hostRef);
|
|
12
|
+
this.onLoad = index.createEvent(this, "load", 7);
|
|
13
|
+
this.onError = index.createEvent(this, "error", 7);
|
|
14
|
+
this.nativeProps = {};
|
|
15
|
+
}
|
|
16
|
+
imageOnLoad() {
|
|
17
|
+
const { width, height, } = this.imgRef;
|
|
18
|
+
this.onLoad.emit({
|
|
19
|
+
width,
|
|
20
|
+
height
|
|
21
|
+
});
|
|
10
22
|
}
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
imageOnError() {
|
|
24
|
+
this.onError.emit();
|
|
13
25
|
}
|
|
14
26
|
render() {
|
|
15
|
-
|
|
27
|
+
const { src, imageOnLoad, imageOnError, nativeProps } = this;
|
|
28
|
+
return (index.h("img", Object.assign({ ref: img => (this.imgRef = img), src: src, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) }, nativeProps)));
|
|
16
29
|
}
|
|
17
30
|
};
|
|
31
|
+
CoverImage.style = indexCss;
|
|
18
32
|
|
|
19
33
|
exports.taro_cover_image_core = CoverImage;
|
|
@@ -3,17 +3,63 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-7464647f.js');
|
|
6
|
+
const index$1 = require('./index-cde74e58.js');
|
|
7
|
+
|
|
8
|
+
const coverViewCss = "taro-cover-view-core{display:block}";
|
|
6
9
|
|
|
7
10
|
let CoverView = class {
|
|
8
11
|
constructor(hostRef) {
|
|
9
12
|
index.registerInstance(this, hostRef);
|
|
13
|
+
this.onLongPress = index.createEvent(this, "longpress", 7);
|
|
14
|
+
this.hoverStartTime = 50;
|
|
15
|
+
this.hoverStayTime = 400;
|
|
16
|
+
this.hover = false;
|
|
17
|
+
this.touch = false;
|
|
18
|
+
this.startTime = 0;
|
|
19
|
+
}
|
|
20
|
+
onTouchStart() {
|
|
21
|
+
if (this.hoverClass) {
|
|
22
|
+
this.touch = true;
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
if (this.touch) {
|
|
25
|
+
this.hover = true;
|
|
26
|
+
}
|
|
27
|
+
}, this.hoverStartTime);
|
|
28
|
+
}
|
|
29
|
+
this.timeoutEvent = setTimeout(() => {
|
|
30
|
+
this.onLongPress.emit();
|
|
31
|
+
}, 350);
|
|
32
|
+
this.startTime = Date.now();
|
|
33
|
+
}
|
|
34
|
+
onTouchMove() {
|
|
35
|
+
clearTimeout(this.timeoutEvent);
|
|
10
36
|
}
|
|
11
|
-
|
|
12
|
-
|
|
37
|
+
onTouchEnd() {
|
|
38
|
+
const spanTime = Date.now() - this.startTime;
|
|
39
|
+
if (spanTime < 350) {
|
|
40
|
+
clearTimeout(this.timeoutEvent);
|
|
41
|
+
}
|
|
42
|
+
if (this.hoverClass) {
|
|
43
|
+
this.touch = false;
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
if (!this.touch) {
|
|
46
|
+
this.hover = false;
|
|
47
|
+
}
|
|
48
|
+
}, this.hoverStayTime);
|
|
49
|
+
}
|
|
13
50
|
}
|
|
14
51
|
render() {
|
|
15
|
-
|
|
52
|
+
const cls = index$1.classnames({
|
|
53
|
+
[`${this.hoverClass}`]: this.hover
|
|
54
|
+
});
|
|
55
|
+
let attr = {};
|
|
56
|
+
if (!!this.animation) {
|
|
57
|
+
attr['animation'] = this.animation;
|
|
58
|
+
attr['data-animation'] = this.animation;
|
|
59
|
+
}
|
|
60
|
+
return (index.h(index.Host, Object.assign({ class: cls }, attr), index.h("slot", null)));
|
|
16
61
|
}
|
|
17
62
|
};
|
|
63
|
+
CoverView.style = coverViewCss;
|
|
18
64
|
|
|
19
65
|
exports.taro_cover_view_core = CoverView;
|
|
@@ -126,7 +126,7 @@ let Input = class {
|
|
|
126
126
|
this._value = this.value;
|
|
127
127
|
}
|
|
128
128
|
componentDidLoad() {
|
|
129
|
-
var _a, _b, _c;
|
|
129
|
+
var _a, _b, _c, _d;
|
|
130
130
|
if (this.type === 'file') {
|
|
131
131
|
this.fileListener = () => {
|
|
132
132
|
this.onInput.emit();
|
|
@@ -144,6 +144,7 @@ let Input = class {
|
|
|
144
144
|
},
|
|
145
145
|
configurable: true
|
|
146
146
|
});
|
|
147
|
+
this.autoFocus && ((_d = this.inputRef) === null || _d === void 0 ? void 0 : _d.focus());
|
|
147
148
|
}
|
|
148
149
|
disconnectedCallback() {
|
|
149
150
|
var _a;
|
|
@@ -152,11 +153,10 @@ let Input = class {
|
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
render() {
|
|
155
|
-
const { _value, type, password, placeholder, disabled, maxlength,
|
|
156
|
+
const { _value, type, password, placeholder, disabled, maxlength, confirmType, name, nativeProps } = this;
|
|
156
157
|
return (index.h("input", Object.assign({ ref: input => {
|
|
157
158
|
this.inputRef = input;
|
|
158
|
-
|
|
159
|
-
}, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown }, nativeProps)));
|
|
159
|
+
}, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, disabled: disabled, maxlength: maxlength, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown }, nativeProps)));
|
|
160
160
|
}
|
|
161
161
|
get el() { return index.getElement(this); }
|
|
162
162
|
static get watchers() { return {
|
|
@@ -156,18 +156,18 @@ let Tabbar = class {
|
|
|
156
156
|
this.status = STATUS_SHOW;
|
|
157
157
|
this.getOriginUrl = (url) => {
|
|
158
158
|
const customRoute = this.customRoutes.filter(([, customUrl]) => {
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
return
|
|
159
|
+
const pathA = splitUrl(customUrl).path;
|
|
160
|
+
const pathB = splitUrl(url).path;
|
|
161
|
+
return pathA === pathB;
|
|
162
162
|
});
|
|
163
163
|
return customRoute.length ? customRoute[0][0] : url;
|
|
164
164
|
};
|
|
165
165
|
this.getSelectedIndex = (url) => {
|
|
166
166
|
let foundIndex = -1;
|
|
167
167
|
this.list.forEach(({ pagePath }, idx) => {
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
168
|
+
const pathA = splitUrl(url).path;
|
|
169
|
+
const pathB = splitUrl(pagePath).path;
|
|
170
|
+
if (pathA === pathB) {
|
|
171
171
|
foundIndex = idx;
|
|
172
172
|
}
|
|
173
173
|
});
|
|
@@ -210,23 +210,27 @@ let Tabbar = class {
|
|
|
210
210
|
}
|
|
211
211
|
this.selectedIndex = this.getSelectedIndex(this.getOriginUrl(currentPage));
|
|
212
212
|
};
|
|
213
|
-
this.setTabBarBadgeHandler = ({ index, text, errorHandler }) => {
|
|
214
|
-
const list = this.list;
|
|
213
|
+
this.setTabBarBadgeHandler = ({ index, text, successHandler, errorHandler }) => {
|
|
214
|
+
const list = [...this.list];
|
|
215
215
|
if (index in list) {
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
list[index].showRedDot = false;
|
|
217
|
+
list[index].badgeText = text;
|
|
218
|
+
successHandler({
|
|
219
|
+
errMsg: 'setTabBarBadge:ok'
|
|
220
|
+
});
|
|
218
221
|
}
|
|
219
222
|
else {
|
|
220
223
|
errorHandler({
|
|
221
224
|
errMsg: 'setTabBarBadge:fail tabbar item not found'
|
|
222
225
|
});
|
|
223
226
|
}
|
|
227
|
+
this.list = list;
|
|
224
228
|
};
|
|
225
229
|
this.removeTabBarBadgeHandler = ({ index, successHandler, errorHandler }) => {
|
|
226
|
-
const list = this.list;
|
|
230
|
+
const list = [...this.list];
|
|
227
231
|
if (index in list) {
|
|
228
|
-
|
|
229
|
-
|
|
232
|
+
list[index].badgeText = null;
|
|
233
|
+
list[index].badgeText = null;
|
|
230
234
|
successHandler({
|
|
231
235
|
errMsg: 'removeTabBarBadge:ok'
|
|
232
236
|
});
|
|
@@ -236,9 +240,10 @@ let Tabbar = class {
|
|
|
236
240
|
errMsg: 'removeTabBarBadge:fail tabbar item not found'
|
|
237
241
|
});
|
|
238
242
|
}
|
|
243
|
+
this.list = list;
|
|
239
244
|
};
|
|
240
245
|
this.showTabBarRedDotHandler = ({ index, successHandler, errorHandler }) => {
|
|
241
|
-
const list = this.list;
|
|
246
|
+
const list = [...this.list];
|
|
242
247
|
if (index in list) {
|
|
243
248
|
list[index].badgeText = null;
|
|
244
249
|
list[index].showRedDot = true;
|
|
@@ -251,9 +256,10 @@ let Tabbar = class {
|
|
|
251
256
|
errMsg: 'showTabBarRedDot:fail tabbar item not found'
|
|
252
257
|
});
|
|
253
258
|
}
|
|
259
|
+
this.list = list;
|
|
254
260
|
};
|
|
255
261
|
this.hideTabBarRedDotHandler = ({ index, successHandler, errorHandler }) => {
|
|
256
|
-
const list = this.list;
|
|
262
|
+
const list = [...this.list];
|
|
257
263
|
if (index in list) {
|
|
258
264
|
list[index].showRedDot = false;
|
|
259
265
|
successHandler({
|
|
@@ -265,6 +271,7 @@ let Tabbar = class {
|
|
|
265
271
|
errMsg: 'hideTabBarRedDot:fail tabbar item not found'
|
|
266
272
|
});
|
|
267
273
|
}
|
|
274
|
+
this.list = list;
|
|
268
275
|
};
|
|
269
276
|
this.showTabBarHandler = ({ successHandler }) => {
|
|
270
277
|
this.status = STATUS_SHOW;
|
|
@@ -278,6 +285,39 @@ let Tabbar = class {
|
|
|
278
285
|
errMsg: 'hideTabBar:ok'
|
|
279
286
|
});
|
|
280
287
|
};
|
|
288
|
+
this.setTabBarStyleHandler = ({ color, selectedColor, backgroundColor, borderStyle, successHandler }) => {
|
|
289
|
+
if (backgroundColor)
|
|
290
|
+
this.backgroundColor = backgroundColor;
|
|
291
|
+
if (borderStyle)
|
|
292
|
+
this.borderStyle = borderStyle;
|
|
293
|
+
if (color)
|
|
294
|
+
this.color = color;
|
|
295
|
+
if (selectedColor)
|
|
296
|
+
this.selectedColor = selectedColor;
|
|
297
|
+
successHandler({
|
|
298
|
+
errMsg: 'setTabBarStyle:ok'
|
|
299
|
+
});
|
|
300
|
+
};
|
|
301
|
+
this.setTabBarItemHandler = ({ index, iconPath, selectedIconPath, text, successHandler, errorHandler }) => {
|
|
302
|
+
const list = [...this.list];
|
|
303
|
+
if (index in list) {
|
|
304
|
+
if (iconPath)
|
|
305
|
+
list[index].iconPath = iconPath;
|
|
306
|
+
if (selectedIconPath)
|
|
307
|
+
list[index].selectedIconPath = selectedIconPath;
|
|
308
|
+
if (text)
|
|
309
|
+
list[index].text = text;
|
|
310
|
+
successHandler({
|
|
311
|
+
errMsg: 'setTabBarItem:ok'
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
errorHandler({
|
|
316
|
+
errMsg: 'setTabBarItem:fail tabbar item not found'
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
this.list = list;
|
|
320
|
+
};
|
|
281
321
|
const list = this.conf.list;
|
|
282
322
|
const customRoutes = this.conf.customRoutes;
|
|
283
323
|
if (Object.prototype.toString.call(list) !== '[object Array]' ||
|
|
@@ -295,6 +335,7 @@ let Tabbar = class {
|
|
|
295
335
|
}
|
|
296
336
|
});
|
|
297
337
|
this.list = list;
|
|
338
|
+
this.borderStyle = this.conf.borderStyle;
|
|
298
339
|
}
|
|
299
340
|
getCurrentUrl() {
|
|
300
341
|
const routerMode = this.conf.mode;
|
|
@@ -322,6 +363,8 @@ let Tabbar = class {
|
|
|
322
363
|
Taro.eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
|
|
323
364
|
Taro.eventCenter.on('__taroShowTabBar', this.showTabBarHandler);
|
|
324
365
|
Taro.eventCenter.on('__taroHideTabBar', this.hideTabBarHandler);
|
|
366
|
+
Taro.eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler);
|
|
367
|
+
Taro.eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler);
|
|
325
368
|
}
|
|
326
369
|
removeEvent() {
|
|
327
370
|
Taro.eventCenter.off('__taroRouterChange', this.routerChangeHandler);
|
|
@@ -332,6 +375,8 @@ let Tabbar = class {
|
|
|
332
375
|
Taro.eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
|
|
333
376
|
Taro.eventCenter.off('__taroShowTabBar', this.showTabBarHandler);
|
|
334
377
|
Taro.eventCenter.off('__taroHideTabBar', this.hideTabBarHandler);
|
|
378
|
+
Taro.eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler);
|
|
379
|
+
Taro.eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler);
|
|
335
380
|
}
|
|
336
381
|
componentDidLoad() {
|
|
337
382
|
this.tabbarPos = this.tabbar.nextElementSibling ? 'top' : 'bottom';
|
|
@@ -342,10 +387,10 @@ let Tabbar = class {
|
|
|
342
387
|
this.removeEvent();
|
|
343
388
|
}
|
|
344
389
|
render() {
|
|
345
|
-
const {
|
|
390
|
+
const { tabbarPos = 'bottom' } = this;
|
|
346
391
|
const status = this.status;
|
|
347
392
|
const containerCls = index.classnames('weui-tabbar', {
|
|
348
|
-
[`taro-tabbar__border-${
|
|
393
|
+
[`taro-tabbar__border-${this.borderStyle || 'black'}`]: true
|
|
349
394
|
});
|
|
350
395
|
const shouldHideTabBar = this.selectedIndex === -1 || status === STATUS_HIDE;
|
|
351
396
|
const shouldSlideout = status === STATUS_SLIDEOUT;
|
|
@@ -353,19 +398,20 @@ let Tabbar = class {
|
|
|
353
398
|
[hideTabBarClassName]: shouldHideTabBar,
|
|
354
399
|
[hideTabBarWithAnimationClassName]: shouldSlideout
|
|
355
400
|
}) }, index$1.h("div", { class: containerCls, style: {
|
|
356
|
-
backgroundColor:
|
|
401
|
+
backgroundColor: this.backgroundColor || ''
|
|
357
402
|
} }, this.list.map((item, index) => {
|
|
358
403
|
const isSelected = this.selectedIndex === index;
|
|
359
404
|
let textColor;
|
|
360
405
|
let iconPath;
|
|
361
406
|
if (isSelected) {
|
|
362
|
-
textColor =
|
|
407
|
+
textColor = this.selectedColor;
|
|
363
408
|
iconPath = item.selectedIconPath;
|
|
364
409
|
}
|
|
365
410
|
else {
|
|
366
|
-
textColor =
|
|
411
|
+
textColor = this.color || '';
|
|
367
412
|
iconPath = item.iconPath;
|
|
368
413
|
}
|
|
414
|
+
console.log('TabbarItem', item);
|
|
369
415
|
return (index$1.h(TabbarItem, { index: index, onSelect: this.switchTab.bind(this), isSelected: isSelected, textColor: textColor, iconPath: iconPath, text: item.text, badgeText: item.badgeText, showRedDot: item.showRedDot }));
|
|
370
416
|
}))));
|
|
371
417
|
}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-7464647f.js');
|
|
6
6
|
|
|
7
|
-
const indexCss = "taro-textarea-core{display:block;width:300px
|
|
7
|
+
const indexCss = "taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";
|
|
8
8
|
|
|
9
9
|
function fixControlledValue(value) {
|
|
10
10
|
return value !== null && value !== void 0 ? value : '';
|
|
@@ -16,12 +16,16 @@ let Textarea = class {
|
|
|
16
16
|
this.onFocus = index.createEvent(this, "focus", 7);
|
|
17
17
|
this.onBlur = index.createEvent(this, "blur", 7);
|
|
18
18
|
this.onChange = index.createEvent(this, "change", 7);
|
|
19
|
+
this.onLineChange = index.createEvent(this, "linechange", 7);
|
|
19
20
|
this.disabled = false;
|
|
20
21
|
this.maxlength = 140;
|
|
21
22
|
this.autoFocus = false;
|
|
23
|
+
this.autoHeight = false;
|
|
22
24
|
this.nativeProps = {};
|
|
25
|
+
this.line = 1;
|
|
23
26
|
this.hanldeInput = (e) => {
|
|
24
27
|
e.stopPropagation();
|
|
28
|
+
this.handleLineChange();
|
|
25
29
|
this.onInput.emit({
|
|
26
30
|
value: e.target.value,
|
|
27
31
|
cursor: e.target.value.length
|
|
@@ -43,6 +47,58 @@ let Textarea = class {
|
|
|
43
47
|
value: e.target.value
|
|
44
48
|
});
|
|
45
49
|
};
|
|
50
|
+
this.handleLineChange = () => {
|
|
51
|
+
const line = this.getNumberOfLines();
|
|
52
|
+
if (line !== this.line) {
|
|
53
|
+
this.line = line;
|
|
54
|
+
this.onLineChange.emit({
|
|
55
|
+
height: this.textareaRef.clientHeight,
|
|
56
|
+
lineCount: this.line
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
this.calculateContentHeight = (ta, scanAmount) => {
|
|
61
|
+
let origHeight = ta.style.height, height = ta.offsetHeight, scrollHeight = ta.scrollHeight, overflow = ta.style.overflow;
|
|
62
|
+
/// only bother if the ta is bigger than content
|
|
63
|
+
if (height >= scrollHeight) {
|
|
64
|
+
/// check that our browser supports changing dimension
|
|
65
|
+
/// calculations mid-way through a function call...
|
|
66
|
+
ta.style.height = height + scanAmount + 'px';
|
|
67
|
+
/// because the scrollbar can cause calculation problems
|
|
68
|
+
ta.style.overflow = 'hidden';
|
|
69
|
+
/// by checking that scrollHeight has updated
|
|
70
|
+
if (scrollHeight < ta.scrollHeight) {
|
|
71
|
+
/// now try and scan the ta's height downwards
|
|
72
|
+
/// until scrollHeight becomes larger than height
|
|
73
|
+
while (ta.offsetHeight >= ta.scrollHeight) {
|
|
74
|
+
ta.style.height = (height -= scanAmount) + 'px';
|
|
75
|
+
}
|
|
76
|
+
/// be more specific to get the exact height
|
|
77
|
+
while (ta.offsetHeight < ta.scrollHeight) {
|
|
78
|
+
ta.style.height = height++ + 'px';
|
|
79
|
+
}
|
|
80
|
+
/// reset the ta back to it's original height
|
|
81
|
+
ta.style.height = origHeight;
|
|
82
|
+
/// put the overflow back
|
|
83
|
+
ta.style.overflow = overflow;
|
|
84
|
+
return height;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return scrollHeight;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
this.getNumberOfLines = () => {
|
|
92
|
+
const ta = this.textareaRef, style = window.getComputedStyle ? window.getComputedStyle(ta) : ta.style,
|
|
93
|
+
// This will get the line-height only if it is set in the css,
|
|
94
|
+
// otherwise it's "normal"
|
|
95
|
+
taLineHeight = parseInt(style.lineHeight, 10),
|
|
96
|
+
// Get the scroll height of the textarea
|
|
97
|
+
taHeight = this.calculateContentHeight(ta, taLineHeight),
|
|
98
|
+
// calculate the number of lines
|
|
99
|
+
numberOfLines = Math.floor(taHeight / taLineHeight);
|
|
100
|
+
return numberOfLines;
|
|
101
|
+
};
|
|
46
102
|
}
|
|
47
103
|
componentDidLoad() {
|
|
48
104
|
Object.defineProperty(this.el, 'value', {
|
|
@@ -53,12 +109,16 @@ let Textarea = class {
|
|
|
53
109
|
this.autoFocus && this.textareaRef.focus();
|
|
54
110
|
}
|
|
55
111
|
render() {
|
|
56
|
-
const { value, placeholder, disabled, maxlength, autoFocus, name, nativeProps, hanldeInput, handleFocus, handleBlur, handleChange } = this;
|
|
112
|
+
const { value, placeholder, disabled, maxlength, autoFocus, autoHeight, name, nativeProps, hanldeInput, handleFocus, handleBlur, handleChange } = this;
|
|
113
|
+
const otherProps = {};
|
|
114
|
+
if (autoHeight) {
|
|
115
|
+
otherProps.rows = this.line;
|
|
116
|
+
}
|
|
57
117
|
return (index.h("textarea", Object.assign({ ref: input => {
|
|
58
118
|
if (input) {
|
|
59
119
|
this.textareaRef = input;
|
|
60
120
|
}
|
|
61
|
-
}, class:
|
|
121
|
+
}, class: `taro-textarea ${autoHeight ? 'auto-height' : ''}`, value: fixControlledValue(value), placeholder: placeholder, name: name, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, onInput: hanldeInput, onFocus: handleFocus, onBlur: handleBlur, onChange: handleChange }, nativeProps, otherProps)));
|
|
62
122
|
}
|
|
63
123
|
get el() { return index.getElement(this); }
|
|
64
124
|
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"./components/canvas/canvas.js",
|
|
8
8
|
"./components/checkbox/checkbox-group.js",
|
|
9
9
|
"./components/checkbox/checkbox.js",
|
|
10
|
-
"./components/cover-
|
|
10
|
+
"./components/cover-image/cover-image.js",
|
|
11
11
|
"./components/cover-view/cover-view.js",
|
|
12
12
|
"./components/custom-wrapper/custom-wrapper.js",
|
|
13
13
|
"./components/form/form.js",
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, Prop, Event, h } from '@stencil/core';
|
|
3
|
+
export class CoverImage {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.nativeProps = {};
|
|
6
|
+
}
|
|
7
|
+
imageOnLoad() {
|
|
8
|
+
const { width, height, } = this.imgRef;
|
|
9
|
+
this.onLoad.emit({
|
|
10
|
+
width,
|
|
11
|
+
height
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
imageOnError() {
|
|
15
|
+
this.onError.emit();
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const { src, imageOnLoad, imageOnError, nativeProps } = this;
|
|
19
|
+
return (h("img", Object.assign({ ref: img => (this.imgRef = img), src: src, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) }, nativeProps)));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "taro-cover-image-core"; }
|
|
22
|
+
static get originalStyleUrls() { return {
|
|
23
|
+
"$": ["./style/index.scss"]
|
|
24
|
+
}; }
|
|
25
|
+
static get styleUrls() { return {
|
|
26
|
+
"$": ["./style/index.css"]
|
|
27
|
+
}; }
|
|
28
|
+
static get properties() { return {
|
|
29
|
+
"src": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"mutable": false,
|
|
32
|
+
"complexType": {
|
|
33
|
+
"original": "string",
|
|
34
|
+
"resolved": "string",
|
|
35
|
+
"references": {}
|
|
36
|
+
},
|
|
37
|
+
"required": false,
|
|
38
|
+
"optional": false,
|
|
39
|
+
"docs": {
|
|
40
|
+
"tags": [],
|
|
41
|
+
"text": ""
|
|
42
|
+
},
|
|
43
|
+
"attribute": "src",
|
|
44
|
+
"reflect": false
|
|
45
|
+
},
|
|
46
|
+
"nativeProps": {
|
|
47
|
+
"type": "unknown",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "{}",
|
|
51
|
+
"resolved": "{}",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": ""
|
|
59
|
+
},
|
|
60
|
+
"defaultValue": "{}"
|
|
61
|
+
}
|
|
62
|
+
}; }
|
|
63
|
+
static get events() { return [{
|
|
64
|
+
"method": "onLoad",
|
|
65
|
+
"name": "load",
|
|
66
|
+
"bubbles": true,
|
|
67
|
+
"cancelable": true,
|
|
68
|
+
"composed": true,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": ""
|
|
72
|
+
},
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "any",
|
|
75
|
+
"resolved": "any",
|
|
76
|
+
"references": {}
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
"method": "onError",
|
|
80
|
+
"name": "error",
|
|
81
|
+
"bubbles": true,
|
|
82
|
+
"cancelable": true,
|
|
83
|
+
"composed": true,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": ""
|
|
87
|
+
},
|
|
88
|
+
"complexType": {
|
|
89
|
+
"original": "any",
|
|
90
|
+
"resolved": "any",
|
|
91
|
+
"references": {}
|
|
92
|
+
}
|
|
93
|
+
}]; }
|
|
94
|
+
}
|