@tarojs/components 3.3.14 → 3.5.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-cde74e58.js → index-b9715722.js} +0 -0
- package/dist/cjs/{index-7464647f.js → index-dd4b7ba3.js} +0 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/taro-audio-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-block-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +2 -2
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +18 -4
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +50 -4
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-form-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-input-core.cjs.entry.js +5 -5
- package/dist/cjs/taro-label-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-progress-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +2 -2
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-slider-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-switch-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +70 -22
- package/dist/cjs/taro-text-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-textarea-core.cjs.entry.js +64 -4
- package/dist/cjs/taro-video-control_3.cjs.entry.js +183 -100
- package/dist/cjs/taro-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cover-image/cover-image.js +94 -0
- package/dist/collection/components/cover-image/style/index.css +5 -0
- package/dist/collection/components/cover-view/cover-view.js +166 -4
- package/dist/collection/components/cover-view/style/cover-view.css +3 -0
- package/dist/collection/components/input/input.js +4 -4
- package/dist/collection/components/tabbar/tabbar.js +72 -20
- package/dist/collection/components/textarea/style/index.css +6 -2
- package/dist/collection/components/textarea/textarea.js +98 -3
- package/dist/collection/components/video/video-control.js +39 -22
- package/dist/collection/components/video/video-danmu.js +52 -39
- package/dist/collection/components/video/video.js +60 -37
- package/dist/esm/{index-85e10859.js → index-3c78bcaf.js} +0 -0
- package/dist/esm/{index-165a6222.js → index-5bd7cbab.js} +0 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/taro-audio-core.entry.js +1 -1
- package/dist/esm/taro-block-core.entry.js +1 -1
- package/dist/esm/taro-button-core.entry.js +2 -2
- package/dist/esm/taro-camera-core.entry.js +1 -1
- package/dist/esm/taro-canvas-core.entry.js +1 -1
- package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm/taro-components.js +2 -2
- package/dist/esm/taro-cover-image-core.entry.js +18 -4
- package/dist/esm/taro-cover-view-core.entry.js +50 -4
- package/dist/esm/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm/taro-form-core.entry.js +1 -1
- package/dist/esm/taro-icon-core.entry.js +2 -2
- package/dist/esm/taro-image-core.entry.js +2 -2
- package/dist/esm/taro-input-core.entry.js +5 -5
- package/dist/esm/taro-label-core.entry.js +1 -1
- package/dist/esm/taro-movable-area-core.entry.js +1 -1
- package/dist/esm/taro-movable-view-core.entry.js +1 -1
- package/dist/esm/taro-navigator-core.entry.js +2 -2
- package/dist/esm/taro-open-data-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +2 -2
- package/dist/esm/taro-picker-view-column-core.entry.js +1 -1
- package/dist/esm/taro-picker-view-core.entry.js +1 -1
- package/dist/esm/taro-progress-core.entry.js +1 -1
- package/dist/esm/taro-pull-to-refresh.entry.js +2 -2
- package/dist/esm/taro-radio-core_2.entry.js +1 -1
- package/dist/esm/taro-rich-text-core.entry.js +1 -1
- package/dist/esm/taro-scroll-view-core.entry.js +2 -2
- package/dist/esm/taro-slider-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +2 -2
- package/dist/esm/taro-switch-core.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +70 -22
- package/dist/esm/taro-text-core.entry.js +2 -2
- package/dist/esm/taro-textarea-core.entry.js +64 -4
- package/dist/esm/taro-video-control_3.entry.js +183 -100
- package/dist/esm/taro-view-core.entry.js +2 -2
- package/dist/esm/taro-web-view-core.entry.js +1 -1
- package/dist/esm-es5/{index-85e10859.js → index-3c78bcaf.js} +0 -0
- package/dist/esm-es5/{index-165a6222.js → index-5bd7cbab.js} +0 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-audio-core.entry.js +1 -1
- package/dist/esm-es5/taro-block-core.entry.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm-es5/taro-form-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-label-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-data-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.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-progress-core.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-radio-core_2.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-slider-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-switch-core.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/esm-es5/taro-web-view-core.entry.js +1 -1
- package/dist/taro-components/{p-3e2d4793.entry.js → p-06bffead.entry.js} +1 -1
- package/dist/taro-components/{p-b685a487.system.entry.js → p-10a6c489.system.entry.js} +1 -1
- package/dist/taro-components/p-11932905.entry.js +1 -0
- package/dist/taro-components/{p-2ef4681b.system.entry.js → p-12638ebc.system.entry.js} +1 -1
- package/dist/taro-components/p-12ae0a33.entry.js +1 -0
- package/dist/taro-components/{p-8d905ff5.system.entry.js → p-13c1404f.system.entry.js} +1 -1
- package/dist/taro-components/{p-d6269b5e.system.entry.js → p-17039974.system.entry.js} +1 -1
- package/dist/taro-components/{p-7a5be745.entry.js → p-17cf8b5b.entry.js} +1 -1
- package/dist/taro-components/{p-5a13bd63.system.entry.js → p-1b790eb0.system.entry.js} +1 -1
- package/dist/taro-components/{p-2eda9121.system.entry.js → p-1e4f1702.system.entry.js} +1 -1
- package/dist/taro-components/p-2438fcd4.system.entry.js +1 -0
- package/dist/taro-components/{p-00328ebf.system.entry.js → p-264b7229.system.entry.js} +1 -1
- package/dist/taro-components/p-33ee636a.system.js +1 -0
- package/dist/taro-components/{p-1507bcbf.entry.js → p-3633bb84.entry.js} +1 -1
- package/dist/taro-components/{p-2ce9bc65.system.entry.js → p-3643d8f7.system.entry.js} +1 -1
- package/dist/taro-components/{p-6967e577.js → p-37cfdd8f.js} +0 -0
- package/dist/taro-components/{p-098f4931.system.entry.js → p-3aac5746.system.entry.js} +1 -1
- package/dist/taro-components/{p-d52009d1.system.entry.js → p-3eebeb1c.system.entry.js} +1 -1
- package/dist/taro-components/p-431197bc.entry.js +1 -0
- package/dist/taro-components/{p-2de1a146.system.entry.js → p-43de2f12.system.entry.js} +1 -1
- package/dist/taro-components/{p-69be8189.system.entry.js → p-46cf6431.system.entry.js} +1 -1
- package/dist/taro-components/{p-f4158e42.entry.js → p-4dbed323.entry.js} +1 -1
- package/dist/taro-components/{p-bd922592.system.entry.js → p-50066d5e.system.entry.js} +1 -1
- package/dist/taro-components/p-554e1039.entry.js +1 -0
- package/dist/taro-components/{p-0da88b1b.entry.js → p-55b0a30b.entry.js} +1 -1
- package/dist/taro-components/p-5c420456.entry.js +1 -0
- package/dist/taro-components/{p-d12592f1.entry.js → p-5f8b5f62.entry.js} +1 -1
- package/dist/taro-components/p-627a5064.system.entry.js +1 -0
- package/dist/taro-components/{p-8cf16235.entry.js → p-64993f48.entry.js} +1 -1
- package/dist/taro-components/p-66237ac0.entry.js +1 -0
- package/dist/taro-components/{p-923c6e08.entry.js → p-6965567d.entry.js} +1 -1
- package/dist/taro-components/{p-a34988ff.system.entry.js → p-703dfad8.system.entry.js} +1 -1
- package/dist/taro-components/p-71de9bd6.entry.js +1 -0
- package/dist/taro-components/p-74540410.entry.js +1 -0
- package/dist/taro-components/{p-0fb7f599.entry.js → p-7a64a3d2.entry.js} +1 -1
- package/dist/taro-components/{p-1ed219a6.system.entry.js → p-7d848382.system.entry.js} +1 -1
- package/dist/taro-components/{p-ca67c759.entry.js → p-83dedaa2.entry.js} +1 -1
- package/dist/taro-components/{p-81588c19.entry.js → p-865c21b5.entry.js} +1 -1
- package/dist/taro-components/{p-26c08f44.entry.js → p-8a5e67cb.entry.js} +1 -1
- package/dist/taro-components/p-8bc82aaa.entry.js +1 -0
- package/dist/taro-components/p-8db237e0.entry.js +1 -0
- package/dist/taro-components/{p-5c8ba192.system.entry.js → p-8f90fca9.system.entry.js} +1 -1
- package/dist/taro-components/{p-696f0d1c.system.js → p-94c20f60.system.js} +0 -0
- package/dist/taro-components/p-95529dc0.entry.js +1 -0
- package/dist/taro-components/p-964692f7.system.entry.js +1 -0
- package/dist/taro-components/p-99ed3ed2.system.entry.js +1 -0
- package/dist/taro-components/{p-ce49e2f4.system.entry.js → p-9a618935.system.entry.js} +1 -1
- package/dist/taro-components/p-9d0ab7c4.entry.js +1 -0
- package/dist/taro-components/{p-9e807bd6.system.entry.js → p-9fc88fc1.system.entry.js} +1 -1
- package/dist/taro-components/p-a1423df9.entry.js +1 -0
- package/dist/taro-components/{p-93748645.system.js → p-b2d01686.system.js} +0 -0
- package/dist/taro-components/p-b75d8a65.entry.js +1 -0
- package/dist/taro-components/{p-5d84eaf0.entry.js → p-b8e0ad7d.entry.js} +1 -1
- package/dist/taro-components/p-b9280444.entry.js +1 -0
- package/dist/taro-components/{p-4462dca4.system.entry.js → p-bd3fa355.system.entry.js} +1 -1
- package/dist/taro-components/p-c218c298.entry.js +1 -0
- package/dist/taro-components/p-c362734b.entry.js +1 -0
- package/dist/taro-components/{p-d52bf5f5.system.entry.js → p-cea9a198.system.entry.js} +1 -1
- package/dist/taro-components/{p-321aeeec.system.entry.js → p-cfbdd4e3.system.entry.js} +1 -1
- package/dist/taro-components/p-d394a61f.system.entry.js +1 -0
- package/dist/taro-components/{p-7b021c48.entry.js → p-d567b95e.entry.js} +1 -1
- package/dist/taro-components/{p-de3a4828.entry.js → p-d5971476.entry.js} +1 -1
- package/dist/taro-components/{p-26d8c60a.system.entry.js → p-e0af1d0d.system.entry.js} +1 -1
- package/dist/taro-components/p-e27798a4.entry.js +1 -0
- package/dist/taro-components/{p-37cfef64.entry.js → p-e6298500.entry.js} +1 -1
- package/dist/taro-components/{p-49ae5efb.js → p-f05e1558.js} +0 -0
- package/dist/taro-components/p-f98e0224.entry.js +1 -0
- package/dist/taro-components/{p-5e6feca6.system.entry.js → p-fb0959c1.system.entry.js} +1 -1
- package/dist/taro-components/{p-4168e24d.system.entry.js → p-fb2252b7.system.entry.js} +1 -1
- package/dist/taro-components/{p-5412a1d2.system.entry.js → p-fc4939c6.system.entry.js} +1 -1
- package/dist/taro-components/{p-9d6a7a70.system.entry.js → p-fd8312e5.system.entry.js} +1 -1
- package/dist/taro-components/{p-7ffcfb05.system.entry.js → p-fdd73355.system.entry.js} +1 -1
- package/dist/taro-components/{p-016f56cc.system.entry.js → p-fde3a009.system.entry.js} +1 -1
- package/dist/taro-components/{p-9e912454.system.entry.js → p-fe156231.system.entry.js} +1 -1
- package/dist/taro-components/{p-2b6a2449.system.entry.js → p-ffe63ce9.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/taro-components/taro-components.js +1 -1
- package/dist/types/components/cover-image/cover-image.d.ts +11 -0
- package/dist/types/components/cover-view/cover-view.d.ts +14 -2
- package/dist/types/components/tabbar/tabbar.d.ts +20 -1
- package/dist/types/components/textarea/textarea.d.ts +6 -0
- package/dist/types/components.d.ts +18 -0
- package/dist-h5/vue/createComponent.js +4 -0
- package/dist-h5/vue/createFormsComponent.js +8 -1
- package/dist-h5/vue/simpleComponents.js +1 -1
- package/package.json +4 -4
- package/dist/collection/components/cover-view/cover-image.js +0 -11
- package/dist/taro-components/p-17c0731f.entry.js +0 -1
- package/dist/taro-components/p-2c5d57af.entry.js +0 -1
- package/dist/taro-components/p-30bfacb9.system.js +0 -1
- package/dist/taro-components/p-3554df41.entry.js +0 -1
- package/dist/taro-components/p-382cabbc.system.entry.js +0 -1
- package/dist/taro-components/p-4a2ffc1c.entry.js +0 -1
- package/dist/taro-components/p-4ff67760.entry.js +0 -1
- package/dist/taro-components/p-6daacf48.entry.js +0 -1
- package/dist/taro-components/p-70f40e3a.entry.js +0 -1
- package/dist/taro-components/p-72f2b6f5.entry.js +0 -1
- package/dist/taro-components/p-76c00960.entry.js +0 -1
- package/dist/taro-components/p-7f3e5f09.entry.js +0 -1
- package/dist/taro-components/p-9767491b.entry.js +0 -1
- package/dist/taro-components/p-a895db87.entry.js +0 -1
- package/dist/taro-components/p-af9ec312.system.entry.js +0 -1
- package/dist/taro-components/p-b6e0dca6.entry.js +0 -1
- package/dist/taro-components/p-c221cebb.system.entry.js +0 -1
- package/dist/taro-components/p-c5722042.entry.js +0 -1
- package/dist/taro-components/p-ce093936.entry.js +0 -1
- package/dist/taro-components/p-d6a37b93.entry.js +0 -1
- package/dist/taro-components/p-f6c7f07c.system.entry.js +0 -1
- package/dist/taro-components/p-f7b6c1a6.entry.js +0 -1
- package/dist/taro-components/p-f8d0dabb.entry.js +0 -1
- package/dist/taro-components/p-f9013b36.system.entry.js +0 -1
- package/dist/taro-components/p-f991bc7b.entry.js +0 -1
- package/dist/types/components/cover-view/cover-image.d.ts +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
2
|
-
import { c as classnames } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-5bd7cbab.js';
|
|
2
|
+
import { c as classnames } from './index-3c78bcaf.js';
|
|
3
3
|
|
|
4
4
|
const navigatorCss = ".navigator-hover{background:#efefef}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { c as classnames } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5bd7cbab.js';
|
|
2
|
+
import { c as classnames } from './index-3c78bcaf.js';
|
|
3
3
|
|
|
4
4
|
function getTimeRange(begin, end) {
|
|
5
5
|
const range = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { c as classnames } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5bd7cbab.js';
|
|
2
|
+
import { c as classnames } from './index-3c78bcaf.js';
|
|
3
3
|
|
|
4
4
|
const indexCss = ".rmc-pull-to-refresh-content{-webkit-transform-origin:left top 0px;transform-origin:left top 0px}.rmc-pull-to-refresh-content-wrapper{overflow:hidden}.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{text-align:center;height:30px;line-height:10px}.rmc-pull-to-refresh-indicator>div{background-color:grey;width:6px;height:6px;border-radius:100%;margin:3px;-webkit-animation-fill-mode:both;animation-fill-mode:both;display:inline-block;-webkit-animation:rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;animation:rmc-pull-to-refresh-indicator 0.5s 0s infinite linear}.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}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { c as classnames } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5bd7cbab.js';
|
|
2
|
+
import { c as classnames } from './index-3c78bcaf.js';
|
|
3
3
|
|
|
4
4
|
const 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}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { c as classnames } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5bd7cbab.js';
|
|
2
|
+
import { c as classnames } from './index-3c78bcaf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SSR Window 3.0.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5bd7cbab.js';
|
|
2
2
|
|
|
3
3
|
const indexCss = "taro-switch-core{display:inline-block;width:52px;height:32px}taro-switch-core .weui-switch{display:block;width:100%;height:100%}";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-
|
|
2
|
-
import { c as classnames } from './index-
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-5bd7cbab.js';
|
|
2
|
+
import { c as classnames } from './index-3c78bcaf.js';
|
|
3
3
|
|
|
4
4
|
function isAbsolute(pathname) {
|
|
5
5
|
return pathname.charAt(0) === '/';
|
|
@@ -152,18 +152,18 @@ let Tabbar = class {
|
|
|
152
152
|
this.status = STATUS_SHOW;
|
|
153
153
|
this.getOriginUrl = (url) => {
|
|
154
154
|
const customRoute = this.customRoutes.filter(([, customUrl]) => {
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
return
|
|
155
|
+
const pathA = splitUrl(customUrl).path;
|
|
156
|
+
const pathB = splitUrl(url).path;
|
|
157
|
+
return pathA === pathB;
|
|
158
158
|
});
|
|
159
159
|
return customRoute.length ? customRoute[0][0] : url;
|
|
160
160
|
};
|
|
161
161
|
this.getSelectedIndex = (url) => {
|
|
162
162
|
let foundIndex = -1;
|
|
163
163
|
this.list.forEach(({ pagePath }, idx) => {
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
164
|
+
const pathA = splitUrl(url).path;
|
|
165
|
+
const pathB = splitUrl(pagePath).path;
|
|
166
|
+
if (pathA === pathB) {
|
|
167
167
|
foundIndex = idx;
|
|
168
168
|
}
|
|
169
169
|
});
|
|
@@ -206,23 +206,27 @@ let Tabbar = class {
|
|
|
206
206
|
}
|
|
207
207
|
this.selectedIndex = this.getSelectedIndex(this.getOriginUrl(currentPage));
|
|
208
208
|
};
|
|
209
|
-
this.setTabBarBadgeHandler = ({ index, text, errorHandler }) => {
|
|
210
|
-
const list = this.list;
|
|
209
|
+
this.setTabBarBadgeHandler = ({ index, text, successHandler, errorHandler }) => {
|
|
210
|
+
const list = [...this.list];
|
|
211
211
|
if (index in list) {
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
list[index].showRedDot = false;
|
|
213
|
+
list[index].badgeText = text;
|
|
214
|
+
successHandler({
|
|
215
|
+
errMsg: 'setTabBarBadge:ok'
|
|
216
|
+
});
|
|
214
217
|
}
|
|
215
218
|
else {
|
|
216
219
|
errorHandler({
|
|
217
220
|
errMsg: 'setTabBarBadge:fail tabbar item not found'
|
|
218
221
|
});
|
|
219
222
|
}
|
|
223
|
+
this.list = list;
|
|
220
224
|
};
|
|
221
225
|
this.removeTabBarBadgeHandler = ({ index, successHandler, errorHandler }) => {
|
|
222
|
-
const list = this.list;
|
|
226
|
+
const list = [...this.list];
|
|
223
227
|
if (index in list) {
|
|
224
|
-
|
|
225
|
-
|
|
228
|
+
list[index].badgeText = null;
|
|
229
|
+
list[index].badgeText = null;
|
|
226
230
|
successHandler({
|
|
227
231
|
errMsg: 'removeTabBarBadge:ok'
|
|
228
232
|
});
|
|
@@ -232,9 +236,10 @@ let Tabbar = class {
|
|
|
232
236
|
errMsg: 'removeTabBarBadge:fail tabbar item not found'
|
|
233
237
|
});
|
|
234
238
|
}
|
|
239
|
+
this.list = list;
|
|
235
240
|
};
|
|
236
241
|
this.showTabBarRedDotHandler = ({ index, successHandler, errorHandler }) => {
|
|
237
|
-
const list = this.list;
|
|
242
|
+
const list = [...this.list];
|
|
238
243
|
if (index in list) {
|
|
239
244
|
list[index].badgeText = null;
|
|
240
245
|
list[index].showRedDot = true;
|
|
@@ -247,9 +252,10 @@ let Tabbar = class {
|
|
|
247
252
|
errMsg: 'showTabBarRedDot:fail tabbar item not found'
|
|
248
253
|
});
|
|
249
254
|
}
|
|
255
|
+
this.list = list;
|
|
250
256
|
};
|
|
251
257
|
this.hideTabBarRedDotHandler = ({ index, successHandler, errorHandler }) => {
|
|
252
|
-
const list = this.list;
|
|
258
|
+
const list = [...this.list];
|
|
253
259
|
if (index in list) {
|
|
254
260
|
list[index].showRedDot = false;
|
|
255
261
|
successHandler({
|
|
@@ -261,6 +267,7 @@ let Tabbar = class {
|
|
|
261
267
|
errMsg: 'hideTabBarRedDot:fail tabbar item not found'
|
|
262
268
|
});
|
|
263
269
|
}
|
|
270
|
+
this.list = list;
|
|
264
271
|
};
|
|
265
272
|
this.showTabBarHandler = ({ successHandler }) => {
|
|
266
273
|
this.status = STATUS_SHOW;
|
|
@@ -274,6 +281,39 @@ let Tabbar = class {
|
|
|
274
281
|
errMsg: 'hideTabBar:ok'
|
|
275
282
|
});
|
|
276
283
|
};
|
|
284
|
+
this.setTabBarStyleHandler = ({ color, selectedColor, backgroundColor, borderStyle, successHandler }) => {
|
|
285
|
+
if (backgroundColor)
|
|
286
|
+
this.backgroundColor = backgroundColor;
|
|
287
|
+
if (borderStyle)
|
|
288
|
+
this.borderStyle = borderStyle;
|
|
289
|
+
if (color)
|
|
290
|
+
this.color = color;
|
|
291
|
+
if (selectedColor)
|
|
292
|
+
this.selectedColor = selectedColor;
|
|
293
|
+
successHandler({
|
|
294
|
+
errMsg: 'setTabBarStyle:ok'
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
this.setTabBarItemHandler = ({ index, iconPath, selectedIconPath, text, successHandler, errorHandler }) => {
|
|
298
|
+
const list = [...this.list];
|
|
299
|
+
if (index in list) {
|
|
300
|
+
if (iconPath)
|
|
301
|
+
list[index].iconPath = iconPath;
|
|
302
|
+
if (selectedIconPath)
|
|
303
|
+
list[index].selectedIconPath = selectedIconPath;
|
|
304
|
+
if (text)
|
|
305
|
+
list[index].text = text;
|
|
306
|
+
successHandler({
|
|
307
|
+
errMsg: 'setTabBarItem:ok'
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
errorHandler({
|
|
312
|
+
errMsg: 'setTabBarItem:fail tabbar item not found'
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
this.list = list;
|
|
316
|
+
};
|
|
277
317
|
const list = this.conf.list;
|
|
278
318
|
const customRoutes = this.conf.customRoutes;
|
|
279
319
|
if (Object.prototype.toString.call(list) !== '[object Array]' ||
|
|
@@ -291,6 +331,10 @@ let Tabbar = class {
|
|
|
291
331
|
}
|
|
292
332
|
});
|
|
293
333
|
this.list = list;
|
|
334
|
+
this.borderStyle = this.conf.borderStyle;
|
|
335
|
+
this.backgroundColor = this.conf.backgroundColor;
|
|
336
|
+
this.color = this.conf.color;
|
|
337
|
+
this.selectedColor = this.conf.selectedColor;
|
|
294
338
|
}
|
|
295
339
|
getCurrentUrl() {
|
|
296
340
|
const routerMode = this.conf.mode;
|
|
@@ -318,6 +362,8 @@ let Tabbar = class {
|
|
|
318
362
|
Taro.eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
|
|
319
363
|
Taro.eventCenter.on('__taroShowTabBar', this.showTabBarHandler);
|
|
320
364
|
Taro.eventCenter.on('__taroHideTabBar', this.hideTabBarHandler);
|
|
365
|
+
Taro.eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler);
|
|
366
|
+
Taro.eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler);
|
|
321
367
|
}
|
|
322
368
|
removeEvent() {
|
|
323
369
|
Taro.eventCenter.off('__taroRouterChange', this.routerChangeHandler);
|
|
@@ -328,6 +374,8 @@ let Tabbar = class {
|
|
|
328
374
|
Taro.eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
|
|
329
375
|
Taro.eventCenter.off('__taroShowTabBar', this.showTabBarHandler);
|
|
330
376
|
Taro.eventCenter.off('__taroHideTabBar', this.hideTabBarHandler);
|
|
377
|
+
Taro.eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler);
|
|
378
|
+
Taro.eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler);
|
|
331
379
|
}
|
|
332
380
|
componentDidLoad() {
|
|
333
381
|
this.tabbarPos = this.tabbar.nextElementSibling ? 'top' : 'bottom';
|
|
@@ -338,10 +386,10 @@ let Tabbar = class {
|
|
|
338
386
|
this.removeEvent();
|
|
339
387
|
}
|
|
340
388
|
render() {
|
|
341
|
-
const {
|
|
389
|
+
const { tabbarPos = 'bottom' } = this;
|
|
342
390
|
const status = this.status;
|
|
343
391
|
const containerCls = classnames('weui-tabbar', {
|
|
344
|
-
[`taro-tabbar__border-${
|
|
392
|
+
[`taro-tabbar__border-${this.borderStyle || 'black'}`]: true
|
|
345
393
|
});
|
|
346
394
|
const shouldHideTabBar = this.selectedIndex === -1 || status === STATUS_HIDE;
|
|
347
395
|
const shouldSlideout = status === STATUS_SLIDEOUT;
|
|
@@ -349,17 +397,17 @@ let Tabbar = class {
|
|
|
349
397
|
[hideTabBarClassName]: shouldHideTabBar,
|
|
350
398
|
[hideTabBarWithAnimationClassName]: shouldSlideout
|
|
351
399
|
}) }, h("div", { class: containerCls, style: {
|
|
352
|
-
backgroundColor:
|
|
400
|
+
backgroundColor: this.backgroundColor || ''
|
|
353
401
|
} }, this.list.map((item, index) => {
|
|
354
402
|
const isSelected = this.selectedIndex === index;
|
|
355
403
|
let textColor;
|
|
356
404
|
let iconPath;
|
|
357
405
|
if (isSelected) {
|
|
358
|
-
textColor =
|
|
406
|
+
textColor = this.selectedColor || '';
|
|
359
407
|
iconPath = item.selectedIconPath;
|
|
360
408
|
}
|
|
361
409
|
else {
|
|
362
|
-
textColor =
|
|
410
|
+
textColor = this.color || '';
|
|
363
411
|
iconPath = item.iconPath;
|
|
364
412
|
}
|
|
365
413
|
return (h(TabbarItem, { index: index, onSelect: this.switchTab.bind(this), isSelected: isSelected, textColor: textColor, iconPath: iconPath, text: item.text, badgeText: item.badgeText, showRedDot: item.showRedDot }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { c as classnames } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-5bd7cbab.js';
|
|
2
|
+
import { c as classnames } from './index-3c78bcaf.js';
|
|
3
3
|
|
|
4
4
|
const indexCss = "taro-text-core{display:inline;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5bd7cbab.js';
|
|
2
2
|
|
|
3
|
-
const indexCss = "taro-textarea-core{display:block;width:300px
|
|
3
|
+
const indexCss = "taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";
|
|
4
4
|
|
|
5
5
|
function fixControlledValue(value) {
|
|
6
6
|
return value !== null && value !== void 0 ? value : '';
|
|
@@ -12,12 +12,16 @@ let Textarea = class {
|
|
|
12
12
|
this.onFocus = createEvent(this, "focus", 7);
|
|
13
13
|
this.onBlur = createEvent(this, "blur", 7);
|
|
14
14
|
this.onChange = createEvent(this, "change", 7);
|
|
15
|
+
this.onLineChange = createEvent(this, "linechange", 7);
|
|
15
16
|
this.disabled = false;
|
|
16
17
|
this.maxlength = 140;
|
|
17
18
|
this.autoFocus = false;
|
|
19
|
+
this.autoHeight = false;
|
|
18
20
|
this.nativeProps = {};
|
|
21
|
+
this.line = 1;
|
|
19
22
|
this.hanldeInput = (e) => {
|
|
20
23
|
e.stopPropagation();
|
|
24
|
+
this.handleLineChange();
|
|
21
25
|
this.onInput.emit({
|
|
22
26
|
value: e.target.value,
|
|
23
27
|
cursor: e.target.value.length
|
|
@@ -39,6 +43,58 @@ let Textarea = class {
|
|
|
39
43
|
value: e.target.value
|
|
40
44
|
});
|
|
41
45
|
};
|
|
46
|
+
this.handleLineChange = () => {
|
|
47
|
+
const line = this.getNumberOfLines();
|
|
48
|
+
if (line !== this.line) {
|
|
49
|
+
this.line = line;
|
|
50
|
+
this.onLineChange.emit({
|
|
51
|
+
height: this.textareaRef.clientHeight,
|
|
52
|
+
lineCount: this.line
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
this.calculateContentHeight = (ta, scanAmount) => {
|
|
57
|
+
let origHeight = ta.style.height, height = ta.offsetHeight, scrollHeight = ta.scrollHeight, overflow = ta.style.overflow;
|
|
58
|
+
/// only bother if the ta is bigger than content
|
|
59
|
+
if (height >= scrollHeight) {
|
|
60
|
+
/// check that our browser supports changing dimension
|
|
61
|
+
/// calculations mid-way through a function call...
|
|
62
|
+
ta.style.height = height + scanAmount + 'px';
|
|
63
|
+
/// because the scrollbar can cause calculation problems
|
|
64
|
+
ta.style.overflow = 'hidden';
|
|
65
|
+
/// by checking that scrollHeight has updated
|
|
66
|
+
if (scrollHeight < ta.scrollHeight) {
|
|
67
|
+
/// now try and scan the ta's height downwards
|
|
68
|
+
/// until scrollHeight becomes larger than height
|
|
69
|
+
while (ta.offsetHeight >= ta.scrollHeight) {
|
|
70
|
+
ta.style.height = (height -= scanAmount) + 'px';
|
|
71
|
+
}
|
|
72
|
+
/// be more specific to get the exact height
|
|
73
|
+
while (ta.offsetHeight < ta.scrollHeight) {
|
|
74
|
+
ta.style.height = height++ + 'px';
|
|
75
|
+
}
|
|
76
|
+
/// reset the ta back to it's original height
|
|
77
|
+
ta.style.height = origHeight;
|
|
78
|
+
/// put the overflow back
|
|
79
|
+
ta.style.overflow = overflow;
|
|
80
|
+
return height;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return scrollHeight;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
this.getNumberOfLines = () => {
|
|
88
|
+
const ta = this.textareaRef, style = window.getComputedStyle ? window.getComputedStyle(ta) : ta.style,
|
|
89
|
+
// This will get the line-height only if it is set in the css,
|
|
90
|
+
// otherwise it's "normal"
|
|
91
|
+
taLineHeight = parseInt(style.lineHeight, 10),
|
|
92
|
+
// Get the scroll height of the textarea
|
|
93
|
+
taHeight = this.calculateContentHeight(ta, taLineHeight),
|
|
94
|
+
// calculate the number of lines
|
|
95
|
+
numberOfLines = Math.floor(taHeight / taLineHeight);
|
|
96
|
+
return numberOfLines;
|
|
97
|
+
};
|
|
42
98
|
}
|
|
43
99
|
componentDidLoad() {
|
|
44
100
|
Object.defineProperty(this.el, 'value', {
|
|
@@ -49,12 +105,16 @@ let Textarea = class {
|
|
|
49
105
|
this.autoFocus && this.textareaRef.focus();
|
|
50
106
|
}
|
|
51
107
|
render() {
|
|
52
|
-
const { value, placeholder, disabled, maxlength, autoFocus, name, nativeProps, hanldeInput, handleFocus, handleBlur, handleChange } = this;
|
|
108
|
+
const { value, placeholder, disabled, maxlength, autoFocus, autoHeight, name, nativeProps, hanldeInput, handleFocus, handleBlur, handleChange } = this;
|
|
109
|
+
const otherProps = {};
|
|
110
|
+
if (autoHeight) {
|
|
111
|
+
otherProps.rows = this.line;
|
|
112
|
+
}
|
|
53
113
|
return (h("textarea", Object.assign({ ref: input => {
|
|
54
114
|
if (input) {
|
|
55
115
|
this.textareaRef = input;
|
|
56
116
|
}
|
|
57
|
-
}, class:
|
|
117
|
+
}, class: `taro-textarea ${autoHeight ? 'auto-height' : ''}`, value: fixControlledValue(value), placeholder: placeholder, name: name, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, onInput: hanldeInput, onFocus: handleFocus, onBlur: handleBlur, onChange: handleChange }, nativeProps, otherProps)));
|
|
58
118
|
}
|
|
59
119
|
get el() { return getElement(this); }
|
|
60
120
|
};
|