@tarojs/runtime 4.0.0-beta.13 → 4.0.0-beta.131
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/LICENSE +8 -8
- package/dist/bom/URL.js.map +1 -1
- package/dist/bom/URLSearchParams.js.map +1 -1
- package/dist/bom/history.js.map +1 -1
- package/dist/bom/location.js.map +1 -1
- package/dist/bom/raf.d.ts +1 -0
- package/dist/bom/raf.js.map +1 -1
- package/dist/bom/window.d.ts +1 -0
- package/dist/bom/window.js.map +1 -1
- package/dist/dom/anchor-element.js.map +1 -1
- package/dist/dom/class-list.js.map +1 -1
- package/dist/dom/document.js.map +1 -1
- package/dist/dom/element.js.map +1 -1
- package/dist/dom/event-target.js.map +1 -1
- package/dist/dom/event.js.map +1 -1
- package/dist/dom/form.js +1 -1
- package/dist/dom/form.js.map +1 -1
- package/dist/dom/node.js +2 -2
- package/dist/dom/node.js.map +1 -1
- package/dist/dom/root.js.map +1 -1
- package/dist/dom/style.js.map +1 -1
- package/dist/dom/style_properties.js.map +1 -1
- package/dist/dom/tree.js.map +1 -1
- package/dist/dom-external/element.js.map +1 -1
- package/dist/dom-external/index.js +2 -3
- package/dist/dom-external/index.js.map +1 -1
- package/dist/dom-external/inner-html/html.js.map +1 -1
- package/dist/dom-external/inner-html/parser.js.map +1 -1
- package/dist/dom-external/inner-html/scaner.js.map +1 -1
- package/dist/dom-external/inner-html/style.js.map +1 -1
- package/dist/dom-external/inner-html/tags.js +4 -4
- package/dist/dom-external/inner-html/tags.js.map +1 -1
- package/dist/dom-external/inner-html/utils.js.map +1 -1
- package/dist/dom-external/mutation-observer/implements.js.map +1 -1
- package/dist/dom-external/mutation-observer/index.js.map +1 -1
- package/dist/dom-external/node.js +1 -0
- package/dist/dom-external/node.js.map +1 -1
- package/dist/dsl/common.d.ts +1 -0
- package/dist/dsl/common.js +6 -1
- package/dist/dsl/common.js.map +1 -1
- package/dist/hydrate.js +9 -2
- package/dist/hydrate.js.map +1 -1
- package/dist/index.cjs.d.ts +16 -14
- package/dist/index.cjs.js +57 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/instance-4c64b022.d.ts +6 -14
- package/dist/next-tick.js.map +1 -1
- package/dist/perf.d.ts +3 -1
- package/dist/perf.js +24 -3
- package/dist/perf.js.map +1 -1
- package/dist/polyfill/array.js.map +1 -1
- package/dist/polyfill/index.js.map +1 -1
- package/dist/polyfill/intersection-observer.js +4 -3
- package/dist/polyfill/intersection-observer.js.map +1 -1
- package/dist/polyfill/object.js.map +1 -1
- package/dist/runtime.esm.d.ts +16 -14
- package/dist/runtime.esm.js +55 -18
- package/dist/runtime.esm.js.map +1 -1
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lodash.d.ts +2 -1
- package/dist/utils/lodash.js +11 -1
- package/dist/utils/lodash.js.map +1 -1
- package/package.json +15 -23
package/dist/index.cjs.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
import { Shortcuts, Events } from "@tarojs/shared";
|
|
2
|
-
import VueCtor from "vue";
|
|
3
|
-
import { ComponentOptions, VNode } from "vue";
|
|
4
4
|
import { Component as Vue3Component } from "@vue/runtime-core";
|
|
5
5
|
import { Component, ComponentClass } from "react";
|
|
6
|
-
import { CombinedVueInstance } from "vue/types/vue";
|
|
7
6
|
declare class ClassList {
|
|
8
7
|
private el;
|
|
9
8
|
private tokenList;
|
|
@@ -649,14 +648,6 @@ interface Instance<T = Record<string, any>> extends Component<T>, Show, PageInst
|
|
|
649
648
|
$nextTick?(cb: () => void): void;
|
|
650
649
|
$options: Instance;
|
|
651
650
|
}
|
|
652
|
-
interface VueAppInstance extends ComponentOptions<VueCtor> {
|
|
653
|
-
$options: AppInstance;
|
|
654
|
-
}
|
|
655
|
-
type VueInstance<M = Record<string, any>, P = Record<string, any>> = CombinedVueInstance<VueCtor, Record<string, any>, M, P, Record<never, any>> & VueInternal;
|
|
656
|
-
interface VueInternal {
|
|
657
|
-
_render(): VNode;
|
|
658
|
-
_update(vnode: VNode, hyrate: boolean): void;
|
|
659
|
-
}
|
|
660
651
|
interface PageProps {
|
|
661
652
|
tid?: string;
|
|
662
653
|
}
|
|
@@ -706,6 +697,8 @@ interface PageInstance extends PageLifeCycle {
|
|
|
706
697
|
options?: Record<string, unknown>;
|
|
707
698
|
/** 页面渲染引擎类型 */
|
|
708
699
|
renderer?: "webview" | "skyline";
|
|
700
|
+
/** 获得一个 EventChannel 对象,用于页面间通讯 */
|
|
701
|
+
getOpenerEventChannel?(): Record<string, any>;
|
|
709
702
|
}
|
|
710
703
|
interface Show {
|
|
711
704
|
componentDidShow?(): void;
|
|
@@ -715,8 +708,8 @@ interface Show {
|
|
|
715
708
|
}
|
|
716
709
|
interface AppInstance extends Show {
|
|
717
710
|
componentDidShow?(options?: Record<string, unknown>): void;
|
|
718
|
-
mount?(component: React.ComponentClass |
|
|
719
|
-
mount?(component: React.ComponentClass |
|
|
711
|
+
mount?(component: React.ComponentClass | Vue3Component, id: string, cb: (...args: any[]) => void): void;
|
|
712
|
+
mount?(component: React.ComponentClass | Vue3Component, id: string, getCtx: (...args: any[]) => void, cb: (...args: any[]) => void): void;
|
|
720
713
|
onError?(error: string): void;
|
|
721
714
|
onLaunch?(options?: Record<string, unknown>): void;
|
|
722
715
|
onPageNotFound?(res: any): void;
|
|
@@ -770,6 +763,14 @@ declare function createRecursiveComponentConfig(componentName?: string): any;
|
|
|
770
763
|
declare function hydrate(node: TaroElement | TaroText): MiniData;
|
|
771
764
|
declare const nextTick: (cb: TFunc, ctx?: Record<string, any>) => void;
|
|
772
765
|
declare const options: Options;
|
|
766
|
+
declare class Performance {
|
|
767
|
+
#private;
|
|
768
|
+
private recorder;
|
|
769
|
+
start(id: string): void;
|
|
770
|
+
stop(id: string, now?: number): void;
|
|
771
|
+
delayStop(id: string, delay?: number): ((...args: any[]) => void) | undefined;
|
|
772
|
+
}
|
|
773
|
+
declare const perf: Performance;
|
|
773
774
|
declare const incrementId: () => () => string;
|
|
774
775
|
declare function isElement(node: TaroNode): node is TaroElement;
|
|
775
776
|
declare function isText(node: TaroNode): node is TaroText;
|
|
@@ -790,6 +791,7 @@ declare function extend(ctor: Ctor, methodName: string, options: TFunc | Record<
|
|
|
790
791
|
declare function getComponentsAlias(): any;
|
|
791
792
|
declare function convertNumber2PX(value: number): string;
|
|
792
793
|
declare function throttle(fn: any, threshold?: number, scope?: any): (...args: any[]) => void;
|
|
794
|
+
declare function debounce(fn: any, ms?: number, scope?: any): (...args: any[]) => void;
|
|
793
795
|
// export const removeLeadingSlash = (str = '') => str.replace(/^\.?\//, '')
|
|
794
796
|
// export const removeTrailingSearch = (str = '') => str.replace(/\?[\s\S]*$/, '')
|
|
795
797
|
declare const addLeadingSlash: (url?: string) => string;
|
|
@@ -801,4 +803,4 @@ declare const getHomePage: (path?: string, basename?: string, customRoutes?: Rec
|
|
|
801
803
|
declare const getCurrentPage: (routerMode?: string, basename?: string) => string;
|
|
802
804
|
declare function handlePolyfill(): void;
|
|
803
805
|
export { hooks } from '@tarojs/shared';
|
|
804
|
-
export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT, COMPILE_MODE, CATCHMOVE, CATCH_VIEW, COMMENT, ON_LOAD, ON_READY, ON_SHOW, ON_HIDE, OPTIONS, EXTERNAL_CLASSES, EVENT_CALLBACK_RESULT, BEHAVIORS, A, CONTEXT_ACTIONS, Current, getCurrentInstance, eventSource, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, incrementId, isElement, isText, isComment, isHasExtractProp, isParentBinded, shortcutAttr, customWrapperCache, extend, getComponentsAlias, convertNumber2PX, throttle, addLeadingSlash, hasBasename, stripBasename, stripTrailing, stripSuffix, getHomePage, getCurrentPage, Instance,
|
|
806
|
+
export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT, COMPILE_MODE, CATCHMOVE, CATCH_VIEW, COMMENT, ON_LOAD, ON_READY, ON_SHOW, ON_HIDE, OPTIONS, EXTERNAL_CLASSES, EVENT_CALLBACK_RESULT, BEHAVIORS, A, CONTEXT_ACTIONS, Current, getCurrentInstance, eventSource, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, perf, incrementId, isElement, isText, isComment, isHasExtractProp, isParentBinded, shortcutAttr, customWrapperCache, extend, getComponentsAlias, convertNumber2PX, throttle, debounce, addLeadingSlash, hasBasename, stripBasename, stripTrailing, stripSuffix, getHomePage, getCurrentPage, Instance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniTextData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options$1 as Options, TFunc, PageConfig, handlePolyfill };
|
package/dist/index.cjs.js
CHANGED
|
@@ -219,6 +219,16 @@ function throttle(fn, threshold = 250, scope) {
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
+
function debounce(fn, ms = 250, scope) {
|
|
223
|
+
let timer;
|
|
224
|
+
return function (...args) {
|
|
225
|
+
const context = scope || this;
|
|
226
|
+
clearTimeout(timer);
|
|
227
|
+
timer = setTimeout(function () {
|
|
228
|
+
fn.apply(context, args);
|
|
229
|
+
}, ms);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
222
232
|
|
|
223
233
|
const eventCenter = shared.hooks.call('getEventCenter', shared.Events);
|
|
224
234
|
|
|
@@ -1299,6 +1309,7 @@ function hydrate(node) {
|
|
|
1299
1309
|
// 初始化 SPECIAL_NODES
|
|
1300
1310
|
SPECIAL_NODES || (SPECIAL_NODES = shared.hooks.call('getSpecialNodes'));
|
|
1301
1311
|
const nodeName = node.nodeName;
|
|
1312
|
+
let compileModeName = null;
|
|
1302
1313
|
if (isText(node)) {
|
|
1303
1314
|
return {
|
|
1304
1315
|
sid: node.sid,
|
|
@@ -1330,11 +1341,14 @@ function hydrate(node) {
|
|
|
1330
1341
|
propInCamelCase !== COMPILE_MODE) {
|
|
1331
1342
|
data[propInCamelCase] = props[prop];
|
|
1332
1343
|
}
|
|
1333
|
-
if (
|
|
1344
|
+
if (process.env.TARO_ENV !== 'swan' &&
|
|
1345
|
+
nodeName === VIEW &&
|
|
1346
|
+
propInCamelCase === CATCHMOVE &&
|
|
1347
|
+
props[prop] !== false) {
|
|
1334
1348
|
data["nn" /* Shortcuts.NodeName */] = CATCH_VIEW;
|
|
1335
1349
|
}
|
|
1336
1350
|
if (propInCamelCase === COMPILE_MODE) {
|
|
1337
|
-
|
|
1351
|
+
compileModeName = props[prop];
|
|
1338
1352
|
}
|
|
1339
1353
|
}
|
|
1340
1354
|
// Children
|
|
@@ -1358,6 +1372,9 @@ function hydrate(node) {
|
|
|
1358
1372
|
}
|
|
1359
1373
|
}
|
|
1360
1374
|
}
|
|
1375
|
+
if (compileModeName !== null) {
|
|
1376
|
+
data["nn" /* Shortcuts.NodeName */] = compileModeName;
|
|
1377
|
+
}
|
|
1361
1378
|
const resData = shared.hooks.call('transferHydrateData', data, node, componentAlias);
|
|
1362
1379
|
return resData || data;
|
|
1363
1380
|
}
|
|
@@ -1629,7 +1646,7 @@ class TaroNode extends TaroEventTarget {
|
|
|
1629
1646
|
: [],
|
|
1630
1647
|
nextSibling: isReplace
|
|
1631
1648
|
? refChild.nextSibling /** replaceChild */
|
|
1632
|
-
: (refChild || null),
|
|
1649
|
+
: (refChild || null), /** insertBefore & appendChild */
|
|
1633
1650
|
previousSibling: newChild.previousSibling
|
|
1634
1651
|
});
|
|
1635
1652
|
return newChild;
|
|
@@ -2953,7 +2970,7 @@ function makeMap(str, expectsLowerCase) {
|
|
|
2953
2970
|
for (let i = 0; i < list.length; i++) {
|
|
2954
2971
|
map[list[i]] = true;
|
|
2955
2972
|
}
|
|
2956
|
-
return
|
|
2973
|
+
return val => !!map[val.toLowerCase()] ;
|
|
2957
2974
|
}
|
|
2958
2975
|
const specialMiniElements = {
|
|
2959
2976
|
img: 'image',
|
|
@@ -2963,11 +2980,11 @@ const internalCompsList = Object.keys(shared.internalComponents)
|
|
|
2963
2980
|
.map(i => i.toLowerCase())
|
|
2964
2981
|
.join(',');
|
|
2965
2982
|
// https://developers.weixin.qq.com/miniprogram/dev/component
|
|
2966
|
-
const isMiniElements = makeMap(internalCompsList
|
|
2983
|
+
const isMiniElements = makeMap(internalCompsList);
|
|
2967
2984
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
|
|
2968
|
-
const isInlineElements = makeMap('a,i,abbr,iframe,select,acronym,slot,small,span,bdi,kbd,strong,big,map,sub,sup,br,mark,mark,meter,template,canvas,textarea,cite,object,time,code,output,u,data,picture,tt,datalist,var,dfn,del,q,em,s,embed,samp,b'
|
|
2985
|
+
const isInlineElements = makeMap('a,i,abbr,iframe,select,acronym,slot,small,span,bdi,kbd,strong,big,map,sub,sup,br,mark,mark,meter,template,canvas,textarea,cite,object,time,code,output,u,data,picture,tt,datalist,var,dfn,del,q,em,s,embed,samp,b');
|
|
2969
2986
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
|
2970
|
-
const isBlockElements = makeMap('address,fieldset,li,article,figcaption,main,aside,figure,nav,blockquote,footer,ol,details,form,p,dialog,h1,h2,h3,h4,h5,h6,pre,dd,header,section,div,hgroup,table,dl,hr,ul,dt'
|
|
2987
|
+
const isBlockElements = makeMap('address,fieldset,li,article,figcaption,main,aside,figure,nav,blockquote,footer,ol,details,form,p,dialog,h1,h2,h3,h4,h5,h6,pre,dd,header,section,div,hgroup,table,dl,hr,ul,dt');
|
|
2971
2988
|
|
|
2972
2989
|
const closingTagAncestorBreakers = {
|
|
2973
2990
|
li: ['ul', 'ol', 'menu'],
|
|
@@ -3264,6 +3281,7 @@ function cloneNode(isDeep = false) {
|
|
|
3264
3281
|
}
|
|
3265
3282
|
for (const key in this) {
|
|
3266
3283
|
const value = this[key];
|
|
3284
|
+
// eslint-disable-next-line valid-typeof
|
|
3267
3285
|
if ([PROPS, DATASET].includes(key) && typeof value === OBJECT) {
|
|
3268
3286
|
newNode[key] = Object.assign({}, value);
|
|
3269
3287
|
}
|
|
@@ -3292,9 +3310,7 @@ function contains(node) {
|
|
|
3292
3310
|
return isContains;
|
|
3293
3311
|
}
|
|
3294
3312
|
|
|
3295
|
-
|
|
3296
|
-
const isHarmony = process.env.TARO_PLATFORM === 'harmony' || process.env.TARO_ENV === 'harmony';
|
|
3297
|
-
if (!isWeb && !isHarmony) {
|
|
3313
|
+
if (process.env.TARO_PLATFORM !== shared.PLATFORM_TYPE.WEB && process.env.TARO_PLATFORM !== shared.PLATFORM_TYPE.HARMONY) {
|
|
3298
3314
|
if (ENABLE_INNER_HTML) {
|
|
3299
3315
|
TaroNode.extend('innerHTML', {
|
|
3300
3316
|
set(html) {
|
|
@@ -3495,7 +3511,7 @@ class FormElement extends TaroElement {
|
|
|
3495
3511
|
else if (event.type === INPUT) {
|
|
3496
3512
|
// Web 规范中表单组件的 value 应该跟着输入改变
|
|
3497
3513
|
// 只是改 this.props.value 的话不会进行 setData,因此这里修改 this.value。
|
|
3498
|
-
// 只测试了 React、
|
|
3514
|
+
// 只测试了 React、Vue3 input 组件的 onInput 事件,onChange 事件不确定有没有副作用,所以暂不修改。
|
|
3499
3515
|
this.value = val;
|
|
3500
3516
|
}
|
|
3501
3517
|
}
|
|
@@ -3503,8 +3519,10 @@ class FormElement extends TaroElement {
|
|
|
3503
3519
|
}
|
|
3504
3520
|
}
|
|
3505
3521
|
|
|
3522
|
+
var _Performance_instances, _Performance_parseTime;
|
|
3506
3523
|
class Performance {
|
|
3507
3524
|
constructor() {
|
|
3525
|
+
_Performance_instances.add(this);
|
|
3508
3526
|
this.recorder = new Map();
|
|
3509
3527
|
}
|
|
3510
3528
|
start(id) {
|
|
@@ -3513,18 +3531,32 @@ class Performance {
|
|
|
3513
3531
|
}
|
|
3514
3532
|
this.recorder.set(id, Date.now());
|
|
3515
3533
|
}
|
|
3516
|
-
stop(id) {
|
|
3534
|
+
stop(id, now = Date.now()) {
|
|
3517
3535
|
if (!options.debug) {
|
|
3518
3536
|
return;
|
|
3519
3537
|
}
|
|
3520
|
-
const now = Date.now();
|
|
3521
3538
|
const prev = this.recorder.get(id);
|
|
3539
|
+
if (!(prev >= 0))
|
|
3540
|
+
return;
|
|
3522
3541
|
this.recorder.delete(id);
|
|
3523
3542
|
const time = now - prev;
|
|
3524
3543
|
// eslint-disable-next-line no-console
|
|
3525
|
-
console.log(`${id} 时长: ${time}ms`);
|
|
3544
|
+
console.log(`${id} 时长: ${time}ms 开始时间:${tslib.__classPrivateFieldGet(this, _Performance_instances, "m", _Performance_parseTime).call(this, prev)} 结束时间:${tslib.__classPrivateFieldGet(this, _Performance_instances, "m", _Performance_parseTime).call(this, now)}`);
|
|
3545
|
+
}
|
|
3546
|
+
delayStop(id, delay = 500) {
|
|
3547
|
+
if (!options.debug) {
|
|
3548
|
+
return;
|
|
3549
|
+
}
|
|
3550
|
+
return debounce((now = Date.now(), cb) => {
|
|
3551
|
+
this.stop(id, now);
|
|
3552
|
+
cb === null || cb === void 0 ? void 0 : cb();
|
|
3553
|
+
}, delay);
|
|
3526
3554
|
}
|
|
3527
3555
|
}
|
|
3556
|
+
_Performance_instances = new WeakSet(), _Performance_parseTime = function _Performance_parseTime(time) {
|
|
3557
|
+
const d = new Date(time);
|
|
3558
|
+
return `${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}.${`${d.getMilliseconds()}`.padStart(3, '0')}`;
|
|
3559
|
+
};
|
|
3528
3560
|
const perf = new Performance();
|
|
3529
3561
|
|
|
3530
3562
|
function findCustomWrapper(root, dataPathArr) {
|
|
@@ -4069,6 +4101,11 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
4069
4101
|
eventCenter.trigger(getOnHideEventKey(id));
|
|
4070
4102
|
}
|
|
4071
4103
|
};
|
|
4104
|
+
if (process.env.TARO_PLATFORM === 'web') {
|
|
4105
|
+
config.getOpenerEventChannel = () => {
|
|
4106
|
+
return shared.EventChannel.pageChannel;
|
|
4107
|
+
};
|
|
4108
|
+
}
|
|
4072
4109
|
LIFECYCLES.forEach((lifecycle) => {
|
|
4073
4110
|
let isDefer = false;
|
|
4074
4111
|
lifecycle = lifecycle.replace(/^defer:/, () => {
|
|
@@ -4763,7 +4800,7 @@ function handleIntersectionObserverObjectPolyfill() {
|
|
|
4763
4800
|
*/
|
|
4764
4801
|
function addEvent(node, event, fn, opt_useCapture) {
|
|
4765
4802
|
if (shared.isFunction(node.addEventListener)) {
|
|
4766
|
-
node.addEventListener(event, fn, opt_useCapture
|
|
4803
|
+
node.addEventListener(event, fn, opt_useCapture );
|
|
4767
4804
|
}
|
|
4768
4805
|
else if (shared.isFunction(node.attachEvent)) {
|
|
4769
4806
|
node.attachEvent('on' + event, fn);
|
|
@@ -4779,7 +4816,7 @@ function handleIntersectionObserverObjectPolyfill() {
|
|
|
4779
4816
|
*/
|
|
4780
4817
|
function removeEvent(node, event, fn, opt_useCapture) {
|
|
4781
4818
|
if (shared.isFunction(node.removeEventListener)) {
|
|
4782
|
-
node.removeEventListener(event, fn, opt_useCapture
|
|
4819
|
+
node.removeEventListener(event, fn, opt_useCapture );
|
|
4783
4820
|
}
|
|
4784
4821
|
else if (shared.isFunction(node.detatchEvent)) {
|
|
4785
4822
|
node.detatchEvent('on' + event, fn);
|
|
@@ -5016,11 +5053,11 @@ if (process.env.SUPPORT_TARO_POLYFILL !== 'disabled' && process.env.TARO_PLATFOR
|
|
|
5016
5053
|
handlePolyfill();
|
|
5017
5054
|
}
|
|
5018
5055
|
|
|
5019
|
-
Object.defineProperty(exports,
|
|
5056
|
+
Object.defineProperty(exports, "Events", {
|
|
5020
5057
|
enumerable: true,
|
|
5021
5058
|
get: function () { return shared.Events; }
|
|
5022
5059
|
});
|
|
5023
|
-
Object.defineProperty(exports,
|
|
5060
|
+
Object.defineProperty(exports, "hooks", {
|
|
5024
5061
|
enumerable: true,
|
|
5025
5062
|
get: function () { return shared.hooks; }
|
|
5026
5063
|
});
|
|
@@ -5096,6 +5133,7 @@ exports.createEvent = createEvent;
|
|
|
5096
5133
|
exports.createPageConfig = createPageConfig;
|
|
5097
5134
|
exports.createRecursiveComponentConfig = createRecursiveComponentConfig;
|
|
5098
5135
|
exports.customWrapperCache = customWrapperCache;
|
|
5136
|
+
exports.debounce = debounce;
|
|
5099
5137
|
exports.document = document$1;
|
|
5100
5138
|
exports.env = env;
|
|
5101
5139
|
exports.eventCenter = eventCenter;
|
|
@@ -5128,6 +5166,7 @@ exports.navigator = nav;
|
|
|
5128
5166
|
exports.nextTick = nextTick;
|
|
5129
5167
|
exports.options = options;
|
|
5130
5168
|
exports.parseUrl = parseUrl;
|
|
5169
|
+
exports.perf = perf;
|
|
5131
5170
|
exports.removePageInstance = removePageInstance;
|
|
5132
5171
|
exports.requestAnimationFrame = _raf;
|
|
5133
5172
|
exports.safeExecute = safeExecute;
|