@tarojs/components 3.3.15 → 3.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-ad-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-live-player-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-map-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-match-media-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-navigator-core.cjs.entry.js +10 -6
- package/dist/cjs/taro-official-account-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-page-container-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +7 -3
- package/dist/cjs/taro-share-element-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-slot-core.cjs.entry.js +19 -0
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +10 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +40 -32
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +19 -0
- package/dist/collection/collection-manifest.json +20 -4
- package/dist/collection/components/ad/ad.js +11 -0
- package/dist/collection/components/ad-custom/ad-custom.js +11 -0
- package/dist/collection/components/editor/editor.js +11 -0
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +11 -0
- package/dist/collection/components/image/image.js +1 -1
- package/dist/collection/components/image/style/index.css +2 -2
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +11 -0
- package/dist/collection/components/live-player/live-player.js +11 -0
- package/dist/collection/components/live-pusher/live-pusher.js +11 -0
- package/dist/collection/components/map/map.js +11 -0
- package/dist/collection/components/match-media/match-media.js +11 -0
- package/dist/collection/components/{movable-view → movable-area}/movable-area.js +0 -0
- package/dist/collection/components/{movable-view → movable-area}/movable-view.js +0 -0
- package/dist/collection/components/navigation-bar/navigation-bar.js +11 -0
- package/dist/collection/components/navigator/navigator.js +1 -1
- package/dist/collection/components/official-account/official-account.js +11 -0
- package/dist/collection/components/page-container/page-container.js +11 -0
- package/dist/collection/components/page-meta/page-meta.js +11 -0
- package/dist/collection/components/{picker-view-column → picker-view}/picker-view-column.js +0 -0
- package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.js +1 -1
- package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/style/index.css +0 -0
- package/dist/collection/components/share-element/share-element.js +11 -0
- package/dist/collection/components/slot/slot.js +11 -0
- package/dist/collection/components/swiper/swiper.js +10 -1
- package/dist/collection/components/tabbar/tabbar.js +14 -6
- package/dist/collection/components/voip-room/voip-room.js +11 -0
- package/dist/collection/utils/index.js +50 -64
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-ad-core.entry.js +15 -0
- package/dist/esm/taro-ad-custom-core.entry.js +15 -0
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-editor-core.entry.js +15 -0
- package/dist/esm/taro-functional-page-navigator-core.entry.js +15 -0
- package/dist/esm/taro-image-core.entry.js +2 -2
- package/dist/esm/taro-keyboard-accessory-core.entry.js +15 -0
- package/dist/esm/taro-live-player-core.entry.js +15 -0
- package/dist/esm/taro-live-pusher-core.entry.js +15 -0
- package/dist/esm/taro-map-core.entry.js +15 -0
- package/dist/esm/taro-match-media-core.entry.js +15 -0
- package/dist/esm/taro-navigation-bar-core.entry.js +15 -0
- package/dist/esm/taro-navigator-core.entry.js +1 -1
- package/dist/esm/taro-official-account-core.entry.js +15 -0
- package/dist/esm/taro-page-container-core.entry.js +15 -0
- package/dist/esm/taro-page-meta-core.entry.js +15 -0
- package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm/taro-share-element-core.entry.js +15 -0
- package/dist/esm/taro-slot-core.entry.js +15 -0
- package/dist/esm/taro-swiper-core_2.entry.js +10 -1
- package/dist/esm/taro-tabbar.entry.js +15 -11
- package/dist/esm/taro-voip-room-core.entry.js +15 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-ad-core.entry.js +1 -0
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -0
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-editor-core.entry.js +1 -0
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -0
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -0
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -0
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -0
- package/dist/esm-es5/taro-map-core.entry.js +1 -0
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -0
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -0
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -0
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -0
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -0
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -0
- package/dist/esm-es5/taro-slot-core.entry.js +1 -0
- 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-voip-room-core.entry.js +1 -0
- package/dist/taro-components/p-02b84386.entry.js +1 -0
- package/dist/taro-components/p-0a0377f6.system.entry.js +1 -0
- package/dist/taro-components/p-14095f6b.system.entry.js +1 -0
- package/dist/taro-components/p-14fd68ec.entry.js +1 -0
- package/dist/taro-components/p-16d9e6b9.system.entry.js +1 -0
- package/dist/taro-components/p-1cc97957.entry.js +1 -0
- package/dist/taro-components/p-30bfacb9.system.js +1 -1
- package/dist/taro-components/p-37594e84.entry.js +1 -0
- package/dist/taro-components/p-38d8fa46.system.entry.js +1 -0
- package/dist/taro-components/{p-098f4931.system.entry.js → p-3984f596.system.entry.js} +1 -1
- package/dist/taro-components/p-3ed0783c.system.entry.js +1 -0
- package/dist/taro-components/p-4288566a.system.entry.js +1 -0
- package/dist/taro-components/p-432f803f.entry.js +1 -0
- package/dist/taro-components/p-4d643967.entry.js +1 -0
- package/dist/taro-components/p-52ef77b2.entry.js +1 -0
- package/dist/taro-components/p-53297f27.entry.js +1 -0
- package/dist/taro-components/p-5e20dff4.system.entry.js +1 -0
- package/dist/taro-components/p-60a15326.system.entry.js +1 -0
- package/dist/taro-components/p-6422a968.system.entry.js +1 -0
- package/dist/taro-components/p-81e1d9a3.system.entry.js +1 -0
- package/dist/taro-components/p-82741605.entry.js +1 -0
- package/dist/taro-components/p-8415cd92.entry.js +1 -0
- package/dist/taro-components/p-8f0e3f13.entry.js +1 -0
- package/dist/taro-components/p-9b9727c7.entry.js +1 -0
- package/dist/taro-components/p-9e7a85ae.entry.js +1 -0
- package/dist/taro-components/p-a4fdb95b.system.entry.js +1 -0
- package/dist/taro-components/p-a5c0a7e3.entry.js +1 -0
- package/dist/taro-components/p-ab55aacd.system.entry.js +1 -0
- package/dist/taro-components/{p-8cf16235.entry.js → p-b2ec0cf1.entry.js} +1 -1
- package/dist/taro-components/p-b3abedf8.entry.js +1 -0
- package/dist/taro-components/p-bc08a702.system.entry.js +1 -0
- package/dist/taro-components/p-becfab60.system.entry.js +1 -0
- package/dist/taro-components/p-c7cfcb8e.entry.js +1 -0
- package/dist/taro-components/p-cdf144cb.system.entry.js +1 -0
- package/dist/taro-components/p-dfe76645.entry.js +1 -0
- package/dist/taro-components/p-e1e289bb.entry.js +1 -0
- package/dist/taro-components/p-e42b782e.system.entry.js +1 -0
- package/dist/taro-components/p-ed3ff1e4.entry.js +1 -0
- package/dist/taro-components/p-effd64d5.system.entry.js +1 -0
- package/dist/taro-components/p-f05422a6.entry.js +1 -0
- package/dist/taro-components/p-f70b6a12.system.entry.js +1 -0
- package/dist/taro-components/p-f928a72e.system.entry.js +1 -0
- package/dist/taro-components/p-fac09a5c.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/ad/ad.d.ts +4 -0
- package/dist/types/components/ad-custom/ad-custom.d.ts +4 -0
- package/dist/types/components/editor/editor.d.ts +4 -0
- package/dist/types/components/functional-page-navigator/functional-page-navigator.d.ts +4 -0
- package/dist/types/components/keyboard-accessory/keyboard-accessory.d.ts +4 -0
- package/dist/types/components/live-player/live-player.d.ts +4 -0
- package/dist/types/components/live-pusher/live-pusher.d.ts +4 -0
- package/dist/types/components/map/map.d.ts +4 -0
- package/dist/types/components/match-media/match-media.d.ts +4 -0
- package/dist/types/components/{movable-view → movable-area}/movable-area.d.ts +0 -0
- package/dist/types/components/{movable-view → movable-area}/movable-view.d.ts +0 -0
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +4 -0
- package/dist/types/components/official-account/official-account.d.ts +4 -0
- package/dist/types/components/page-container/page-container.d.ts +4 -0
- package/dist/types/components/page-meta/page-meta.d.ts +4 -0
- package/dist/types/components/{picker-view-column → picker-view}/picker-view-column.d.ts +0 -0
- package/dist/types/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.d.ts +0 -0
- package/dist/types/components/share-element/share-element.d.ts +4 -0
- package/dist/types/components/slot/slot.d.ts +4 -0
- package/dist/types/components/swiper/swiper.d.ts +1 -0
- package/dist/types/components/tabbar/tabbar.d.ts +1 -1
- package/dist/types/components/voip-room/voip-room.d.ts +4 -0
- package/dist/types/components.d.ts +208 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist-h5/react/index.js +2 -1
- package/dist-h5/vue/simpleComponents.js +1 -1
- package/package.json +3 -3
- package/types/Ad.d.ts +6 -6
- package/types/AdCustom.d.ts +50 -0
- package/types/Button.d.ts +2 -2
- package/types/CoverImage.d.ts +3 -3
- package/types/CoverView.d.ts +3 -3
- package/types/Image.d.ts +8 -2
- package/types/KeyboardAccessory.d.ts +29 -0
- package/types/MovableView.d.ts +1 -1
- package/types/PageContainer.d.ts +115 -0
- package/types/ShareElement.d.ts +39 -0
- package/types/View.d.ts +1 -1
- package/types/VoipRoom.d.ts +71 -0
- package/types/common.d.ts +3 -8
- package/types/index.d.ts +72 -46
- package/virtual-list/react/createListComponent.js +4 -3
- package/dist/taro-components/p-0fb7f599.entry.js +0 -1
- package/dist/taro-components/p-139d4d14.entry.js +0 -1
- package/dist/taro-components/p-4ff67760.entry.js +0 -1
- package/dist/taro-components/p-5d84eaf0.entry.js +0 -1
- package/dist/taro-components/p-69be8189.system.entry.js +0 -1
- package/dist/taro-components/p-b685a487.system.entry.js +0 -1
- package/dist/taro-components/p-be2d1c4a.system.entry.js +0 -1
- package/dist/taro-components/p-d52009d1.system.entry.js +0 -1
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index$1 = require('./index-7464647f.js');
|
|
6
|
+
const Taro = require('@tarojs/taro');
|
|
6
7
|
const index = require('./index-cde74e58.js');
|
|
7
8
|
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
const Taro__default = /*#__PURE__*/_interopDefaultLegacy(Taro);
|
|
12
|
+
|
|
8
13
|
function isAbsolute(pathname) {
|
|
9
14
|
return pathname.charAt(0) === '/';
|
|
10
15
|
}
|
|
@@ -87,22 +92,18 @@ const splitUrl = _url => {
|
|
|
87
92
|
query: null,
|
|
88
93
|
fragment: null
|
|
89
94
|
};
|
|
90
|
-
|
|
91
95
|
pos = url.indexOf('#');
|
|
92
96
|
if (pos > -1) {
|
|
93
97
|
res.fragment = url.substring(pos + 1);
|
|
94
98
|
url = url.substring(0, pos);
|
|
95
99
|
}
|
|
96
|
-
|
|
97
100
|
pos = url.indexOf('?');
|
|
98
101
|
if (pos > -1) {
|
|
99
102
|
res.query = url.substring(pos + 1);
|
|
100
103
|
url = url.substring(0, pos);
|
|
101
104
|
}
|
|
102
|
-
|
|
103
105
|
res.path = url;
|
|
104
|
-
|
|
105
|
-
return res
|
|
106
|
+
return res;
|
|
106
107
|
};
|
|
107
108
|
|
|
108
109
|
const TabbarItem = ({ index: index$2, isSelected = false, textColor, iconPath, badgeText, showRedDot = false, text, onSelect }) => {
|
|
@@ -132,8 +133,6 @@ const TabbarItem = ({ index: index$2, isSelected = false, textColor, iconPath, b
|
|
|
132
133
|
|
|
133
134
|
const indexCss = "html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.taro-tabbar__panel{-ms-flex:1;flex:1;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}.taro-tabbar__tabbar{position:relative;height:50px;width:100%;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";
|
|
134
135
|
|
|
135
|
-
// IGNORE: 由于 @tarojs/taro 与 @tarojs/components 中存在循环依赖,暂时使用 commonjs 引用
|
|
136
|
-
const Taro = require('@tarojs/taro');
|
|
137
136
|
// const removeLeadingSlash = str => str.replace(/^\.?\//, '')
|
|
138
137
|
// const removeTrailingSearch = str => str.replace(/\?[\s\S]*$/, '')
|
|
139
138
|
const addLeadingSlash = str => str[0] === '/' ? str : `/${str}`;
|
|
@@ -175,7 +174,7 @@ let Tabbar = class {
|
|
|
175
174
|
};
|
|
176
175
|
this.switchTab = (index) => {
|
|
177
176
|
this.selectedIndex = index;
|
|
178
|
-
|
|
177
|
+
Taro__default['default'].switchTab({
|
|
179
178
|
url: this.list[index].pagePath
|
|
180
179
|
});
|
|
181
180
|
};
|
|
@@ -326,8 +325,15 @@ let Tabbar = class {
|
|
|
326
325
|
throw new Error('tabBar 配置错误');
|
|
327
326
|
}
|
|
328
327
|
this.homePage = addLeadingSlash(this.conf.homePage);
|
|
329
|
-
for (
|
|
330
|
-
|
|
328
|
+
for (let key in customRoutes) {
|
|
329
|
+
const path = customRoutes[key];
|
|
330
|
+
key = addLeadingSlash(key);
|
|
331
|
+
if (typeof path === 'string') {
|
|
332
|
+
this.customRoutes.push([key, addLeadingSlash(path)]);
|
|
333
|
+
}
|
|
334
|
+
else if ((path === null || path === void 0 ? void 0 : path.length) > 0) {
|
|
335
|
+
this.customRoutes.push(...path.map(p => [key, addLeadingSlash(p)]));
|
|
336
|
+
}
|
|
331
337
|
}
|
|
332
338
|
list.forEach(item => {
|
|
333
339
|
if (item.pagePath.indexOf('/') !== 0) {
|
|
@@ -336,6 +342,9 @@ let Tabbar = class {
|
|
|
336
342
|
});
|
|
337
343
|
this.list = list;
|
|
338
344
|
this.borderStyle = this.conf.borderStyle;
|
|
345
|
+
this.backgroundColor = this.conf.backgroundColor;
|
|
346
|
+
this.color = this.conf.color;
|
|
347
|
+
this.selectedColor = this.conf.selectedColor;
|
|
339
348
|
}
|
|
340
349
|
getCurrentUrl() {
|
|
341
350
|
const routerMode = this.conf.mode;
|
|
@@ -355,28 +364,28 @@ let Tabbar = class {
|
|
|
355
364
|
return processedUrl === '/' ? this.homePage : processedUrl;
|
|
356
365
|
}
|
|
357
366
|
bindEvent() {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
367
|
+
Taro__default['default'].eventCenter.on('__taroRouterChange', this.routerChangeHandler);
|
|
368
|
+
Taro__default['default'].eventCenter.on('__taroSwitchTab', this.switchTabHandler);
|
|
369
|
+
Taro__default['default'].eventCenter.on('__taroSetTabBarBadge', this.setTabBarBadgeHandler);
|
|
370
|
+
Taro__default['default'].eventCenter.on('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler);
|
|
371
|
+
Taro__default['default'].eventCenter.on('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler);
|
|
372
|
+
Taro__default['default'].eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
|
|
373
|
+
Taro__default['default'].eventCenter.on('__taroShowTabBar', this.showTabBarHandler);
|
|
374
|
+
Taro__default['default'].eventCenter.on('__taroHideTabBar', this.hideTabBarHandler);
|
|
375
|
+
Taro__default['default'].eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler);
|
|
376
|
+
Taro__default['default'].eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler);
|
|
368
377
|
}
|
|
369
378
|
removeEvent() {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
379
|
+
Taro__default['default'].eventCenter.off('__taroRouterChange', this.routerChangeHandler);
|
|
380
|
+
Taro__default['default'].eventCenter.off('__taroSwitchTab', this.switchTabHandler);
|
|
381
|
+
Taro__default['default'].eventCenter.off('__taroSetTabBarBadge', this.setTabBarBadgeHandler);
|
|
382
|
+
Taro__default['default'].eventCenter.off('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler);
|
|
383
|
+
Taro__default['default'].eventCenter.off('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler);
|
|
384
|
+
Taro__default['default'].eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
|
|
385
|
+
Taro__default['default'].eventCenter.off('__taroShowTabBar', this.showTabBarHandler);
|
|
386
|
+
Taro__default['default'].eventCenter.off('__taroHideTabBar', this.hideTabBarHandler);
|
|
387
|
+
Taro__default['default'].eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler);
|
|
388
|
+
Taro__default['default'].eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler);
|
|
380
389
|
}
|
|
381
390
|
componentDidLoad() {
|
|
382
391
|
this.tabbarPos = this.tabbar.nextElementSibling ? 'top' : 'bottom';
|
|
@@ -404,14 +413,13 @@ let Tabbar = class {
|
|
|
404
413
|
let textColor;
|
|
405
414
|
let iconPath;
|
|
406
415
|
if (isSelected) {
|
|
407
|
-
textColor = this.selectedColor;
|
|
416
|
+
textColor = this.selectedColor || '';
|
|
408
417
|
iconPath = item.selectedIconPath;
|
|
409
418
|
}
|
|
410
419
|
else {
|
|
411
420
|
textColor = this.color || '';
|
|
412
421
|
iconPath = item.iconPath;
|
|
413
422
|
}
|
|
414
|
-
console.log('TabbarItem', item);
|
|
415
423
|
return (index$1.h(TabbarItem, { index: index, onSelect: this.switchTab.bind(this), isSelected: isSelected, textColor: textColor, iconPath: iconPath, text: item.text, badgeText: item.badgeText, showRedDot: item.showRedDot }));
|
|
416
424
|
}))));
|
|
417
425
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-7464647f.js');
|
|
6
|
+
|
|
7
|
+
let VoipRoom = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
componentDidLoad() {
|
|
12
|
+
console.error('H5 暂不支持 VoipRoom 组件!');
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (index.h(index.Host, null));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.taro_voip_room_core = VoipRoom;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
+
"./components/ad/ad.js",
|
|
4
|
+
"./components/ad-custom/ad-custom.js",
|
|
3
5
|
"./components/audio/audio.js",
|
|
4
6
|
"./components/block/block.js",
|
|
5
7
|
"./components/button/button.js",
|
|
@@ -10,26 +12,39 @@
|
|
|
10
12
|
"./components/cover-image/cover-image.js",
|
|
11
13
|
"./components/cover-view/cover-view.js",
|
|
12
14
|
"./components/custom-wrapper/custom-wrapper.js",
|
|
15
|
+
"./components/editor/editor.js",
|
|
13
16
|
"./components/form/form.js",
|
|
17
|
+
"./components/functional-page-navigator/functional-page-navigator.js",
|
|
14
18
|
"./components/icon/icon.js",
|
|
15
19
|
"./components/image/image.js",
|
|
16
20
|
"./components/input/input.js",
|
|
21
|
+
"./components/keyboard-accessory/keyboard-accessory.js",
|
|
17
22
|
"./components/label/label.js",
|
|
18
|
-
"./components/
|
|
19
|
-
"./components/
|
|
23
|
+
"./components/live-player/live-player.js",
|
|
24
|
+
"./components/live-pusher/live-pusher.js",
|
|
25
|
+
"./components/map/map.js",
|
|
26
|
+
"./components/match-media/match-media.js",
|
|
27
|
+
"./components/movable-area/movable-area.js",
|
|
28
|
+
"./components/movable-area/movable-view.js",
|
|
29
|
+
"./components/navigation-bar/navigation-bar.js",
|
|
20
30
|
"./components/navigator/navigator.js",
|
|
31
|
+
"./components/official-account/official-account.js",
|
|
21
32
|
"./components/open-data/open-data.js",
|
|
33
|
+
"./components/page-container/page-container.js",
|
|
34
|
+
"./components/page-meta/page-meta.js",
|
|
22
35
|
"./components/picker/picker-group.js",
|
|
23
36
|
"./components/picker/picker.js",
|
|
37
|
+
"./components/picker-view/picker-view-column.js",
|
|
24
38
|
"./components/picker-view/picker-view.js",
|
|
25
|
-
"./components/picker-view-column/picker-view-column.js",
|
|
26
39
|
"./components/progress/progress.js",
|
|
27
|
-
"./components/pull-
|
|
40
|
+
"./components/pull-to-refresh/pull-to-refresh.js",
|
|
28
41
|
"./components/radio/radio-group.js",
|
|
29
42
|
"./components/radio/radio.js",
|
|
30
43
|
"./components/rich-text/rich-text.js",
|
|
31
44
|
"./components/scroll-view/scroll-view.js",
|
|
45
|
+
"./components/share-element/share-element.js",
|
|
32
46
|
"./components/slider/slider.js",
|
|
47
|
+
"./components/slot/slot.js",
|
|
33
48
|
"./components/swiper/swiper-item.js",
|
|
34
49
|
"./components/swiper/swiper.js",
|
|
35
50
|
"./components/switch/switch.js",
|
|
@@ -40,6 +55,7 @@
|
|
|
40
55
|
"./components/video/video-danmu.js",
|
|
41
56
|
"./components/video/video.js",
|
|
42
57
|
"./components/view/view.js",
|
|
58
|
+
"./components/voip-room/voip-room.js",
|
|
43
59
|
"./components/web-view/web-view.js"
|
|
44
60
|
],
|
|
45
61
|
"compiler": {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class Ad {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 Ad 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-ad-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class AdCustom {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 AdCustom 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-ad-custom-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class Editor {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 Editor 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-editor-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class FunctionalPageNavigator {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 FunctionalPageNavigator 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-functional-page-navigator-core"; }
|
|
11
|
+
}
|
|
@@ -34,7 +34,7 @@ export class Image {
|
|
|
34
34
|
this.onError.emit();
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
const { src, mode, lazyLoad, aspectFillMode, imageOnLoad, imageOnError, nativeProps } = this;
|
|
37
|
+
const { src, mode = 'scaleToFill', lazyLoad = false, aspectFillMode = 'width', imageOnLoad, imageOnError, nativeProps } = this;
|
|
38
38
|
const cls = classNames({
|
|
39
39
|
'taro-img__widthfix': mode === 'widthFix'
|
|
40
40
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class KeyboardAccessory {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 KeyboardAccessory 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-keyboard-accessory-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class LivePlayer {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 LivePlayer 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-live-player-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class LivePusher {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 LivePusher 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-live-pusher-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class Map {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 Map 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-map-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class MatchMedia {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 MatchMedia 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-match-media-core"; }
|
|
11
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class NavigationBar {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 NavigationBar 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-navigation-bar-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class OfficialAccount {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 OfficialAccount 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-official-account-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class PageContainer {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 PageContainer 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-page-container-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class PageMeta {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 PageMeta 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-page-meta-core"; }
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, Prop, h, Host, State, Event, Watch, Element } from '@stencil/core';
|
|
2
|
+
import Taro from '@tarojs/taro';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
|
-
const Taro = require('@tarojs/taro');
|
|
4
4
|
function setTransform(nodeStyle, value) {
|
|
5
5
|
nodeStyle.transform = value;
|
|
6
6
|
nodeStyle.webkitTransform = value;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class ShareElement {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 ShareElement 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-share-element-core"; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class Slot {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 Slot 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-slot-core"; }
|
|
11
|
+
}
|
|
@@ -86,6 +86,11 @@ export class Swiper {
|
|
|
86
86
|
this.swiper.loopCreate();
|
|
87
87
|
}
|
|
88
88
|
}, 500);
|
|
89
|
+
this.handleSwiperSize = debounce(() => {
|
|
90
|
+
if (this.swiper && !this.circular) {
|
|
91
|
+
this.swiper.updateSlides();
|
|
92
|
+
}
|
|
93
|
+
}, 50);
|
|
89
94
|
}
|
|
90
95
|
watchCurrent(newVal) {
|
|
91
96
|
if (!this.isWillLoadCalled)
|
|
@@ -149,6 +154,8 @@ export class Swiper {
|
|
|
149
154
|
this.el.removeChild = (oldChild) => {
|
|
150
155
|
return newVal.removeChild(oldChild);
|
|
151
156
|
};
|
|
157
|
+
this.el.addEventListener('DOMNodeInserted', this.handleSwiperSize);
|
|
158
|
+
this.el.addEventListener('DOMNodeRemoved', this.handleSwiperSize);
|
|
152
159
|
}
|
|
153
160
|
watchCircular() {
|
|
154
161
|
if (this.swiper) {
|
|
@@ -182,6 +189,8 @@ export class Swiper {
|
|
|
182
189
|
}
|
|
183
190
|
disconnectedCallback() {
|
|
184
191
|
var _a, _b, _c, _d, _e, _f;
|
|
192
|
+
this.el.removeEventListener('DOMNodeInserted', this.handleSwiperSize);
|
|
193
|
+
this.el.removeEventListener('DOMNodeRemoved', this.handleSwiperSize);
|
|
185
194
|
(_b = (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
186
195
|
(_d = (_c = this.observerFirst) === null || _c === void 0 ? void 0 : _c.disconnect) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
187
196
|
(_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
@@ -225,7 +234,7 @@ export class Swiper {
|
|
|
225
234
|
observerUpdate(_swiper, e) {
|
|
226
235
|
const target = e.target;
|
|
227
236
|
const className = target && typeof target.className === 'string' ? target.className : '';
|
|
228
|
-
if (className.includes('taro_page') && target.style.display
|
|
237
|
+
if (className.includes('taro_page') && target.style.display !== 'none') {
|
|
229
238
|
if (that.autoplay && target.contains(_swiper.$el[0])) {
|
|
230
239
|
_swiper.slideTo(that.current);
|
|
231
240
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Component, Prop, h, Host, State, Event, Element } from '@stencil/core';
|
|
2
|
+
import Taro from '@tarojs/taro';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import resolvePathname from 'resolve-pathname';
|
|
4
5
|
import { splitUrl } from '../../utils';
|
|
5
6
|
import { TabbarItem } from './tabbar-item';
|
|
6
|
-
// IGNORE: 由于 @tarojs/taro 与 @tarojs/components 中存在循环依赖,暂时使用 commonjs 引用
|
|
7
|
-
const Taro = require('@tarojs/taro');
|
|
8
7
|
// const removeLeadingSlash = str => str.replace(/^\.?\//, '')
|
|
9
8
|
// const removeTrailingSearch = str => str.replace(/\?[\s\S]*$/, '')
|
|
10
9
|
const addLeadingSlash = str => str[0] === '/' ? str : `/${str}`;
|
|
@@ -195,8 +194,15 @@ export class Tabbar {
|
|
|
195
194
|
throw new Error('tabBar 配置错误');
|
|
196
195
|
}
|
|
197
196
|
this.homePage = addLeadingSlash(this.conf.homePage);
|
|
198
|
-
for (
|
|
199
|
-
|
|
197
|
+
for (let key in customRoutes) {
|
|
198
|
+
const path = customRoutes[key];
|
|
199
|
+
key = addLeadingSlash(key);
|
|
200
|
+
if (typeof path === 'string') {
|
|
201
|
+
this.customRoutes.push([key, addLeadingSlash(path)]);
|
|
202
|
+
}
|
|
203
|
+
else if ((path === null || path === void 0 ? void 0 : path.length) > 0) {
|
|
204
|
+
this.customRoutes.push(...path.map(p => [key, addLeadingSlash(p)]));
|
|
205
|
+
}
|
|
200
206
|
}
|
|
201
207
|
list.forEach(item => {
|
|
202
208
|
if (item.pagePath.indexOf('/') !== 0) {
|
|
@@ -205,6 +211,9 @@ export class Tabbar {
|
|
|
205
211
|
});
|
|
206
212
|
this.list = list;
|
|
207
213
|
this.borderStyle = this.conf.borderStyle;
|
|
214
|
+
this.backgroundColor = this.conf.backgroundColor;
|
|
215
|
+
this.color = this.conf.color;
|
|
216
|
+
this.selectedColor = this.conf.selectedColor;
|
|
208
217
|
}
|
|
209
218
|
getCurrentUrl() {
|
|
210
219
|
const routerMode = this.conf.mode;
|
|
@@ -274,14 +283,13 @@ export class Tabbar {
|
|
|
274
283
|
let textColor;
|
|
275
284
|
let iconPath;
|
|
276
285
|
if (isSelected) {
|
|
277
|
-
textColor = this.selectedColor;
|
|
286
|
+
textColor = this.selectedColor || '';
|
|
278
287
|
iconPath = item.selectedIconPath;
|
|
279
288
|
}
|
|
280
289
|
else {
|
|
281
290
|
textColor = this.color || '';
|
|
282
291
|
iconPath = item.iconPath;
|
|
283
292
|
}
|
|
284
|
-
console.log('TabbarItem', item);
|
|
285
293
|
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 }));
|
|
286
294
|
}))));
|
|
287
295
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Component, h, Host } from '@stencil/core';
|
|
3
|
+
export class VoipRoom {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
console.error('H5 暂不支持 VoipRoom 组件!');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-voip-room-core"; }
|
|
11
|
+
}
|