@tarojs/components 3.7.0-alpha.1 → 3.7.0-alpha.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/hls-00fec546.js +25673 -0
- package/dist/{esm/index-394db4c1.js → cjs/index-f6805218.js} +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-input-core.cjs.entry.js +6 -11
- package/dist/cjs/taro-navigator-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +23 -20
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +1 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +6 -0
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +1 -1
- package/dist/cjs/taro-text-core.cjs.entry.js +9 -6
- package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -8
- package/dist/cjs/taro-video-control_3.cjs.entry.js +3 -3
- package/dist/cjs/taro-view-core.cjs.entry.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +4 -4
- package/dist/collection/components/input/input.js +9 -13
- package/dist/collection/components/picker/picker-group.js +29 -26
- package/dist/collection/components/picker/picker.js +42 -16
- package/dist/collection/components/rich-text/rich-text.js +71 -0
- package/dist/collection/components/rich-text/style/index.css +16 -0
- package/dist/collection/components/text/style/index.css +20 -3
- package/dist/collection/components/text/text.js +66 -6
- package/dist/collection/components/textarea/textarea.js +4 -10
- package/dist/collection/components/video/video.js +1 -1
- package/dist/components/hls.js +23206 -24210
- package/dist/components/index2.js +1 -7
- package/dist/components/picker-group.js +9 -9
- package/dist/components/taro-checkbox-core.js +1 -1
- package/dist/components/taro-input-core.js +7 -12
- package/dist/components/taro-picker-core.js +16 -13
- package/dist/components/taro-rich-text-core.js +10 -1
- package/dist/components/taro-text-core.js +13 -7
- package/dist/components/taro-textarea-core.js +2 -9
- package/dist/components/taro-video-core.js +2 -2
- package/dist/esm/hls-4018c7ea.js +25671 -0
- package/dist/{cjs/index-067a58c1.js → esm/index-c3e4004b.js} +1 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-cover-view-core.entry.js +1 -1
- package/dist/esm/taro-icon-core.entry.js +1 -1
- package/dist/esm/taro-image-core.entry.js +1 -1
- package/dist/esm/taro-input-core.entry.js +6 -11
- package/dist/esm/taro-navigator-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +23 -20
- package/dist/esm/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm/taro-rich-text-core.entry.js +6 -0
- package/dist/esm/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +1 -1
- package/dist/esm/taro-text-core.entry.js +9 -6
- package/dist/esm/taro-textarea-core.entry.js +1 -8
- package/dist/esm/taro-video-control_3.entry.js +3 -3
- package/dist/esm/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/hls-4018c7ea.js +1 -0
- package/dist/esm-es5/index-c3e4004b.js +7 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-icon-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- 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-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/taro-components/p-01e163f8.system.entry.js +1 -0
- package/dist/taro-components/p-085076c5.system.entry.js +1 -0
- package/dist/taro-components/{p-25adb80c.entry.js → p-091a7153.entry.js} +1 -1
- package/dist/taro-components/{p-cd90bead.system.entry.js → p-0cf235de.system.entry.js} +1 -1
- package/dist/taro-components/p-0fa96970.entry.js +1 -0
- package/dist/taro-components/{p-edbb1a17.system.entry.js → p-1991cc1a.system.entry.js} +1 -1
- package/dist/taro-components/{p-c0ec2f41.system.entry.js → p-2accb92c.system.entry.js} +1 -1
- package/dist/taro-components/p-2ec68968.system.js +7 -0
- package/dist/taro-components/{p-18703731.system.entry.js → p-416cc4dd.system.entry.js} +1 -1
- package/dist/taro-components/p-425c209a.entry.js +1 -0
- package/dist/taro-components/p-43efbf30.js +1 -0
- package/dist/taro-components/{p-385d8aed.entry.js → p-4874f671.entry.js} +1 -1
- package/dist/taro-components/{p-2c89af5b.system.entry.js → p-657cb6e4.system.entry.js} +1 -1
- package/dist/taro-components/p-6cde180b.entry.js +1 -0
- package/dist/taro-components/{p-c490cd45.entry.js → p-7152d85b.entry.js} +1 -1
- package/dist/taro-components/{p-ab2d4f12.entry.js → p-719e1eaf.entry.js} +1 -1
- package/dist/taro-components/{p-b898d734.entry.js → p-78e4805e.entry.js} +1 -1
- package/dist/taro-components/{p-6800ccdc.system.entry.js → p-7ff654e6.system.entry.js} +1 -1
- package/dist/taro-components/{p-16336cc6.system.entry.js → p-98f9f50f.system.entry.js} +1 -1
- package/dist/taro-components/p-9edea30f.system.entry.js +1 -0
- package/dist/taro-components/{p-3f9f3448.entry.js → p-9fe49bab.entry.js} +1 -1
- package/dist/taro-components/{p-31bba7c3.entry.js → p-a20ecd3b.entry.js} +1 -1
- package/dist/taro-components/p-a20fed0a.entry.js +1 -0
- package/dist/taro-components/{p-7c2454dd.system.entry.js → p-a8925584.system.entry.js} +1 -1
- package/dist/taro-components/p-a8e7cf87.entry.js +1 -0
- package/dist/taro-components/{p-5905e3ef.system.entry.js → p-a96b4b19.system.entry.js} +1 -1
- package/dist/taro-components/{p-c2322741.system.entry.js → p-b1d2b575.system.entry.js} +1 -1
- package/dist/taro-components/p-c39a46ca.system.entry.js +1 -0
- package/dist/taro-components/{p-ca3a269f.entry.js → p-c4b8851b.entry.js} +1 -1
- package/dist/taro-components/{p-e5f78321.system.entry.js → p-cdb76676.system.entry.js} +1 -1
- package/dist/taro-components/p-de951a46.js +7 -0
- package/dist/taro-components/p-e09451c5.system.entry.js +1 -0
- package/dist/taro-components/{p-df4c2f21.entry.js → p-e33f3592.entry.js} +1 -1
- package/dist/taro-components/p-e78775ce.system.js +1 -0
- package/dist/taro-components/p-ebc7b6fc.entry.js +1 -0
- package/dist/taro-components/p-ed331c06.system.js +1 -1
- package/dist/taro-components/p-f02b6f70.entry.js +1 -0
- package/dist/taro-components/{p-1e43a2d5.entry.js → p-f07cd1de.entry.js} +1 -1
- package/dist/taro-components/p-f6f6a996.system.entry.js +1 -0
- package/dist/taro-components/taro-components.css +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +2 -2
- package/dist/types/components/picker/picker-group.d.ts +3 -3
- package/dist/types/components/picker/picker.d.ts +7 -2
- package/dist/types/components/rich-text/rich-text.d.ts +4 -0
- package/dist/types/components/text/text.d.ts +4 -0
- package/dist/types/components/textarea/textarea.d.ts +0 -1
- package/dist/types/components.d.ts +26 -8
- package/lib/react/component-lib/index.js +50 -50
- package/lib/react/component-lib/index.js.map +1 -1
- package/lib/react/component-lib/reactify-wc.js +1 -1
- package/lib/react/component-lib/reactify-wc.js.map +1 -1
- package/lib/react/components.d.ts +1 -3
- package/lib/react/components.js +2 -2
- package/lib/react/components.js.map +1 -1
- package/lib/react/helper.d.ts +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/lib/react/react-component-lib/utils/attachProps.js +1 -4
- package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/lib/vue2/components.d.ts +9 -3
- package/lib/vue2/components.js +12 -6
- package/lib/vue2/components.js.map +1 -1
- package/lib/vue2/vue-component-lib/utils.js.map +1 -1
- package/lib/vue3/component-lib/index.js +48 -48
- package/lib/vue3/component-lib/index.js.map +1 -1
- package/lib/vue3/components.d.ts +1 -1
- package/lib/vue3/components.js +13 -6
- package/lib/vue3/components.js.map +1 -1
- package/lib/vue3/vue-component-lib/utils.js.map +1 -1
- package/package.json +13 -11
- package/types/Button.d.ts +9 -7
- package/types/ChannelVideo.d.ts +4 -0
- package/types/Form.d.ts +11 -0
- package/types/Image.d.ts +5 -0
- package/types/Input.d.ts +6 -1
- package/types/LivePlayer.d.ts +17 -0
- package/types/LivePusher.d.ts +10 -0
- package/types/Picker.d.ts +9 -0
- package/types/Progress.d.ts +2 -2
- package/types/RichText.d.ts +6 -4
- package/types/ScrollView.d.ts +5 -5
- package/types/ShareElement.d.ts +39 -0
- package/types/StickySection.d.ts +0 -1
- package/types/Swiper.d.ts +10 -0
- package/types/Text.d.ts +8 -3
- package/types/Textarea.d.ts +10 -3
- package/types/Video.d.ts +12 -0
- package/types/View.d.ts +1 -1
- package/virtual-list/index.js +2 -2
- package/dist/cjs/hls-0f2d4d85.js +0 -26677
- package/dist/esm/hls-0e83e558.js +0 -26675
- package/dist/esm-es5/hls-0e83e558.js +0 -289
- package/dist/esm-es5/index-394db4c1.js +0 -7
- package/dist/taro-components/p-198000d8.system.js +0 -289
- package/dist/taro-components/p-2fad2a65.js +0 -7
- package/dist/taro-components/p-387314fa.system.js +0 -7
- package/dist/taro-components/p-3e701660.js +0 -289
- package/dist/taro-components/p-4e9bd4f6.entry.js +0 -1
- package/dist/taro-components/p-589293fd.entry.js +0 -1
- package/dist/taro-components/p-58b19305.system.entry.js +0 -1
- package/dist/taro-components/p-5b67a98e.entry.js +0 -1
- package/dist/taro-components/p-735c2a72.system.entry.js +0 -1
- package/dist/taro-components/p-97f0ad72.system.entry.js +0 -1
- package/dist/taro-components/p-a132ebb9.entry.js +0 -1
- package/dist/taro-components/p-c43c5e89.system.entry.js +0 -1
- package/dist/taro-components/p-cc7b95fd.system.entry.js +0 -1
- package/dist/taro-components/p-d9e2e3aa.entry.js +0 -1
- package/dist/taro-components/p-dcbb7b2d.entry.js +0 -1
- package/dist/taro-components/p-ed011ff9.entry.js +0 -1
- package/dist/taro-components/p-fa43177b.system.entry.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function createCommonjsModule(r,e,n){return n={path:e,exports:{},require:function(r,e){return commonjsRequire()}},r(n,n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var classnames=createCommonjsModule((function(r){
|
|
2
|
+
/*!
|
|
3
|
+
Copyright (c) 2018 Jed Watson.
|
|
4
|
+
Licensed under the MIT License (MIT), see
|
|
5
|
+
http://jedwatson.github.io/classnames
|
|
6
|
+
*/
|
|
7
|
+
(function(){var e={}.hasOwnProperty;function n(){var r=[];for(var o=0;o<arguments.length;o++){var t=arguments[o];if(!t)continue;var i=typeof t;if(i==="string"||i==="number"){r.push(t)}else if(Array.isArray(t)){if(t.length){var s=n.apply(null,t);if(s){r.push(s)}}}else if(i==="object"){if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]")){r.push(t.toString());continue}for(var u in t){if(e.call(t,u)&&t[u]){r.push(u)}}}}return r.join(" ")}if(r.exports){n.default=n;r.exports=n}else{window.classNames=n}})()}));export{classnames as c};
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-980f930f.js";export{s as setNonce}from"./index-980f930f.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(o,e){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy(JSON.parse('[["taro-checkbox-core_2",[[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-movable-area-core_2",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"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]}]]],["taro-picker-view-column-core_2",[[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"]]],[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"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[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],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-animation-video-core",[[0,"taro-animation-video-core"]]],["taro-animation-view-core",[[0,"taro-animation-view-core"]]],["taro-ar-camera-core",[[0,"taro-ar-camera-core"]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-aweme-data-core",[[0,"taro-aweme-data-core"]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[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":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-channel-live-core",[[0,"taro-channel-live-core"]]],["taro-channel-video-core",[[0,"taro-channel-video-core"]]],["taro-comment-detail-core",[[0,"taro-comment-detail-core"]]],["taro-comment-list-core",[[0,"taro-comment-list-core"]]],["taro-contact-button-core",[[0,"taro-contact-button-core"]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["taro-cover-view-core",[[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",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-follow-swan-core",[[0,"taro-follow-swan-core"]]],["taro-form-core",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-grid-view-core",[[0,"taro-grid-view-core"]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-inline-payment-panel-core",[[0,"taro-inline-payment-panel-core"]]],["taro-input-core",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-lifestyle-core",[[0,"taro-lifestyle-core"]]],["taro-like-core",[[0,"taro-like-core"]]],["taro-list-view-core",[[0,"taro-list-view-core"]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-login-core",[[0,"taro-login-core"]]],["taro-lottie-core",[[0,"taro-lottie-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-native-slot-core",[[0,"taro-native-slot-core"]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-progress-core",[[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",[[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",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-rtc-room-core",[[0,"taro-rtc-room-core"]]],["taro-rtc-room-item-core",[[0,"taro-rtc-room-item-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-sticky-header-core",[[0,"taro-sticky-header-core"]]],["taro-sticky-section-core",[[0,"taro-sticky-section-core"]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tab-item-core",[[0,"taro-tab-item-core"]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["taro-tabs-core",[[0,"taro-tabs-core"]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["taro-view-core",[[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-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"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],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[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",[[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],"getHlsObject":[64],"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)}))};export{defineCustomElements};
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-980f930f.js";export{s as setNonce}from"./index-980f930f.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(o,e){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy(JSON.parse('[["taro-checkbox-core_2",[[4,"taro-checkbox-core",{"name":[1],"value":[1032],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["taro-movable-area-core_2",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"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]}]]],["taro-picker-view-column-core_2",[[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"]]],[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"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[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],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-animation-video-core",[[0,"taro-animation-video-core"]]],["taro-animation-view-core",[[0,"taro-animation-view-core"]]],["taro-ar-camera-core",[[0,"taro-ar-camera-core"]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-aweme-data-core",[[0,"taro-aweme-data-core"]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[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":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-channel-live-core",[[0,"taro-channel-live-core"]]],["taro-channel-video-core",[[0,"taro-channel-video-core"]]],["taro-comment-detail-core",[[0,"taro-comment-detail-core"]]],["taro-comment-list-core",[[0,"taro-comment-list-core"]]],["taro-contact-button-core",[[0,"taro-contact-button-core"]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["taro-cover-view-core",[[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",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-follow-swan-core",[[0,"taro-follow-swan-core"]]],["taro-form-core",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-grid-view-core",[[0,"taro-grid-view-core"]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-inline-payment-panel-core",[[0,"taro-inline-payment-panel-core"]]],["taro-input-core",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-lifestyle-core",[[0,"taro-lifestyle-core"]]],["taro-like-core",[[0,"taro-like-core"]]],["taro-list-view-core",[[0,"taro-list-view-core"]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-login-core",[[0,"taro-login-core"]]],["taro-lottie-core",[[0,"taro-lottie-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-native-slot-core",[[0,"taro-native-slot-core"]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-progress-core",[[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",[[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",[[0,"taro-rich-text-core",{"nodes":[1],"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-rtc-room-core",[[0,"taro-rtc-room-core"]]],["taro-rtc-room-item-core",[[0,"taro-rtc-room-item-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-sticky-header-core",[[0,"taro-sticky-header-core"]]],["taro-sticky-section-core",[[0,"taro-sticky-section-core"]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tab-item-core",[[0,"taro-tab-item-core"]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["taro-tabs-core",[[0,"taro-tabs-core"]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1025],"numberOfLines":[2,"number-of-lines"]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["taro-view-core",[[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-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"textProps":[16],"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],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[3,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[3,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[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],"getHlsObject":[64],"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)}))};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import{c as classnames}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import{c as classnames}from"./index-c3e4004b.js";var indexCss='taro-button-core{display:block;overflow:hidden;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;border-width:0;border-radius:5px;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#f8f8f8;line-height:2.55555556;text-decoration:none;text-align:center;font-size:18px;color:#000;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-button-core:focus{outline:0}taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core::after{position:absolute;left:0;top:0;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid rgba(0, 0, 0, 0.2);border-radius:10px;width:200%;height:200%;content:" ";-webkit-transform:scale(0.5);transform:scale(0.5);-webkit-transform-origin:0 0;transform-origin:0 0}taro-button-core+taro-button-core{margin-top:15px}taro-button-core[type=default]{background-color:#f8f8f8;color:#000}taro-button-core[type=default]:not([disabled]):visited{color:#000}taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core[size=mini]{display:inline-block;padding:0 1.32em;width:auto;line-height:2.3;font-size:13px}taro-button-core[plain],taro-button-core[plain][type=default],taro-button-core[plain][type=primary]{border-width:1px;background-color:transparent}taro-button-core[disabled]{color:rgba(255, 255, 255, 0.6)}taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[disabled][type=primary]{background-color:#9ed99d}taro-button-core[disabled][type=warn]{background-color:#ec8b89}taro-button-core[loading] .weui-loading{margin:-0.2em 0.34em 0 0}taro-button-core[loading][type=primary],taro-button-core[loading][type=warn]{color:rgba(255, 255, 255, 0.6)}taro-button-core[loading][type=primary]{background-color:#179b16}taro-button-core[loading][type=warn]{background-color:#ce3c39}taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}taro-button-core[plain][type=primary]:not([disabled]):active{border-color:rgba(26, 173, 25, 0.6);background-color:transparent;color:rgba(26, 173, 25, 0.6)}taro-button-core[plain][type=primary]::after{border-width:0}taro-button-core[plain],taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}taro-button-core[plain]:not([disabled]):active,taro-button-core[plain][type=default]:not([disabled]):active{border-color:rgba(53, 53, 53, 0.6);background-color:transparent;color:rgba(53, 53, 53, 0.6)}taro-button-core[plain]::after,taro-button-core[plain][type=default]::after{border-width:0}taro-button-core[type=primary]{background-color:#1aad19;color:#fff}taro-button-core[type=primary]:not([disabled]):visited{color:#fff}taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:rgba(255, 255, 255, 0.6)}taro-button-core[type=warn]{background-color:#e64340;color:#fff}taro-button-core[type=warn]:not([disabled]):visited{color:#fff}taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:rgba(255, 255, 255, 0.6)}taro-button-core[plain][disabled]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[plain][disabled][type=primary]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}';var Button=function(){function o(o){registerInstance(this,o);this.onSubmit=createEvent(this,"tarobuttonsubmit",7);this.onReset=createEvent(this,"tarobuttonreset",7);this.disabled=undefined;this.hoverClass="button-hover";this.type="";this.hoverStartTime=20;this.hoverStayTime=70;this.size=undefined;this.plain=undefined;this.loading=false;this.formType=null;this.hover=false;this.touch=false}o.prototype.onClick=function(o){if(this.disabled){o.stopPropagation()}};o.prototype.onTouchStart=function(){var o=this;if(this.disabled){return}this.touch=true;if(this.hoverClass&&!this.disabled){setTimeout((function(){if(o.touch){o.hover=true}}),this.hoverStartTime)}};o.prototype.onTouchEnd=function(){var o=this;if(this.disabled){return}this.touch=false;if(this.hoverClass&&!this.disabled){setTimeout((function(){if(!o.touch){o.hover=false}}),this.hoverStayTime)}if(this.formType==="submit"){this.onSubmit.emit()}else if(this.formType==="reset"){this.onReset.emit()}};o.prototype.render=function(){var o;var t=this,r=t.disabled,e=t.hoverClass,a=t.type,i=t.size,n=t.plain,c=t.loading,d=t.hover;var l=classnames((o={},o["".concat(e)]=d&&!r,o));return h(Host,{class:l,type:a,plain:n,loading:c,size:i,disabled:r},c&&h("i",{class:"weui-loading"}),h("slot",null))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();Button.style=indexCss;export{Button as taro_button_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-980f930f.js";export{s as setNonce}from"./index-980f930f.js";var patchBrowser=function(){var o=import.meta.url;var e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return promiseResolve(e)};patchBrowser().then((function(o){return bootstrapLazy(JSON.parse('[["taro-checkbox-core_2",[[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-movable-area-core_2",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"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]}]]],["taro-picker-view-column-core_2",[[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"]]],[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"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[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],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-animation-video-core",[[0,"taro-animation-video-core"]]],["taro-animation-view-core",[[0,"taro-animation-view-core"]]],["taro-ar-camera-core",[[0,"taro-ar-camera-core"]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-aweme-data-core",[[0,"taro-aweme-data-core"]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[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":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-channel-live-core",[[0,"taro-channel-live-core"]]],["taro-channel-video-core",[[0,"taro-channel-video-core"]]],["taro-comment-detail-core",[[0,"taro-comment-detail-core"]]],["taro-comment-list-core",[[0,"taro-comment-list-core"]]],["taro-contact-button-core",[[0,"taro-contact-button-core"]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["taro-cover-view-core",[[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",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-follow-swan-core",[[0,"taro-follow-swan-core"]]],["taro-form-core",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-grid-view-core",[[0,"taro-grid-view-core"]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-inline-payment-panel-core",[[0,"taro-inline-payment-panel-core"]]],["taro-input-core",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-lifestyle-core",[[0,"taro-lifestyle-core"]]],["taro-like-core",[[0,"taro-like-core"]]],["taro-list-view-core",[[0,"taro-list-view-core"]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-login-core",[[0,"taro-login-core"]]],["taro-lottie-core",[[0,"taro-lottie-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-native-slot-core",[[0,"taro-native-slot-core"]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-progress-core",[[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",[[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",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-rtc-room-core",[[0,"taro-rtc-room-core"]]],["taro-rtc-room-item-core",[[0,"taro-rtc-room-item-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-sticky-header-core",[[0,"taro-sticky-header-core"]]],["taro-sticky-section-core",[[0,"taro-sticky-section-core"]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tab-item-core",[[0,"taro-tab-item-core"]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["taro-tabs-core",[[0,"taro-tabs-core"]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["taro-view-core",[[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-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"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],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[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",[[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],"getHlsObject":[64],"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]}]]]]'),o)}));
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-980f930f.js";export{s as setNonce}from"./index-980f930f.js";var patchBrowser=function(){var o=import.meta.url;var e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return promiseResolve(e)};patchBrowser().then((function(o){return bootstrapLazy(JSON.parse('[["taro-checkbox-core_2",[[4,"taro-checkbox-core",{"name":[1],"value":[1032],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["taro-movable-area-core_2",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"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]}]]],["taro-picker-view-column-core_2",[[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"]]],[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"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[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],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-animation-video-core",[[0,"taro-animation-video-core"]]],["taro-animation-view-core",[[0,"taro-animation-view-core"]]],["taro-ar-camera-core",[[0,"taro-ar-camera-core"]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-aweme-data-core",[[0,"taro-aweme-data-core"]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[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":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-channel-live-core",[[0,"taro-channel-live-core"]]],["taro-channel-video-core",[[0,"taro-channel-video-core"]]],["taro-comment-detail-core",[[0,"taro-comment-detail-core"]]],["taro-comment-list-core",[[0,"taro-comment-list-core"]]],["taro-contact-button-core",[[0,"taro-contact-button-core"]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["taro-cover-view-core",[[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",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-follow-swan-core",[[0,"taro-follow-swan-core"]]],["taro-form-core",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-grid-view-core",[[0,"taro-grid-view-core"]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-inline-payment-panel-core",[[0,"taro-inline-payment-panel-core"]]],["taro-input-core",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-lifestyle-core",[[0,"taro-lifestyle-core"]]],["taro-like-core",[[0,"taro-like-core"]]],["taro-list-view-core",[[0,"taro-list-view-core"]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-login-core",[[0,"taro-login-core"]]],["taro-lottie-core",[[0,"taro-lottie-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-native-slot-core",[[0,"taro-native-slot-core"]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-progress-core",[[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",[[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",[[0,"taro-rich-text-core",{"nodes":[1],"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-rtc-room-core",[[0,"taro-rtc-room-core"]]],["taro-rtc-room-item-core",[[0,"taro-rtc-room-item-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-sticky-header-core",[[0,"taro-sticky-header-core"]]],["taro-sticky-section-core",[[0,"taro-sticky-section-core"]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tab-item-core",[[0,"taro-tab-item-core"]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["taro-tabs-core",[[0,"taro-tabs-core"]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1025],"numberOfLines":[2,"number-of-lines"]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["taro-view-core",[[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-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"textProps":[16],"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],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[3,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[3,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[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],"getHlsObject":[64],"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]}]]]]'),o)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-980f930f.js";import{c as classnames}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-980f930f.js";import{c as classnames}from"./index-c3e4004b.js";var coverViewCss="taro-cover-view-core{display:block}";var CoverView=function(){function t(t){registerInstance(this,t);this.onLongPress=createEvent(this,"longpress",7);this.startTime=0;this.animation=undefined;this.hoverClass=undefined;this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false}t.prototype.onTouchStart=function(){var t=this;if(this.hoverClass){this.touch=true;setTimeout((function(){if(t.touch){t.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((function(){t.onLongPress.emit()}),350);this.startTime=Date.now()};t.prototype.onTouchMove=function(){clearTimeout(this.timeoutEvent)};t.prototype.onTouchEnd=function(){var t=this;var e=Date.now()-this.startTime;if(e<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((function(){if(!t.touch){t.hover=false}}),this.hoverStayTime)}};t.prototype.render=function(){var t;var e=classnames((t={},t["".concat(this.hoverClass)]=this.hover,t));var i={};if(!!this.animation){i["animation"]=this.animation;i["data-animation"]=this.animation}return h(Host,Object.assign({class:e},i),h("slot",null))};return t}();CoverView.style=coverViewCss;export{CoverView as taro_cover_view_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-980f930f.js";import{c as classnames}from"./index-
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-980f930f.js";import{c as classnames}from"./index-c3e4004b.js";var Icon=function(){function e(e){registerInstance(this,e);this.type=undefined;this.size="23";this.color=undefined}e.prototype.render=function(){var e;var r=this,n=r.type,o=r.size,s=r.color;var t=n===null||n===void 0?void 0:n.replace(/_/g,"-");var i=classnames((e={},e["weui-icon-".concat(t)]=true,e));var c={"font-size":"".concat(o,"px"),color:s};return h(Host,{class:i,style:c})};return e}();export{Icon as taro_icon_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-980f930f.js";import{c as classnames}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-980f930f.js";import{c as classnames}from"./index-c3e4004b.js";var indexCss='img[src=""]{opacity:0}taro-image-core{display:inline-block;overflow:hidden;position:relative;width:auto;height:auto;font-size:0}.taro-img.taro-img__widthfix{height:100%}.taro-img__mode-scaletofill{width:100%;height:100%}.taro-img__mode-aspectfit{max-width:100%;max-height:100%}.taro-img__mode-aspectfill{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-img__mode-aspectfill--width{min-width:100%;height:100%}.taro-img__mode-aspectfill--height{width:100%;min-height:100%}.taro-img__mode-widthfix{width:100%}.taro-img__mode-heightfix{height:100%}.taro-img__mode-top{width:100%}.taro-img__mode-bottom{position:absolute;bottom:0;width:100%}.taro-img__mode-left{height:100%}.taro-img__mode-right{position:absolute;right:0;height:100%}.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{position:absolute;bottom:0}.taro-img__mode-bottomright{position:absolute;right:0;bottom:0}';import("./intersection-observer-8e4c7135.js");var Image=function(){function t(t){registerInstance(this,t);this.onLoad=createEvent(this,"load",7);this.onError=createEvent(this,"error",7);this.src=undefined;this.mode="scaleToFill";this.lazyLoad=false;this.nativeProps={};this.aspectFillMode="width"}t.prototype.componentDidLoad=function(){var t=this;if(!this.lazyLoad)return;var i=new IntersectionObserver((function(o){if(o[o.length-1].isIntersecting){i.unobserve(t.imgRef);t.imgRef.src=t.src}}),{rootMargin:"300px 0px"});i.observe(this.imgRef)};t.prototype.imageOnLoad=function(){var t=this.imgRef,i=t.width,o=t.height,e=t.naturalWidth,r=t.naturalHeight;this.onLoad.emit({width:i,height:o});this.aspectFillMode=e>r?"width":"height"};t.prototype.imageOnError=function(t){this.onError.emit(t)};t.prototype.render=function(){var t;var i=this;var o=this,e=o.src,r=o.mode,a=r===void 0?"scaleToFill":r,s=o.lazyLoad,n=s===void 0?false:s,m=o.aspectFillMode,d=m===void 0?"width":m,g=o.imageOnLoad,l=o.imageOnError,c=o.nativeProps;var f=classnames({"taro-img__widthfix":a==="widthFix"});var p=classnames("taro-img__mode-".concat(a.toLowerCase().replace(/\s/g,"")),(t={},t["taro-img__mode-aspectfill--".concat(d)]=a==="aspectFill",t));return h(Host,{class:f},n?h("img",Object.assign({ref:function(t){return i.imgRef=t},class:p,onLoad:g.bind(this),onError:l.bind(this)},c)):h("img",Object.assign({ref:function(t){return i.imgRef=t},class:p,src:e,onLoad:g.bind(this),onError:l.bind(this)},c)))};return t}();Image.style=indexCss;export{Image as taro_image_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{u(i.next(e))}catch(e){a(e)}}function s(e){try{u(i["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):o(e.value).then(r,s)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return u([e,t])}}function u(s){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,s[0]&&(n=0)),n)try{if(i=1,o&&(a=s[0]&2?o["return"]:s[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,s[1])).done)return a;if(o=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-980f930f.js";var indexCss="taro-input-core{display:block}input{display:block;overflow:hidden;height:1.4rem;text-overflow:clip;text-align:inherit;white-space:nowrap}";function getTrueType(e,t,n){if(t==="search")e="search";if(n)e="password";if(typeof e==="undefined"){return"text"}if(!e){throw new Error("unexpected type")}if(e==="digit")e="number";return e}function fixControlledValue(e){return e!==null&&e!==void 0?e:""}var Input=function(){function e(e){var t=this;registerInstance(this,e);this.onInput=createEvent(this,"input",7);this.onPaste=createEvent(this,"paste",7);this.onFocus=createEvent(this,"focus",7);this.onBlur=createEvent(this,"blur",7);this.onConfirm=createEvent(this,"confirm",7);this.onChange=createEvent(this,"change",7);this.onKeyDown=createEvent(this,"keydown",7);this.isOnComposition=false;this.isOnPaste=false;this.onInputExcuted=false;this.handleInput=function(e){e.stopPropagation();var n=t,i=n.type,o=n.maxlength,a=n.confirmType,r=n.password;if(!t.isOnComposition&&!t.onInputExcuted){var s=e.target.value;var u=getTrueType(i,a,r);t.onInputExcuted=true;if(u==="number"&&s&&o>-1&&o<=s.length){s=s.substring(0,o);e.target.value=s}t.value=s;t.onInput.emit({value:s,cursor:s.length});t.onInputExcuted=false}};this.handlePaste=function(e){e.stopPropagation();t.isOnPaste=true;t.onPaste.emit({value:e.target.value})};this.handleFocus=function(e){e.stopPropagation();t.onInputExcuted=false;t.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){e.stopPropagation();t.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();t.onChange.emit({value:e.target.value});if(t.isOnPaste){t.isOnPaste=false;t.value=e.target.value;t.onInput.emit({value:e.target.value,cursor:e.target.value.length})}};this.handleKeyDown=function(e){e.stopPropagation();var n=e.target.value;var i=e.keyCode||e.code;t.onInputExcuted=false;t.onKeyDown.emit({value:n,cursor:n.length,keyCode:i});i===13&&t.onConfirm.emit({value:n})};this.handleComposition=function(e){e.stopPropagation();if(!(e.target instanceof HTMLInputElement))return;if(e.type==="compositionend"){t.isOnComposition=false;t.value=e.target.value;t.onInput.emit({value:e.target.value,cursor:e.target.value.length})}else{t.isOnComposition=true}};this.handleBeforeInput=function(e){if(!e.data)return;var n=e.data&&/[0-9]/.test(e.data);if(t.type==="number"&&!n){e.preventDefault()}if(t.type==="digit"&&!n){if(e.data!=="."||e.data==="."&&e.target.value.indexOf(".")>-1){e.preventDefault()}}};this.value="";this.type=undefined;this.password=false;this.placeholder=undefined;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.confirmType="done";this.name=undefined;this.nativeProps={}}e.prototype.focus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputRef.focus();return[2]}))}))};e.prototype.watchAutoFocus=function(e,t){var n;if(!t&&e){(n=this.inputRef)===null||n===void 0?void 0:n.focus()}};e.prototype.watchValue=function(e){var t=fixControlledValue(e);if(this.inputRef.value!==t){this.inputRef.value=t}};e.prototype.componentDidLoad=function(){var e=this;var t,n,i,o,a;if(this.type==="file"){this.fileListener=function(){e.onInput.emit()};(t=this.inputRef)===null||t===void 0?void 0:t.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);(o=this.inputRef)===null||o===void 0?void 0:o.addEventListener("beforeinput",this.handleBeforeInput);(a=this.inputRef)===null||a===void 0?void 0:a.addEventListener("textInput",this.handleBeforeInput)}};e.prototype.disconnectedCallback=function(){var e,t,n,i,o;if(this.type==="file"){(e=this.inputRef)===null||e===void 0?void 0:e.removeEventListener("change",this.fileListener)}else{(t=this.inputRef)===null||t===void 0?void 0:t.removeEventListener("compositionstart",this.handleComposition);(n=this.inputRef)===null||n===void 0?void 0:n.removeEventListener("compositionend",this.handleComposition);(i=this.inputRef)===null||i===void 0?void 0:i.removeEventListener("beforeinput",this.handleBeforeInput);(o=this.inputRef)===null||o===void 0?void 0:o.removeEventListener("textInput",this.handleBeforeInput)}};e.prototype.render=function(){var e=this;var t=this,n=t.value,i=t.type,o=t.password,a=t.placeholder,r=t.autoFocus,s=t.disabled,u=t.maxlength,l=t.confirmType,p=t.name,f=t.nativeProps;return h("input",Object.assign({ref:function(t){e.inputRef=t;if(r&&t)t.focus()},class:"weui-input",type:getTrueType(i,l,o),placeholder:a,autoFocus:r,disabled:s,maxlength:u,name:p,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,onCompositionStart:this.handleComposition,onCompositionEnd:this.handleComposition},f,{value:fixControlledValue(n)}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{autoFocus:["watchAutoFocus"],value:["watchValue"]}},enumerable:false,configurable:true});return e}();Input.style=indexCss;export{Input as taro_input_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-980f930f.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-980f930f.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-c3e4004b.js";var indexCss=".navigator-hover{background:#efefef}";var Navigator=function(){function e(e){registerInstance(this,e);this.onSuccess=createEvent(this,"cuccess",7);this.onFail=createEvent(this,"fail",7);this.onComplete=createEvent(this,"complete",7);this.hoverClass=undefined;this.url=undefined;this.openType="navigate";this.isHover=false;this.delta=0}e.prototype.onClick=function(){var e=this,a=e.openType,t=e.onSuccess,r=e.onFail,s=e.onComplete;var i=Promise.resolve();switch(a){case"navigate":i=Taro.navigateTo({url:this.url});break;case"redirect":i=Taro.redirectTo({url:this.url});break;case"switchTab":i=Taro.switchTab({url:this.url});break;case"reLaunch":i=Taro.reLaunch({url:this.url});break;case"navigateBack":i=Taro.navigateBack({delta:this.delta});break;case"exit":i=Promise.reject(new Error('navigator:fail 暂不支持"openType: exit"'));break}if(i){i.then((function(e){t.emit(e)})).catch((function(e){r.emit(e)})).finally((function(){s.emit()}))}};e.prototype.render=function(){var e;var a=this,t=a.isHover,r=a.hoverClass;return h(Host,{class:classnames((e={},e[r]=t,e))})};return e}();Navigator.style=indexCss;export{Navigator as taro_navigator_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?i(e.value):r(e.value).then(o,u)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(t){return s([e,t])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(i=0)),i)try{if(n=1,r&&(a=u[0]&2?r["return"]:u[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;if(r=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:i.label++;return{value:u[1],done:false};case 5:i.label++;r=u[1];u=[0];continue;case 7:u=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(u[0]===6&&i.label<a[1]){i.label=a[1];a=u;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(u);break}if(a[2])i.ops.pop();i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e];r=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,r=t.length,a;n<r;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import{c as classnames}from"./index-394db4c1.js";function getTimeRange(e,t){var i=[];for(var n=e;n<=t;n++){i.push("".concat(n<10?"0":"").concat(n))}return i}var hoursRange=__spreadArray(__spreadArray(["20","21","22","23"],getTimeRange(0,23),true),["00","01","02","03"],false);var minutesRange=__spreadArray(__spreadArray(["56","57","58","59"],getTimeRange(0,59),true),["00","01","02","03"],false);function verifyValue(e,t){if(!isNaN(+e)&&e>=0&&e<t.length)return true;return false}function verifyTime(e){if(!/^\d{1,2}:\d{1,2}$/.test(e))return false;var t=e.split(":").map((function(e){return+e}));if(t[0]<0||t[0]>23)return false;if(t[1]<0||t[1]>59)return false;return true}function compareTime(e,t){var i=e.split(":").map((function(e){return+e}));var n=t.split(":").map((function(e){return+e}));if(i[0]<n[0])return true;if(i[0]===n[0]&&i[1]<=n[1])return true;return false}function verifyDate(e){if(!e)return false;var t=new Date(e.replace(/-/g,"/"));return isNaN(t.getMonth())?false:t}function getMaxDay(e,t){if(t===4||t===6||t===9||t===11)return 30;if(t===2){if(e%4===0&&e%100!==0||e%400===0)return 29;else return 28}return 31}function formatValue(e){var t;if(Array.isArray(e)){t=e.map((function(e){return String(e)}))}else{t=e}return t}function getDateRange(e,t){var i=[];for(var n=e;n<=t;n++){i.push(n)}return i}function getYearRange(e,t){return getDateRange(e,t)}function getMonthRange(e,t,i){var n=1;var r=12;if(e.getFullYear()===i){n=e.getMonth()+1}if(t.getFullYear()===i){r=t.getMonth()+1}return getDateRange(n,r)}function getDayRange(e,t,i,n){var r=1;var a=getMaxDay(i,n);if(e.getFullYear()===i&&e.getMonth()+1===n){r=e.getDate()}if(t.getFullYear()===i&&t.getMonth()+1===n){a=t.getDate()}return getDateRange(r,a)}var TOP=102;var LINE_HEIGHT=34;var MASK_HEIGHT=LINE_HEIGHT*7;var indexCss=".weui-picker,.weui-picker__hd{font-size:12px}";var Picker=function(){function e(e){var t=this;registerInstance(this,e);this.onChange=createEvent(this,"change",7);this.onColumnChange=createEvent(this,"columnchange",7);this.onCancel=createEvent(this,"cancel",7);this.index=[];this.showPicker=function(){if(t.disabled)return;t.height=t.getHeightByIndex();t.hidden=false};this.getHeightByIndex=function(){var e=t.index.map((function(e){var i=0;if(t.mode==="time"){i=LINE_HEIGHT*4}return TOP-LINE_HEIGHT*e-i}));return e};this.hidePicker=function(){t.fadeOut=true;setTimeout((function(){t.hidden=true;t.fadeOut=false}),350)};this.handleChange=function(){t.hidePicker();t.index=t.height.map((function(e){return(TOP-e)/LINE_HEIGHT}));var e=t.index.length&&t.mode!=="selector"?t.index:t.index[0];if(t.mode==="time"){var i=[hoursRange.slice(),minutesRange.slice()];var n=t.index.map((function(e,t){return i[t][e]}));t.index=n.map((function(e){return parseInt(e)}));e=n.join(":")}if(t.mode==="date"){var r=t.pickerDate,a=r._start,o=r._end,u=r._updateValue;var s=u[0];var h=u[1];var l=getYearRange(a.getFullYear(),o.getFullYear());var c=getMonthRange(a,o,s);var d=getDayRange(a,o,s,h);var f=l[t.index[0]];var g=c[t.index[1]];var p=d[t.index[2]];if(t.fields==="year"){e=[f]}else if(t.fields==="month"){e=[f,g]}else{e=[f,g,p]}e=e.map((function(e){return e<10?"0".concat(e):e})).join("-")}t.pickerValue=e;t.onChange.emit({value:e})};this.handleCancel=function(){t.hidePicker();t.onCancel.emit()};this.updateHeight=function(e,i,n){if(n===void 0){n=false}var r=__spreadArray([],t.height,true);r[i]=e;t.height=r;if(n){var a=t,o=a.start,u=a.end;if(!verifyTime(o))o="00:00";if(!verifyTime(u))u="23:59";if(!compareTime(o,u))return;var s=[hoursRange.slice(),minutesRange.slice()];var h=t.height.map((function(e){return(TOP-e)/LINE_HEIGHT}));var l=h.map((function(e,t){return s[t][e]})).join(":");if(!compareTime(o,l)){var c=o.split(":").map((function(e){return TOP-LINE_HEIGHT*(+e+4)}));requestAnimationFrame((function(){return t.height=c}))}else if(!compareTime(l,u)){var d=u.split(":").map((function(e){return TOP-LINE_HEIGHT*(+e+4)}));requestAnimationFrame((function(){return t.height=d}))}}};this.handleColumnChange=function(e,i){t.onColumnChange.emit({column:Number(i),value:(TOP-e)/LINE_HEIGHT})};this.updateDay=function(e,i){var n=t.pickerDate,r=n._start,a=n._end,o=n._updateValue;o[i]=e;var u=o[0];var s=o[1];var h=o[2];if(i===0){var l=getMonthRange(r,a,u);var c=l[l.length-1];var d=l[0];if(s>c)o[1]=c;if(s<d)o[1]=d;var f=l.indexOf(o[1]);var g=TOP-LINE_HEIGHT*f;t.updateDay(o[1],1);t.updateHeight(g,"1")}else if(i===1){var p=getDayRange(r,a,u,s);var c=p[p.length-1];var d=p[0];if(h>c)o[2]=c;if(h<d)o[2]=d;var f=p.indexOf(o[2]);var g=TOP-LINE_HEIGHT*f;t.updateDay(o[2],2);t.updateHeight(g,"2")}};this.getSelector=function(){return h("taro-picker-group",{range:t.range,rangeKey:t.rangeKey,height:t.height[0],updateHeight:t.updateHeight,columnId:"0"})};this.getMultiSelector=function(){return t.range.map((function(e,i){return h("taro-picker-group",{range:e,rangeKey:t.rangeKey,height:t.height[i],updateHeight:t.updateHeight,onColumnChange:t.handleColumnChange,columnId:String(i)})}))};this.getTimeSelector=function(){var e=hoursRange.slice();var i=minutesRange.slice();return[h("taro-picker-group",{mode:"time",range:e,height:t.height[0],updateHeight:t.updateHeight,columnId:"0"}),h("taro-picker-group",{mode:"time",range:i,height:t.height[1],updateHeight:t.updateHeight,columnId:"1"})]};this.getDateSelector=function(){var e=t,i=e.fields,n=e.height;var r=t.pickerDate,a=r._start,o=r._end,u=r._updateValue;var s=u[0];var l=u[1];var c=getYearRange(a.getFullYear(),o.getFullYear()).map((function(e){return"".concat(e,"年")}));var d=getMonthRange(a,o,s).map((function(e){return"".concat(e<10?"0".concat(e):e,"月")}));var f=getDayRange(a,o,s,l).map((function(e){return"".concat(e<10?"0".concat(e):e,"日")}));var g=[h("taro-picker-group",{mode:"date",range:c,height:n[0],updateDay:t.updateDay,updateHeight:t.updateHeight,columnId:"0"})];if(i==="month"||i==="day"){g.push(h("taro-picker-group",{mode:"date",range:d,height:n[1],updateDay:t.updateDay,updateHeight:t.updateHeight,columnId:"1"}))}if(i==="day"){g.push(h("taro-picker-group",{mode:"date",range:f,height:n[2],updateDay:t.updateDay,updateHeight:t.updateHeight,columnId:"2"}))}return g};this.mode="selector";this.disabled=false;this.range=[];this.rangeKey=undefined;this.value=undefined;this.start="";this.end="";this.fields="day";this.name="";this.pickerValue=[];this.height=[];this.hidden=true;this.fadeOut=false;this.isWillLoadCalled=false}e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true;this.handleProps()};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.pickerValue},set:function(t){return e.value!==t&&(e.value=t)},configurable:true});if(this.overlay){document.body.appendChild(this.overlay)}};e.prototype.disconnectedCallback=function(){var e;if(this.overlay){(e=this.overlay.parentNode)===null||e===void 0?void 0:e.removeChild(this.overlay)}};e.prototype.onPropsChange=function(){if(!this.isWillLoadCalled)return;this.handleProps()};e.prototype.handleProps=function(){var e=this;var t=this,i=t.mode,n=t.start,r=t.end;if(i==="selector"){var a=this.value;this.index=[verifyValue(a,this.range)?Math.floor(a):0]}else if(i==="multiSelector"){var o=this.value;this.index=[];this.range.forEach((function(t,i){var n=o===null||o===void 0?void 0:o[i];var r=verifyValue(n,t)?Math.floor(n):0;e.index.push(r)}))}else if(i==="time"){var a=this.value;if(!verifyTime(a)){console.warn("time picker value illegal");a="0:0"}var u=a.split(":").map((function(e){return+e}));this.index=u}else if(i==="date"){var a=this.value;var s=verifyDate(a)||new Date((new Date).setHours(0,0,0,0));var h=verifyDate(n)||new Date("1970/01/01");var l=verifyDate(r)||new Date("2999/01/01");if(s>=h&&s<=l){var c=s.getFullYear();var d=s.getMonth()+1;var f=s.getDate();var g=getYearRange(h.getFullYear(),l.getFullYear());var p=getMonthRange(h,l,c);var v=getDayRange(h,l,c,d);this.index=[g.indexOf(c),p.indexOf(d),v.indexOf(f)];if(!this.pickerDate||this.pickerDate._value.getTime()!==s.getTime()||this.pickerDate._start.getTime()!==h.getTime()||this.pickerDate._end.getTime()!==l.getTime()){this.pickerDate={_value:s,_start:h,_end:l,_updateValue:[c,d,f]}}}else{throw new Error("Date Interval Error")}}this.height=this.getHeightByIndex();this.pickerValue=this.value;if(i==="date"){var m=this.pickerValue;if(this.fields==="month"){this.pickerValue=m.split("-").slice(0,2).join("-")}else if(this.fields==="year"){this.pickerValue=m.split("-")[0]}}};e.prototype.render=function(){var e=this;var t=this,i=t.name,n=t.mode,r=t.fadeOut,a=t.hidden;var o;switch(n){case"multiSelector":o=this.getMultiSelector();break;case"time":o=this.getTimeSelector();break;case"date":o=this.getDateSelector();break;default:o=this.getSelector()}var u=classnames("weui-mask","weui-animate-fade-in",{"weui-animate-fade-out":r});var s=classnames("weui-picker","weui-animate-slide-up",{"weui-animate-slide-down":r});var l=a?{display:"none"}:{};return h(Host,null,h("div",{onClick:this.showPicker},h("slot",null),h("input",{type:"hidden",name:i,value:formatValue(this.pickerValue)})),h("div",{class:"weui-picker__overlay",style:l,ref:function(t){e.overlay=t}},h("div",{class:u,onClick:this.handleCancel}),h("div",{class:s},h("div",{class:"weui-picker__hd"},h("div",{class:"weui-picker__action",onClick:this.handleCancel},"取消"),h("div",{class:"weui-picker__action",onClick:this.handleChange},"确定")),h("div",{class:"weui-picker__bd"},o),h("input",{type:"hidden",name:i,value:formatValue(this.pickerValue)}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["onPropsChange"],value:["onPropsChange"],range:["onPropsChange"],start:["onPropsChange"],end:["onPropsChange"]}},enumerable:false,configurable:true});return e}();Picker.style=indexCss;var TaroPickerGroup=function(){function e(e){registerInstance(this,e);this.mode=undefined;this.range=[];this.rangeKey=undefined;this.height=undefined;this.columnId=undefined;this.updateHeight=undefined;this.onColumnChange=undefined;this.updateDay=undefined;this.startY=undefined;this.preY=undefined;this.hadMove=undefined;this.touchEnd=undefined;this.isMove=undefined}e.prototype.getPosition=function(){var e=this.touchEnd?.3:0;var t="translate3d(0, ".concat(this.height,"px, 0)");var i="transform ".concat(e,"s");return{transform:t,"-webkit-transform":t,transition:i,"-webkit-transition":i}};e.prototype.formulaUnlimitedScroll=function(e,t,i){var n=this;var r=this,a=r.height,o=r.updateHeight,u=r.columnId;var s=i==="up"?1:-1;this.touchEnd=false;o(-e*s*LINE_HEIGHT+a,u);requestAnimationFrame((function(){n.touchEnd=true;var i=Math.round(t/-LINE_HEIGHT)+e*s;var r=TOP-LINE_HEIGHT*i;o(r,u,true)}))};e.prototype.handleMoveStart=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.startY=e;this.preY=e;this.hadMove=false;return[2]}))}))};e.prototype.handleMoving=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n;return __generator(this,(function(r){t=e;i=t-this.preY;this.preY=t;this.touchEnd=false;if(Math.abs(t-this.startY)>10)this.hadMove=true;n=this.height+i;if(this.mode==="time"){if(this.columnId==="0"){if(n>TOP-LINE_HEIGHT*3){n=TOP-LINE_HEIGHT*27+i}if(n<TOP-LINE_HEIGHT*28){n=TOP-LINE_HEIGHT*4+i}}else if(this.columnId==="1"){if(n>TOP-LINE_HEIGHT*3){n=TOP-LINE_HEIGHT*63+i}if(n<TOP-LINE_HEIGHT*64){n=TOP-LINE_HEIGHT*4+i}}}this.updateHeight(n,this.columnId);return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,r,a,o,u,s,h,l,c,d,f,g,p;return __generator(this,(function(v){t=this,i=t.mode,n=t.range,r=t.height,a=t.updateHeight,o=t.onColumnChange,u=t.columnId;s=0;h=-LINE_HEIGHT*(n.length-1);l=e;this.touchEnd=true;if(!this.hadMove){d=window.innerHeight;f=d-MASK_HEIGHT/2;c=r-TOP-(l-f);if(i==="time"){if(u==="0"){if(c>-LINE_HEIGHT*2.5){return[2,this.formulaUnlimitedScroll(24,c,"up")]}if(c<-LINE_HEIGHT*28.5){return[2,this.formulaUnlimitedScroll(24,c,"down")]}}else if(u==="1"){if(c>-LINE_HEIGHT*2.5){return[2,this.formulaUnlimitedScroll(60,c,"up")]}if(c<-LINE_HEIGHT*64.5){return[2,this.formulaUnlimitedScroll(60,c,"down")]}}}}else{c=r-TOP}if(c>s)c=0;if(c<h)c=h;g=Math.round(c/-LINE_HEIGHT);p=TOP-LINE_HEIGHT*g;if(this.mode==="date"){if(this.columnId==="0"){this.updateDay(+this.range[g].replace(/[^0-9]/gi,""),0)}if(this.columnId==="1"){this.updateDay(+this.range[g].replace(/[^0-9]/gi,""),1)}if(this.columnId==="2"){this.updateDay(+this.range[g].replace(/[^0-9]/gi,""),2)}}a(p,u,i==="time");o&&o(p,u);return[2]}))}))};e.prototype.onMouseDown=function(e){this.isMove=true;this.handleMoveStart(e.clientY)};e.prototype.onMouseMove=function(e){e.preventDefault();if(!this.isMove)return;this.handleMoving(e.clientY)};e.prototype.onMouseMoveEnd=function(e){if(!this.isMove)return;this.isMove=false;this.handleMoveEnd(e.clientY)};e.prototype.onTouchStart=function(e){this.handleMoveStart(e.changedTouches[0].clientY)};e.prototype.onTouchMove=function(e){e.preventDefault();this.handleMoving(e.changedTouches[0].clientY)};e.prototype.onTouchEnd=function(e){this.handleMoveEnd(e.changedTouches[0].clientY)};e.prototype.render=function(){var e=this,t=e.range,i=e.rangeKey;var n=t.map((function(e){var t=i?e[i]:e;return h("div",{class:"weui-picker__item"},t)}));return h(Host,{class:"weui-picker__group"},h("div",{class:"weui-picker__mask"}),h("div",{class:"weui-picker__indicator"}),h("div",{class:"weui-picker__content",style:this.getPosition()},n))};return e}();export{Picker as taro_picker_core,TaroPickerGroup as taro_picker_group};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?i(e.value):r(e.value).then(o,u)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(t){return s([e,t])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(i=0)),i)try{if(n=1,r&&(a=u[0]&2?r["return"]:u[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;if(r=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:i.label++;return{value:u[1],done:false};case 5:i.label++;r=u[1];u=[0];continue;case 7:u=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(u[0]===6&&i.label<a[1]){i.label=a[1];a=u;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(u);break}if(a[2])i.ops.pop();i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e];r=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,r=t.length,a;n<r;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import{c as classnames}from"./index-c3e4004b.js";function getTimeRange(e,t){var i=[];for(var n=e;n<=t;n++){i.push("".concat(n<10?"0":"").concat(n))}return i}var hoursRange=__spreadArray(__spreadArray(["20","21","22","23"],getTimeRange(0,23),true),["00","01","02","03"],false);var minutesRange=__spreadArray(__spreadArray(["56","57","58","59"],getTimeRange(0,59),true),["00","01","02","03"],false);function verifyValue(e,t){if(!isNaN(+e)&&e>=0&&e<t.length)return true;return false}function verifyTime(e){if(!/^\d{1,2}:\d{1,2}$/.test(e))return false;var t=e.split(":").map((function(e){return+e}));if(t[0]<0||t[0]>23)return false;if(t[1]<0||t[1]>59)return false;return true}function compareTime(e,t){var i=e.split(":").map((function(e){return+e}));var n=t.split(":").map((function(e){return+e}));if(i[0]<n[0])return true;if(i[0]===n[0]&&i[1]<=n[1])return true;return false}function verifyDate(e){if(!e)return false;var t=new Date(e.replace(/-/g,"/"));return isNaN(t.getMonth())?false:t}function getMaxDay(e,t){if(t===4||t===6||t===9||t===11)return 30;if(t===2){if(e%4===0&&e%100!==0||e%400===0)return 29;else return 28}return 31}function formatValue(e){var t;if(Array.isArray(e)){t=e.map((function(e){return String(e)}))}else{t=e}return t}function getDateRange(e,t){var i=[];for(var n=e;n<=t;n++){i.push(n)}return i}function getYearRange(e,t){return getDateRange(e,t)}function getMonthRange(e,t,i){var n=1;var r=12;if(e.getFullYear()===i){n=e.getMonth()+1}if(t.getFullYear()===i){r=t.getMonth()+1}return getDateRange(n,r)}function getDayRange(e,t,i,n){var r=1;var a=getMaxDay(i,n);if(e.getFullYear()===i&&e.getMonth()+1===n){r=e.getDate()}if(t.getFullYear()===i&&t.getMonth()+1===n){a=t.getDate()}return getDateRange(r,a)}var TOP=102;var LINE_HEIGHT=34;var MASK_HEIGHT=LINE_HEIGHT*7;var indexCss=".weui-picker,.weui-picker__hd{font-size:12px}";var Picker=function(){function e(e){var t=this;registerInstance(this,e);this.onChange=createEvent(this,"change",7);this.onColumnChange=createEvent(this,"columnchange",7);this.onCancel=createEvent(this,"cancel",7);this.index=[];this.showPicker=function(){if(t.disabled)return;t.height=t.getHeightByIndex();t.hidden=false};this.getHeightByIndex=function(){var e=t.index.map((function(e){var i=0;if(t.mode==="time"){i=LINE_HEIGHT*4}return TOP-LINE_HEIGHT*e-i}));return e};this.hidePicker=function(){t.fadeOut=true;setTimeout((function(){t.hidden=true;t.fadeOut=false}),350)};this.handleChange=function(){t.hidePicker();t.index=t.height.map((function(e){return(TOP-e)/LINE_HEIGHT}));var e=t.index.length&&t.mode!=="selector"?t.index:t.index[0];if(t.mode==="time"){var i=[hoursRange.slice(),minutesRange.slice()];var n=t.index.map((function(e,t){return i[t][e]}));t.index=n.map((function(e){return parseInt(e)}));e=n.join(":")}if(t.mode==="date"){var r=t.pickerDate,a=r._start,o=r._end,u=r._updateValue;var s=u[0];var h=u[1];var l=getYearRange(a.getFullYear(),o.getFullYear());var c=getMonthRange(a,o,s);var d=getDayRange(a,o,s,h);var f=l[t.index[0]];var g=c[t.index[1]];var p=d[t.index[2]];if(t.fields==="year"){e=[f]}else if(t.fields==="month"){e=[f,g]}else{e=[f,g,p]}e=e.map((function(e){return e<10?"0".concat(e):e})).join("-")}t.value=e;t.pickerValue=t.value;t.onChange.emit({value:e})};this.handleColumnChange=function(e){var i=e.detail,n=i.columnId,r=i.height;t.onColumnChange.emit({column:Number(n),value:(TOP-r)/LINE_HEIGHT})};this.handleCancel=function(){t.hidePicker();t.onCancel.emit()};this.updateHeight=function(e,i,n){if(n===void 0){n=false}var r=__spreadArray([],t.height,true);r[i]=e;t.height=r;if(n){var a=t,o=a.start,u=a.end;if(!verifyTime(o))o="00:00";if(!verifyTime(u))u="23:59";if(!compareTime(o,u))return;var s=[hoursRange.slice(),minutesRange.slice()];var h=t.height.map((function(e){return(TOP-e)/LINE_HEIGHT}));var l=h.map((function(e,t){return s[t][e]})).join(":");if(!compareTime(o,l)){var c=o.split(":").map((function(e){return TOP-LINE_HEIGHT*(+e+4)}));requestAnimationFrame((function(){return t.height=c}))}else if(!compareTime(l,u)){var d=u.split(":").map((function(e){return TOP-LINE_HEIGHT*(+e+4)}));requestAnimationFrame((function(){return t.height=d}))}}};this.updateDay=function(e,i){var n=t.pickerDate,r=n._start,a=n._end,o=n._updateValue;o[i]=e;var u=o[0];var s=o[1];var h=o[2];if(i===0){var l=getMonthRange(r,a,u);var c=l[l.length-1];var d=l[0];if(s>c)o[1]=c;if(s<d)o[1]=d;var f=l.indexOf(o[1]);var g=TOP-LINE_HEIGHT*f;t.updateDay(o[1],1);t.updateHeight(g,"1")}else if(i===1){var p=getDayRange(r,a,u,s);var c=p[p.length-1];var d=p[0];if(h>c)o[2]=c;if(h<d)o[2]=d;var f=p.indexOf(o[2]);var g=TOP-LINE_HEIGHT*f;t.updateDay(o[2],2);t.updateHeight(g,"2")}};this.getSelector=function(){return h("taro-picker-group",{range:t.range,rangeKey:t.rangeKey,height:t.height[0],updateHeight:t.updateHeight,columnId:"0"})};this.getMultiSelector=function(){return t.range.map((function(e,i){return h("taro-picker-group",{range:e,rangeKey:t.rangeKey,height:t.height[i],updateHeight:t.updateHeight,onColumnChange:t.handleColumnChange,columnId:String(i)})}))};this.getTimeSelector=function(){var e=hoursRange.slice();var i=minutesRange.slice();return[h("taro-picker-group",{mode:"time",range:e,height:t.height[0],updateHeight:t.updateHeight,columnId:"0"}),h("taro-picker-group",{mode:"time",range:i,height:t.height[1],updateHeight:t.updateHeight,columnId:"1"})]};this.getDateSelector=function(){var e=t,i=e.fields,n=e.height;var r=t.pickerDate,a=r._start,o=r._end,u=r._updateValue;var s=u[0];var l=u[1];var c=getYearRange(a.getFullYear(),o.getFullYear()).map((function(e){return"".concat(e,"年")}));var d=getMonthRange(a,o,s).map((function(e){return"".concat(e<10?"0".concat(e):e,"月")}));var f=getDayRange(a,o,s,l).map((function(e){return"".concat(e<10?"0".concat(e):e,"日")}));var g=[h("taro-picker-group",{mode:"date",range:c,height:n[0],updateDay:t.updateDay,updateHeight:t.updateHeight,columnId:"0"})];if(i==="month"||i==="day"){g.push(h("taro-picker-group",{mode:"date",range:d,height:n[1],updateDay:t.updateDay,updateHeight:t.updateHeight,columnId:"1"}))}if(i==="day"){g.push(h("taro-picker-group",{mode:"date",range:f,height:n[2],updateDay:t.updateDay,updateHeight:t.updateHeight,columnId:"2"}))}return g};this.mode="selector";this.disabled=false;this.range=[];this.rangeKey=undefined;this.value=undefined;this.start="";this.end="";this.fields="day";this.name="";this.textProps={};this.pickerValue=[];this.height=[];this.hidden=true;this.fadeOut=false;this.isWillLoadCalled=false}e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true;this.handleProps()};e.prototype.componentDidLoad=function(){if(this.overlay){document.body.appendChild(this.overlay)}};e.prototype.disconnectedCallback=function(){var e;if(this.overlay){(e=this.overlay.parentNode)===null||e===void 0?void 0:e.removeChild(this.overlay)}};e.prototype.onPropsChange=function(){if(!this.isWillLoadCalled)return;this.handleProps()};e.prototype.handleProps=function(){var e=this;var t=this,i=t.mode,n=t.start,r=t.end;if(i==="selector"){var a=this.value;this.index=[verifyValue(a,this.range)?Math.floor(a):0]}else if(i==="multiSelector"){var o=this.value;this.index=[];this.range.forEach((function(t,i){var n=o===null||o===void 0?void 0:o[i];var r=verifyValue(n,t)?Math.floor(n):0;e.index.push(r)}))}else if(i==="time"){var a=this.value;if(!verifyTime(a)){console.warn("time picker value illegal");a="0:0"}var u=a.split(":").map((function(e){return+e}));this.index=u}else if(i==="date"){var a=this.value;var s=verifyDate(a)||new Date((new Date).setHours(0,0,0,0));var h=verifyDate(n)||new Date("1970/01/01");var l=verifyDate(r)||new Date("2999/01/01");if(s>=h&&s<=l){var c=s.getFullYear();var d=s.getMonth()+1;var f=s.getDate();var g=getYearRange(h.getFullYear(),l.getFullYear());var p=getMonthRange(h,l,c);var v=getDayRange(h,l,c,d);this.index=[g.indexOf(c),p.indexOf(d),v.indexOf(f)];if(!this.pickerDate||this.pickerDate._value.getTime()!==s.getTime()||this.pickerDate._start.getTime()!==h.getTime()||this.pickerDate._end.getTime()!==l.getTime()){this.pickerDate={_value:s,_start:h,_end:l,_updateValue:[c,d,f]}}}else{throw new Error("Date Interval Error")}}else{throw new Error('Picker not support "'.concat(i,'" mode.'))}this.height=this.getHeightByIndex();this.pickerValue=this.value;if(i==="date"){var m=this.pickerValue;if(this.fields==="month"){this.pickerValue=m.split("-").slice(0,2).join("-")}else if(this.fields==="year"){this.pickerValue=m.split("-")[0]}}};e.prototype.render=function(){var e=this;var t,i;var n=this,r=n.name,a=n.mode,o=n.fadeOut,u=n.hidden;var s;switch(a){case"multiSelector":s=this.getMultiSelector();break;case"time":s=this.getTimeSelector();break;case"date":s=this.getDateSelector();break;default:s=this.getSelector()}var l=classnames("weui-mask","weui-animate-fade-in",{"weui-animate-fade-out":o});var c=classnames("weui-picker","weui-animate-slide-up",{"weui-animate-slide-down":o});var d=u?{display:"none"}:{};return h(Host,null,h("div",{onClick:this.showPicker},h("slot",null),h("input",{type:"hidden",name:r,value:formatValue(this.pickerValue)})),h("div",{class:"weui-picker__overlay",style:d,ref:function(t){e.overlay=t}},h("div",{class:l,onClick:this.handleCancel}),h("div",{class:c},h("div",{class:"weui-picker__hd"},h("div",{class:"weui-picker__action",onClick:this.handleCancel},(t=this.textProps.cancelText)!==null&&t!==void 0?t:"取消"),h("div",{class:"weui-picker__action",onClick:this.handleChange},(i=this.textProps.okText)!==null&&i!==void 0?i:"确定")),h("div",{class:"weui-picker__bd"},s),h("input",{type:"hidden",name:r,value:formatValue(this.pickerValue)}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["onPropsChange"],value:["onPropsChange"],range:["onPropsChange"],start:["onPropsChange"],end:["onPropsChange"]}},enumerable:false,configurable:true});return e}();Picker.style=indexCss;var TaroPickerGroup=function(){function e(e){registerInstance(this,e);this.onColumnChange=createEvent(this,"columnChange",7);this.mode=undefined;this.range=[];this.rangeKey=undefined;this.height=undefined;this.columnId=undefined;this.updateHeight=undefined;this.updateDay=undefined;this.startY=undefined;this.preY=undefined;this.hadMove=undefined;this.touchEnd=undefined;this.isMove=undefined}e.prototype.getPosition=function(){var e=this.touchEnd?.3:0;var t="translate3d(0, ".concat(this.height,"px, 0)");var i="transform ".concat(e,"s");return{transform:t,"-webkit-transform":t,transition:i,"-webkit-transition":i}};e.prototype.formulaUnlimitedScroll=function(e,t,i){var n=this;var r=this,a=r.height,o=r.updateHeight,u=r.columnId;var s=i==="up"?1:-1;this.touchEnd=false;o(-e*s*LINE_HEIGHT+a,u);requestAnimationFrame((function(){n.touchEnd=true;var i=Math.round(t/-LINE_HEIGHT)+e*s;var r=TOP-LINE_HEIGHT*i;o(r,u,true)}))};e.prototype.handleMoveStart=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.startY=e;this.preY=e;this.hadMove=false;return[2]}))}))};e.prototype.handleMoving=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n;return __generator(this,(function(r){t=e;i=t-this.preY;this.preY=t;this.touchEnd=false;if(Math.abs(t-this.startY)>10)this.hadMove=true;n=this.height+i;if(this.mode==="time"){if(this.columnId==="0"){if(n>TOP-LINE_HEIGHT*3){n=TOP-LINE_HEIGHT*27+i}if(n<TOP-LINE_HEIGHT*28){n=TOP-LINE_HEIGHT*4+i}}else if(this.columnId==="1"){if(n>TOP-LINE_HEIGHT*3){n=TOP-LINE_HEIGHT*63+i}if(n<TOP-LINE_HEIGHT*64){n=TOP-LINE_HEIGHT*4+i}}}this.updateHeight(n,this.columnId);return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,r,a,o,u,s,h,l,c,d,f,g;return __generator(this,(function(p){t=this,i=t.mode,n=t.range,r=t.height,a=t.updateHeight,o=t.columnId;u=0;s=-LINE_HEIGHT*(n.length-1);h=e;this.touchEnd=true;if(!this.hadMove){c=window.innerHeight;d=c-MASK_HEIGHT/2;l=r-TOP-(h-d);if(i==="time"){if(o==="0"){if(l>-LINE_HEIGHT*2.5){return[2,this.formulaUnlimitedScroll(24,l,"up")]}if(l<-LINE_HEIGHT*28.5){return[2,this.formulaUnlimitedScroll(24,l,"down")]}}else if(o==="1"){if(l>-LINE_HEIGHT*2.5){return[2,this.formulaUnlimitedScroll(60,l,"up")]}if(l<-LINE_HEIGHT*64.5){return[2,this.formulaUnlimitedScroll(60,l,"down")]}}}}else{l=r-TOP}if(l>u)l=0;if(l<s)l=s;f=Math.round(l/-LINE_HEIGHT);g=TOP-LINE_HEIGHT*f;if(this.mode==="date"&&typeof this.updateDay==="function"){if(this.columnId==="0"){this.updateDay(+this.range[f].replace(/[^0-9]/gi,""),0)}if(this.columnId==="1"){this.updateDay(+this.range[f].replace(/[^0-9]/gi,""),1)}if(this.columnId==="2"){this.updateDay(+this.range[f].replace(/[^0-9]/gi,""),2)}}a(g,o,i==="time");this.onColumnChange.emit({columnId:o,height:g});return[2]}))}))};e.prototype.onMouseDown=function(e){this.isMove=true;this.handleMoveStart(e.clientY)};e.prototype.onMouseMove=function(e){if(!this.isMove)return;this.handleMoving(e.clientY)};e.prototype.onMouseMoveEnd=function(e){if(!this.isMove)return;this.isMove=false;this.handleMoveEnd(e.clientY)};e.prototype.onTouchStart=function(e){this.handleMoveStart(e.changedTouches[0].clientY)};e.prototype.onTouchMove=function(e){this.handleMoving(e.changedTouches[0].clientY)};e.prototype.onTouchEnd=function(e){this.handleMoveEnd(e.changedTouches[0].clientY)};e.prototype.render=function(){var e=this,t=e.range,i=e.rangeKey;var n=t.map((function(e){var t=i?e[i]:e;return h("div",{class:"weui-picker__item"},t)}));return h(Host,{class:"weui-picker__group"},h("div",{class:"weui-picker__mask"}),h("div",{class:"weui-picker__indicator"}),h("div",{class:"weui-picker__content",style:this.getPosition()},n))};return e}();export{Picker as taro_picker_core,TaroPickerGroup as taro_picker_group};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-980f930f.js";import{d as debounce}from"./index-d1b03e47.js";import{c as classnames}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-980f930f.js";import{d as debounce}from"./index-d1b03e47.js";import{c as classnames}from"./index-c3e4004b.js";function convertStyle(e){if(e){var t=/([\w-]*)\s*:\s*([^;]*)/g;var i={};var o=void 0;while(o=t.exec(e))i["".concat(o[1])]=o[2].trim();return i}}var columnCss=".taro-picker-view-column-container{display:-ms-flexbox;display:flex;overflow:scroll;overflow-x:hidden;position:relative;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;text-align:center}.taro-picker-view-column-container::-webkit-scrollbar{display:none}";var PickerViewColumn=function(){function e(e){var t=this;registerInstance(this,e);this.onChange=createEvent(this,"onselect",7);this.onSelectStart=createEvent(this,"onselectstart",7);this.onSelectEnd=createEvent(this,"onselectend",7);this.handleSelected=debounce((function(){var e=t.el.childNodes;var i=0;var o="0";for(var n in e){var r=e[n];var a=r.offsetHeight;if(i+a/2>t.el.scrollTop){o=n;break}i+=a}t.el.scrollTo({top:i,behavior:"smooth"});t.onChange.emit({curIndex:t.col,selectedIndex:o});t.onSelectEnd.emit()}),500);this.col=undefined;this.initialPosition="0";this.paddingVertical=0;this.isInit=false;this.isMove=false}e.prototype.onScroll=function(e){if(!this.isMove){this.isMove=true;this.onSelectStart.emit()}this.handleSelected()};e.prototype.onMouseEnd=function(){if(!this.isMove)return;this.isMove=false;this.handleSelected()};e.prototype.onTouchEnd=function(){this.isMove=false;this.handleSelected()};e.prototype.componentDidUpdate=function(){if(!this.isInit){this.isInit=true;var e=this.el.childNodes;var t=0;var i=0;for(var o in e){var n=e[o];if(this.initialPosition===o||!n||typeof n.offsetHeight!=="number"){break}i+=n.offsetHeight;t++}this.el.scrollTo({top:i});if(t>=e.length){this.onChange.emit({curIndex:this.col,selectedIndex:t-1})}}};e.prototype.render=function(){var e=this.paddingVertical,t=e===void 0?0:e;return h(Host,{class:"taro-picker-view-column-container",style:{"padding-top":"".concat(t,"px"),"padding-bottom":"".concat(t,"px")}})};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PickerViewColumn.style=columnCss;var indexCss=".taro-picker-view-container{display:-ms-flexbox;display:flex;position:relative}.taro-picker-view-mask-container{display:-ms-flexbox;display:flex;position:absolute;left:0;right:0;top:0;bottom:0;-ms-flex-direction:column;flex-direction:column;pointer-events:none}.taro-picker-view-mask-indicator{display:-ms-flexbox;display:flex;border-top:1px solid #ddd;border-bottom:1px solid #ddd;height:50px}.taro-picker-view-mask-top{-ms-flex:1;flex:1;background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6))}.taro-picker-view-mask-bottom{-ms-flex:1;flex:1;background:-webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));background:linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6))}";var PickerView=function(){function e(e){registerInstance(this,e);this.onChange=createEvent(this,"change",7);this.onPickStart=createEvent(this,"pickstart",7);this.onPickEnd=createEvent(this,"pickend",7);this.indicatorStyle=undefined;this.indicatorClass=undefined;this.value=undefined;this.maskStyle=undefined;this.maskClass=undefined}e.prototype.onSelect=function(e){e.stopPropagation();if(e.target.tagName!=="TARO-PICKER-VIEW-COLUMN-CORE")return;var t=+e.detail.curIndex;var i=+e.detail.selectedIndex;this.value[t]=i;this.onChange.emit({value:this.value})};e.prototype.onSelectStart=function(e){e.stopPropagation();if(e.target.tagName!=="TARO-PICKER-VIEW-COLUMN-CORE")return;this.onPickStart.emit()};e.prototype.onPickerColEnd=function(e){e.stopPropagation();if(e.target.tagName!=="TARO-PICKER-VIEW-COLUMN-CORE")return;this.onPickEnd.emit()};e.prototype.componentDidLoad=function(){var e=this;var t=this.el.querySelectorAll("taro-picker-view-column-core");t.forEach((function(t,i){var o;t.setAttribute("col","".concat(i));var n="0";if(!!e.value&&e.value.length>i){n="".concat(e.value[i])}var r=e.el.getBoundingClientRect().height;var a=((o=e.indicator)===null||o===void 0?void 0:o.offsetHeight)||0;var s=(r-a)/2;t.setAttribute("initial-position","".concat(n));t.setAttribute("padding-vertical","".concat(s))}))};e.prototype.componentDidRender=function(){var e=this;this.el.childNodes.forEach((function(t){var i=t;if("TARO-PICKER-VIEW-COLUMN-CORE"!==i.tagName&&i.className!=="taro-picker-view-mask-container"){e.el.removeChild(t)}}))};e.prototype.render=function(){var e=this;var t=classnames("taro-picker-view-mask-indicator",this.indicatorClass);var i=classnames("taro-picker-view-mask-top",this.maskClass);var o=classnames("taro-picker-view-mask-bottom",this.maskClass);var n=convertStyle(this.indicatorStyle);var r=convertStyle(this.maskStyle);var a=convertStyle(this.maskStyle);return h(Host,{class:"taro-picker-view-container"},h("slot",null),h("div",{class:"taro-picker-view-mask-container"},h("div",{class:i,style:r}),h("div",{class:t,style:n,ref:function(t){return e.indicator=t}}),h("div",{class:o,style:a})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PickerView.style=indexCss;export{PickerViewColumn as taro_picker_view_column_core,PickerView as taro_picker_view_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-c3e4004b.js";var indexCss=".rmc-pull-to-refresh-content{-webkit-transform-origin:left top 0;transform-origin:left top 0}.rmc-pull-to-refresh-content-wrapper{overflow:hidden;min-height:100vh}.rmc-pull-to-refresh-transition{-webkit-transition:-webkit-transform 0.3s;transition:-webkit-transform 0.3s;transition:transform 0.3s;transition:transform 0.3s, -webkit-transform 0.3s}@-webkit-keyframes rmc-pull-to-refresh-indicator{50%{opacity:0.2}100%{opacity:1}}@keyframes rmc-pull-to-refresh-indicator{50%{opacity:0.2}100%{opacity:1}}.rmc-pull-to-refresh-indicator{height:30px;line-height:10px;text-align:center}.rmc-pull-to-refresh-indicator>div{display:inline-block;margin:3px;border-radius:100%;width:6px;height:6px;background-color:grey;-webkit-animation:rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;animation:rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;-webkit-animation-fill-mode:both;animation-fill-mode:both}.rmc-pull-to-refresh-indicator>div:nth-child(0){-webkit-animation-delay:-0.1s !important;animation-delay:-0.1s !important}.rmc-pull-to-refresh-indicator>div:nth-child(1){-webkit-animation-delay:-0.2s !important;animation-delay:-0.2s !important}.rmc-pull-to-refresh-indicator>div:nth-child(2){-webkit-animation-delay:-0.3s !important;animation-delay:-0.3s !important}.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator{margin-top:-25px}";function setTransform(e,t){e.transform=t;e.webkitTransform=t;e.MozTransform=t}var isWebView=typeof navigator!=="undefined"&&/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent);var INDICATOR={activate:"release",deactivate:"pull",release:"loading",finish:"finish"};var supportsPassive=false;try{var opts=Object.defineProperty({},"passive",{get:function(){supportsPassive=true}});window.addEventListener("cancel",(function(){return{}}),opts)}catch(e){}var willPreventDefault=supportsPassive?{passive:false}:false;var PullToRefresh=function(){function e(e){var t=this;registerInstance(this,e);this.onRefresh=createEvent(this,"refresh",7);this._ScreenY=0;this._startScreenY=0;this._lastScreenY=0;this._isMounted=false;this.triggerPullDownRefresh=function(e){if(!t.dragOnEdge&&t._isMounted){if(e){t._lastScreenY=t.distanceToRefresh+1;t.currSt="release";t.setContentStyle(t._lastScreenY)}else{t.currSt="finish";t.reset()}}};this.init=function(){var e=t.scrollContainer;var r=t.el.querySelector("rmc-pull-to-refresh-content");t.el.appendChild=r===null||r===void 0?void 0:r.appendChild.bind(r);t.el.insertBefore=r===null||r===void 0?void 0:r.insertBefore.bind(r);t.el.replaceChild=r===null||r===void 0?void 0:r.replaceChild.bind(r);t.el.removeChild=r===null||r===void 0?void 0:r.removeChild.bind(r);t._to={touchstart:t.onTouchStart.bind(t,e),touchmove:t.onTouchMove.bind(t,e),touchend:t.onTouchEnd.bind(t,e),touchcancel:t.onTouchEnd.bind(t,e)};Object.keys(t._to).forEach((function(r){e.addEventListener(r,t._to[r],willPreventDefault)}))};this.destroy=function(){var e=t.scrollContainer;Object.keys(t._to).forEach((function(r){e.removeEventListener(r,t._to[r])}))};this.onTouchStart=function(e,r){t._ScreenY=t._startScreenY=r.touches[0].screenY;t._lastScreenY=t._lastScreenY||0};this.isEdge=function(e){var r=t.scrollContainer;if(r&&r===document.body){var n=document.scrollingElement?document.scrollingElement:document.body;return n.scrollTop<=0}return e.scrollTop<=0};this.damp=function(e){if(Math.abs(t._lastScreenY)>t.damping){return 0}var r=Math.abs(t._ScreenY-t._startScreenY)/window.screen.height;e*=(1-r)*.6;return e};this.onTouchMove=function(e,r){var n=r.touches[0].screenY;if(t._startScreenY>n){return}if(t.isEdge(e)){if(!t.dragOnEdge){t._ScreenY=t._startScreenY=r.touches[0].screenY;t.dragOnEdge=true}if(r.cancelable){r.preventDefault()}var i=Math.round(n-t._ScreenY);t._ScreenY=n;t._lastScreenY+=t.damp(i);t.setContentStyle(t._lastScreenY);if(Math.abs(t._lastScreenY)<t.distanceToRefresh){if(t.currSt!=="deactivate"){t.currSt="deactivate"}}else{if(t.currSt==="deactivate"){t.currSt="activate"}}if(isWebView&&r.changedTouches[0].clientY<0){t.onTouchEnd()}}};this.onTouchEnd=function(){if(t.dragOnEdge){t.dragOnEdge=false}if(t.currSt==="activate"){t.currSt="release";t.onRefresh.emit(t);t._lastScreenY=t.distanceToRefresh+1;t.setContentStyle(t._lastScreenY)}else if(t.currSt==="release"){t._lastScreenY=t.distanceToRefresh+1;t.setContentStyle(t._lastScreenY)}else{t.reset()}};this.reset=function(){t._lastScreenY=0;t.setContentStyle(0)};this.setContentStyle=function(e){if(t.contentRef){if(e){setTransform(t.contentRef.style,"translate3d(0px,".concat(e,"px,0)"))}else{setTransform(t.contentRef.style,"")}}};this.prefixCls="rmc-pull-to-refresh";this.distanceToRefresh=50;this.damping=100;this.indicator=INDICATOR;this.currSt="deactivate";this.dragOnEdge=false}Object.defineProperty(e.prototype,"scrollContainer",{get:function(){return this.el.parentElement||this.el.closest(".taro_page_stationed")||document.querySelector(".taro_page_stationed")||document.querySelector(".taro_page")||document.querySelector(".taro_router")||document.querySelector(".taro-tabbar__panel")||document.body},enumerable:false,configurable:true});e.prototype.statusChange=function(){var e,t,r,n;var i=this.scrollContainer;switch(this.currSt){case"release":(t=(e=i===null||i===void 0?void 0:i.__page)===null||e===void 0?void 0:e.onPullDownRefresh)===null||t===void 0?void 0:t.call(e);break;case"deactivate":(n=(r=i===null||i===void 0?void 0:i.__page)===null||r===void 0?void 0:r.onPullIntercept)===null||n===void 0?void 0:n.call(r)}};e.prototype.disconnectedCallback=function(){this.destroy()};e.prototype.componentDidLoad=function(){var e=this;this.init();this._isMounted=true;Taro.eventCenter.on("__taroStartPullDownRefresh",(function(t){var r=t.successHandler,n=t.errorHandler;try{e.triggerPullDownRefresh(true);r({errMsg:"startPullDownRefresh: ok"})}catch(e){n({errMsg:"startPullDownRefresh: fail"})}}));Taro.eventCenter.on("__taroStopPullDownRefresh",(function(t){var r=t.successHandler,n=t.errorHandler;try{e.triggerPullDownRefresh(false);r({errMsg:"stopPullDownRefresh: ok"})}catch(e){n({errMsg:"stopPullDownRefresh: fail"})}}))};e.prototype.render=function(){var e=this;var t=function(t){var r=e,n=r.currSt,i=r.dragOnEdge,o=r.prefixCls;var s=classnames(t,!i&&"".concat(o,"-transition"));var a=n==="activate"||n==="release";return h("div",{class:"".concat(o,"-content-wrapper")},h("div",{class:s,ref:function(t){e.contentRef=t}},a&&h("div",{class:"".concat(o,"-indicator")},h("div",null),h("div",null),h("div",null)),h("slot",null)))};if(this.scrollContainer){return t("".concat(this.prefixCls,"-content ").concat(this.prefixCls,"-down"))}return h(Host,{class:classnames(this.prefixCls,"".concat(this.prefixCls,"-down"))},t("".concat(this.prefixCls,"-content")))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currSt:["statusChange"]}},enumerable:false,configurable:true});return e}();PullToRefresh.style=indexCss;export{PullToRefresh as taro_pull_to_refresh};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-980f930f.js";var RichText=function(){function
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-980f930f.js";var indexCss="taro-rich-text-core{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}taro-rich-text-core[selectable=true],taro-rich-text-core[user-select=true]{display:block;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}taro-rich-text-core[space]{white-space:pre-wrap}taro-rich-text-core[space=ensp]{word-spacing:0.5em}taro-rich-text-core[space=nbsp]{word-spacing:1em}";var RichText=function(){function e(e){var t=this;registerInstance(this,e);this.renderNode=function(e){if("type"in e&&e.type==="text"){var r=(e.text||"").replace(/ /g," ");return r}else if("name"in e&&e.name){var n=e.name,s=e.attrs,i=e.children;var c={};var a=[];if(s&&typeof s==="object"){var o=function(e){var t=s[e];if(e==="style"&&typeof t==="string"){var r=t.split(";").map((function(e){return e.trim()})).filter((function(e){return e}));var n={};r.forEach((function(e){if(!e)return;var t=/(.+): *(.+)/g.exec(e);if(!t)return;var r=t[1],s=t[2];var i=r.replace(/-([a-z])/g,(function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e[1].toUpperCase()}));n[i]=s}));if(Object.keys(n).length){c.style=n}return"continue"}c[e]=t};for(var u in s){o(u)}}if(i&&i.length){a=i.map((function(e){return t.renderNode(e)}))}return h(n,c,a)}return null};this.nodes=undefined;this.selectable=false;this.userSelect=false;this.space=undefined}e.prototype.render=function(){var e=this,t=e.nodes,r=e.renderNode;if(Array.isArray(t)){return h(Host,null,t.map((function(e){return r(e)})))}else{return h(Host,{innerHTML:t})}};return e}();RichText.style=indexCss;export{RichText as taro_rich_text_core};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,o,r){function l(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,n){function i(t){try{c(r.next(t))}catch(t){n(t)}}function s(t){try{c(r["throw"](t))}catch(t){n(t)}}function c(t){t.done?o(t.value):l(t.value).then(i,s)}c((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,l,n,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,s[0]&&(o=0)),o)try{if(r=1,l&&(n=s[0]&2?l["return"]:s[0]?l["throw"]||((n=l["return"])&&n.call(l),0):l.next)&&!(n=n.call(l,s[1])).done)return n;if(l=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;l=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t];l=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import{c as classnames}from"./index-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,o,r){function l(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,n){function i(t){try{c(r.next(t))}catch(t){n(t)}}function s(t){try{c(r["throw"](t))}catch(t){n(t)}}function c(t){t.done?o(t.value):l(t.value).then(i,s)}c((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,l,n,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,s[0]&&(o=0)),o)try{if(r=1,l&&(n=s[0]&2?l["return"]:s[0]?l["throw"]||((n=l["return"])&&n.call(l),0):l.next)&&!(n=n.call(l,s[1])).done)return n;if(l=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;l=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t];l=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-980f930f.js";import{c as classnames}from"./index-c3e4004b.js";import{d as debounce}from"./index-d1b03e47.js";var indexCss="taro-scroll-view-core{display:block;width:100%;-webkit-overflow-scrolling:auto}taro-scroll-view-core::-webkit-scrollbar{display:none}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}";function easeOutScroll(t,e,o,r){if(o===void 0){o=500}if(t===e||typeof t!=="number"){return}var l=e-t;var n=Date.now();var i=e>=t;function s(t,e,o,r){return o*t/r+e}function c(){t=s(Date.now()-n,t,l,o);if(i&&t>=e||!i&&e>=t){r(e);return}r(t);requestAnimationFrame(c)}c()}var ScrollView=function(){function t(t){var e=this;registerInstance(this,t);this.onScroll=createEvent(this,"scroll",3);this.onScrollToUpper=createEvent(this,"scrolltoupper",3);this.onScrollToLower=createEvent(this,"scrolltolower",3);this._scrollLeft=0;this._scrollTop=0;this.upperAndLower=debounce((function(){var t=e.el,o=t.offsetWidth,r=t.offsetHeight,l=t.scrollLeft,n=t.scrollTop,i=t.scrollHeight,s=t.scrollWidth;var c=Number(e.lowerThreshold);var a=Number(e.upperThreshold);if(!isNaN(c)&&(e.scrollY&&r+n+c>=i||e.scrollX&&o+l+c>=s)){e.onScrollToLower.emit({direction:e.scrollX?"right":e.scrollY?"bottom":""})}if(!isNaN(a)&&(e.scrollY&&n<=a||e.scrollX&&l<=a)){e.onScrollToUpper.emit({direction:e.scrollX?"left":e.scrollY?"top":""})}}),200);this.scrollX=false;this.scrollY=false;this.upperThreshold=50;this.lowerThreshold=50;this.mpScrollTop=undefined;this.mpScrollLeft=undefined;this.mpScrollIntoView=undefined;this.animated=false}t.prototype.watchScrollLeft=function(t){var e=Number(t);var o=this.animated;this.mpScrollToMethod({left:e,animated:o})};t.prototype.watchScrollTop=function(t){var e=Number(t);var o=this.animated;this.mpScrollToMethod({top:e,animated:o})};t.prototype.watchScrollIntoView=function(t){this.mpScrollIntoViewMethod(t)};t.prototype.handleScroll=function(t){if(t instanceof CustomEvent)return;t.stopPropagation();var e=this.el,o=e.scrollLeft,r=e.scrollTop,l=e.scrollHeight,n=e.scrollWidth;this._scrollLeft=o;this._scrollTop=r;this.upperAndLower();this.onScroll.emit({scrollLeft:o,scrollTop:r,scrollHeight:l,scrollWidth:n})};t.prototype.mpScrollToMethod=function(t){return __awaiter(this,void 0,void 0,(function(){var e,o,r,l,n;var i=this;return __generator(this,(function(s){e=t.top,o=t.left,r=t.duration,l=t.animated,n=l===void 0?false:l;if(this.scrollY&&typeof e==="number"&&!isNaN(e)&&e!==this._scrollTop){if(n){easeOutScroll(this._scrollTop,e,r,(function(t){return i.el.scrollTop=t}))}else{this.el.scrollTop=e}this._scrollTop=e}if(this.scrollX&&typeof o==="number"&&!isNaN(o)&&o!==this._scrollLeft){if(n){easeOutScroll(this._scrollLeft,o,r,(function(t){return i.el.scrollLeft=t}))}else{this.el.scrollLeft=o}this._scrollLeft=o}return[2]}))}))};t.prototype.mpScrollIntoViewMethod=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){if(typeof t==="string"&&t){(e=document.querySelector("#".concat(t)))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}return[2]}))}))};t.prototype.componentDidLoad=function(){var t=Number(this.mpScrollTop);var e=Number(this.mpScrollLeft);var o=this.animated;this.mpScrollToMethod({top:t,left:e,animated:o})};t.prototype.render=function(){var t=this,e=t.scrollX,o=t.scrollY;var r=classnames({"taro-scroll-view__scroll-x":e,"taro-scroll-view__scroll-y":o});return h(Host,{class:r},h("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{mpScrollLeft:["watchScrollLeft"],mpScrollTop:["watchScrollTop"],mpScrollIntoView:["watchScrollIntoView"]}},enumerable:false,configurable:true});return t}();ScrollView.style=indexCss;export{ScrollView as taro_scroll_view_core};
|