@tarojs/taro-h5 3.5.0-beta.0 → 3.5.0-beta.1
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/index.cjs.js +2 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/index.js +3 -7
- package/package.json +5 -5
- package/src/utils/index.ts +3 -8
package/dist/utils/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable prefer-promise-reject-errors */
|
|
2
|
-
import {
|
|
2
|
+
import { Current, hooks } from '@tarojs/runtime';
|
|
3
3
|
export function shouldBeObject(target) {
|
|
4
4
|
if (target && typeof target === 'object')
|
|
5
5
|
return { flag: true };
|
|
@@ -12,12 +12,8 @@ export function shouldBeObject(target) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
export function findDOM(inst) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const find = runtimeHooks.getDOMNode;
|
|
18
|
-
if (typeof find === 'function') {
|
|
19
|
-
return find(inst);
|
|
20
|
-
}
|
|
15
|
+
if (inst && hooks.isExist('getDOMNode')) {
|
|
16
|
+
return hooks.call('getDOMNode', inst);
|
|
21
17
|
}
|
|
22
18
|
const page = Current.page;
|
|
23
19
|
const path = page === null || page === void 0 ? void 0 : page.path;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro-h5",
|
|
3
|
-
"version": "3.5.0-beta.
|
|
3
|
+
"version": "3.5.0-beta.1",
|
|
4
4
|
"description": "Taro h5 framework",
|
|
5
5
|
"browser": "dist/index.esm.js",
|
|
6
6
|
"main:h5": "dist/index.js",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"author": "O2Team",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tarojs/api": "3.5.0-beta.
|
|
37
|
-
"@tarojs/router": "3.5.0-beta.
|
|
38
|
-
"@tarojs/runtime": "3.5.0-beta.
|
|
36
|
+
"@tarojs/api": "3.5.0-beta.1",
|
|
37
|
+
"@tarojs/router": "3.5.0-beta.1",
|
|
38
|
+
"@tarojs/runtime": "3.5.0-beta.1",
|
|
39
39
|
"base64-js": "^1.3.0",
|
|
40
40
|
"jsonp-retry": "^1.0.3",
|
|
41
41
|
"mobile-detect": "^1.4.2",
|
|
42
42
|
"query-string": "^7.1.1",
|
|
43
43
|
"whatwg-fetch": "^3.4.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ba9d945ccebb86f06edb7f845110526d92dc7b00"
|
|
46
46
|
}
|
package/src/utils/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable prefer-promise-reject-errors */
|
|
2
|
-
import {
|
|
2
|
+
import { Current, hooks, TaroElement } from '@tarojs/runtime'
|
|
3
3
|
|
|
4
4
|
export function shouldBeObject (target: unknown) {
|
|
5
5
|
if (target && typeof target === 'object') return { flag: true }
|
|
@@ -13,13 +13,8 @@ export function shouldBeObject (target: unknown) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export function findDOM (inst?): TaroElement | HTMLElement | undefined {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (inst) {
|
|
19
|
-
const find = runtimeHooks.getDOMNode
|
|
20
|
-
if (typeof find === 'function') {
|
|
21
|
-
return find(inst)
|
|
22
|
-
}
|
|
16
|
+
if (inst && hooks.isExist('getDOMNode')) {
|
|
17
|
+
return hooks.call('getDOMNode', inst)
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
const page = Current.page
|