@tarojs/runtime 3.7.0-alpha.8 → 3.7.0-beta.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/runtime.cjs.d.ts +1 -19
- package/dist/runtime.cjs.js +8 -18
- package/dist/runtime.esm.d.ts +1 -19
- package/dist/runtime.esm.js +7 -8
- package/dist/runtime.esm.js.map +1 -1
- package/dist/runtime.h5.d.ts +1 -19
- package/dist/runtime.h5.js +6 -17
- package/package.json +2 -2
package/dist/runtime.h5.d.ts
CHANGED
|
@@ -776,23 +776,5 @@ declare function hydrate(node: TaroElement | TaroText): MiniData;
|
|
|
776
776
|
declare const nextTick: (cb: Func, ctx?: Record<string, any>) => void;
|
|
777
777
|
declare const options: Options;
|
|
778
778
|
declare const incrementId: () => () => string;
|
|
779
|
-
declare function isElement(node: TaroNode): node is TaroElement;
|
|
780
|
-
declare function isText(node: TaroNode): node is TaroText;
|
|
781
|
-
declare function isComment(node: TaroNode): boolean;
|
|
782
|
-
declare function isHasExtractProp(el: TaroElement): boolean;
|
|
783
|
-
/**
|
|
784
|
-
* 往上寻找组件树直到 root,寻找是否有祖先组件绑定了同类型的事件
|
|
785
|
-
* @param node 当前组件
|
|
786
|
-
* @param type 事件类型
|
|
787
|
-
*/
|
|
788
|
-
declare function isParentBinded(node: TaroElement | null, type: string): boolean;
|
|
789
|
-
declare function shortcutAttr(key: string): string;
|
|
790
|
-
declare const customWrapperCache: Map<string, Record<string, any>>;
|
|
791
|
-
interface Ctor {
|
|
792
|
-
new (...args: any[]): any;
|
|
793
|
-
}
|
|
794
|
-
declare function extend(ctor: Ctor, methodName: string, options: Func | Record<string, any>): void;
|
|
795
|
-
declare function getComponentsAlias(): any;
|
|
796
|
-
declare function convertNumber2PX(value: number): string;
|
|
797
779
|
export { hooks } from '@tarojs/shared';
|
|
798
|
-
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, 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, addLeadingSlash, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, incrementId,
|
|
780
|
+
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, 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, addLeadingSlash, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, incrementId, Instance, VueAppInstance, VueInstance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options$0 as Options, Func, Ctx };
|
package/dist/runtime.h5.js
CHANGED
|
@@ -236,9 +236,6 @@ function getComponentsAlias() {
|
|
|
236
236
|
}
|
|
237
237
|
return componentsAlias$1;
|
|
238
238
|
}
|
|
239
|
-
function convertNumber2PX(value) {
|
|
240
|
-
return value + 'px';
|
|
241
|
-
}
|
|
242
239
|
|
|
243
240
|
class ClassList {
|
|
244
241
|
constructor(className, el) {
|
|
@@ -371,6 +368,7 @@ function hydrate(node) {
|
|
|
371
368
|
const nodeName = node.nodeName;
|
|
372
369
|
if (isText(node)) {
|
|
373
370
|
return {
|
|
371
|
+
sid: node.sid,
|
|
374
372
|
["v" /* Shortcuts.Text */]: node.nodeValue,
|
|
375
373
|
["nn" /* Shortcuts.NodeName */]: ((_a = componentsAlias[nodeName]) === null || _a === void 0 ? void 0 : _a._num) || '8'
|
|
376
374
|
};
|
|
@@ -995,7 +993,7 @@ function setStyle(newVal, styleKey) {
|
|
|
995
993
|
if (old === newVal)
|
|
996
994
|
return;
|
|
997
995
|
!this._pending && recordCss(this);
|
|
998
|
-
if (shared.isNull(newVal) || shared.isUndefined(newVal)) {
|
|
996
|
+
if (shared.isNull(newVal) || shared.isUndefined(newVal) || newVal === '') {
|
|
999
997
|
this._usedStyleProp.delete(styleKey);
|
|
1000
998
|
delete this._value[styleKey];
|
|
1001
999
|
}
|
|
@@ -1533,13 +1531,14 @@ class TaroEvent {
|
|
|
1533
1531
|
this.defaultPrevented = true;
|
|
1534
1532
|
}
|
|
1535
1533
|
get target() {
|
|
1536
|
-
var _a, _b, _c;
|
|
1534
|
+
var _a, _b, _c, _d;
|
|
1537
1535
|
const cacheTarget = this.cacheTarget;
|
|
1538
1536
|
if (!cacheTarget) {
|
|
1539
1537
|
const target = Object.create(((_a = this.mpEvent) === null || _a === void 0 ? void 0 : _a.target) || null);
|
|
1540
|
-
|
|
1538
|
+
// Note:优先判断冒泡场景alipay的targetDataset的sid, 不然冒泡场景target属性吐出不对,其余拿取当前绑定id
|
|
1539
|
+
const element = env.document.getElementById(((_b = target.targetDataset) === null || _b === void 0 ? void 0 : _b.sid) || ((_c = target.dataset) === null || _c === void 0 ? void 0 : _c.sid) || target.id || null);
|
|
1541
1540
|
target.dataset = element !== null ? element.dataset : shared.EMPTY_OBJ;
|
|
1542
|
-
for (const key in (
|
|
1541
|
+
for (const key in (_d = this.mpEvent) === null || _d === void 0 ? void 0 : _d.detail) {
|
|
1543
1542
|
target[key] = this.mpEvent.detail[key];
|
|
1544
1543
|
}
|
|
1545
1544
|
this.cacheTarget = target;
|
|
@@ -3321,18 +3320,14 @@ exports.VALUE = VALUE;
|
|
|
3321
3320
|
exports.VIEW = VIEW;
|
|
3322
3321
|
exports.addLeadingSlash = addLeadingSlash;
|
|
3323
3322
|
exports.cancelAnimationFrame = _caf;
|
|
3324
|
-
exports.convertNumber2PX = convertNumber2PX;
|
|
3325
3323
|
exports.createComponentConfig = createComponentConfig;
|
|
3326
3324
|
exports.createEvent = createEvent;
|
|
3327
3325
|
exports.createPageConfig = createPageConfig;
|
|
3328
3326
|
exports.createRecursiveComponentConfig = createRecursiveComponentConfig;
|
|
3329
|
-
exports.customWrapperCache = customWrapperCache;
|
|
3330
3327
|
exports.env = env;
|
|
3331
3328
|
exports.eventCenter = eventCenter;
|
|
3332
3329
|
exports.eventHandler = eventHandler;
|
|
3333
3330
|
exports.eventSource = eventSource;
|
|
3334
|
-
exports.extend = extend;
|
|
3335
|
-
exports.getComponentsAlias = getComponentsAlias;
|
|
3336
3331
|
exports.getComputedStyle = getComputedStyle;
|
|
3337
3332
|
exports.getCurrentInstance = getCurrentInstance;
|
|
3338
3333
|
exports.getOnHideEventKey = getOnHideEventKey;
|
|
@@ -3344,11 +3339,6 @@ exports.history = history;
|
|
|
3344
3339
|
exports.hydrate = hydrate;
|
|
3345
3340
|
exports.incrementId = incrementId;
|
|
3346
3341
|
exports.injectPageInstance = injectPageInstance;
|
|
3347
|
-
exports.isComment = isComment;
|
|
3348
|
-
exports.isElement = isElement;
|
|
3349
|
-
exports.isHasExtractProp = isHasExtractProp;
|
|
3350
|
-
exports.isParentBinded = isParentBinded;
|
|
3351
|
-
exports.isText = isText;
|
|
3352
3342
|
exports.location = location;
|
|
3353
3343
|
exports.navigator = nav;
|
|
3354
3344
|
exports.nextTick = nextTick;
|
|
@@ -3357,5 +3347,4 @@ exports.parseUrl = parseUrl;
|
|
|
3357
3347
|
exports.removePageInstance = removePageInstance;
|
|
3358
3348
|
exports.requestAnimationFrame = _raf;
|
|
3359
3349
|
exports.safeExecute = safeExecute;
|
|
3360
|
-
exports.shortcutAttr = shortcutAttr;
|
|
3361
3350
|
exports.stringify = stringify;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/runtime",
|
|
3
|
-
"version": "3.7.0-
|
|
3
|
+
"version": "3.7.0-beta.3",
|
|
4
4
|
"description": "taro runtime for mini apps.",
|
|
5
5
|
"main:h5": "dist/runtime.h5.js",
|
|
6
6
|
"main": "dist/runtime.esm.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash-es": "4.17.21",
|
|
23
|
-
"@tarojs/shared": "3.7.0-
|
|
23
|
+
"@tarojs/shared": "3.7.0-beta.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@rollup/plugin-buble": "^0.21.3",
|