@tarojs/taro-h5 3.4.0-beta.0 → 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/index.cjs.js +110 -98
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
|
@@ -1574,6 +1574,94 @@ var runtime = {exports: {}};
|
|
|
1574
1574
|
|
|
1575
1575
|
var regenerator = runtime.exports;
|
|
1576
1576
|
|
|
1577
|
+
var toConsumableArray = {exports: {}};
|
|
1578
|
+
|
|
1579
|
+
var arrayWithoutHoles = {exports: {}};
|
|
1580
|
+
|
|
1581
|
+
var arrayLikeToArray = {exports: {}};
|
|
1582
|
+
|
|
1583
|
+
(function (module) {
|
|
1584
|
+
function _arrayLikeToArray(arr, len) {
|
|
1585
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1586
|
+
|
|
1587
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1588
|
+
arr2[i] = arr[i];
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
return arr2;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
module.exports = _arrayLikeToArray;
|
|
1595
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1596
|
+
})(arrayLikeToArray);
|
|
1597
|
+
|
|
1598
|
+
(function (module) {
|
|
1599
|
+
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
1600
|
+
|
|
1601
|
+
function _arrayWithoutHoles(arr) {
|
|
1602
|
+
if (Array.isArray(arr)) return arrayLikeToArray$1(arr);
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
module.exports = _arrayWithoutHoles;
|
|
1606
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1607
|
+
})(arrayWithoutHoles);
|
|
1608
|
+
|
|
1609
|
+
var iterableToArray = {exports: {}};
|
|
1610
|
+
|
|
1611
|
+
(function (module) {
|
|
1612
|
+
function _iterableToArray(iter) {
|
|
1613
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
module.exports = _iterableToArray;
|
|
1617
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1618
|
+
})(iterableToArray);
|
|
1619
|
+
|
|
1620
|
+
var unsupportedIterableToArray = {exports: {}};
|
|
1621
|
+
|
|
1622
|
+
(function (module) {
|
|
1623
|
+
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
1624
|
+
|
|
1625
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1626
|
+
if (!o) return;
|
|
1627
|
+
if (typeof o === "string") return arrayLikeToArray$1(o, minLen);
|
|
1628
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1629
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1630
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1631
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray$1(o, minLen);
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
module.exports = _unsupportedIterableToArray;
|
|
1635
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1636
|
+
})(unsupportedIterableToArray);
|
|
1637
|
+
|
|
1638
|
+
var nonIterableSpread = {exports: {}};
|
|
1639
|
+
|
|
1640
|
+
(function (module) {
|
|
1641
|
+
function _nonIterableSpread() {
|
|
1642
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
module.exports = _nonIterableSpread;
|
|
1646
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1647
|
+
})(nonIterableSpread);
|
|
1648
|
+
|
|
1649
|
+
(function (module) {
|
|
1650
|
+
var arrayWithoutHoles$1 = arrayWithoutHoles.exports;
|
|
1651
|
+
var iterableToArray$1 = iterableToArray.exports;
|
|
1652
|
+
var unsupportedIterableToArray$1 = unsupportedIterableToArray.exports;
|
|
1653
|
+
var nonIterableSpread$1 = nonIterableSpread.exports;
|
|
1654
|
+
|
|
1655
|
+
function _toConsumableArray(arr) {
|
|
1656
|
+
return arrayWithoutHoles$1(arr) || iterableToArray$1(arr) || unsupportedIterableToArray$1(arr) || nonIterableSpread$1();
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
module.exports = _toConsumableArray;
|
|
1660
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1661
|
+
})(toConsumableArray);
|
|
1662
|
+
|
|
1663
|
+
var _toConsumableArray = /*@__PURE__*/getDefaultExportFromCjs(toConsumableArray.exports);
|
|
1664
|
+
|
|
1577
1665
|
var slicedToArray = {exports: {}};
|
|
1578
1666
|
|
|
1579
1667
|
var arrayWithHoles = {exports: {}};
|
|
@@ -1624,41 +1712,6 @@ var iterableToArrayLimit = {exports: {}};
|
|
|
1624
1712
|
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1625
1713
|
})(iterableToArrayLimit);
|
|
1626
1714
|
|
|
1627
|
-
var unsupportedIterableToArray = {exports: {}};
|
|
1628
|
-
|
|
1629
|
-
var arrayLikeToArray = {exports: {}};
|
|
1630
|
-
|
|
1631
|
-
(function (module) {
|
|
1632
|
-
function _arrayLikeToArray(arr, len) {
|
|
1633
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1634
|
-
|
|
1635
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1636
|
-
arr2[i] = arr[i];
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
return arr2;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
module.exports = _arrayLikeToArray;
|
|
1643
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1644
|
-
})(arrayLikeToArray);
|
|
1645
|
-
|
|
1646
|
-
(function (module) {
|
|
1647
|
-
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
1648
|
-
|
|
1649
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1650
|
-
if (!o) return;
|
|
1651
|
-
if (typeof o === "string") return arrayLikeToArray$1(o, minLen);
|
|
1652
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1653
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1654
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1655
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray$1(o, minLen);
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
module.exports = _unsupportedIterableToArray;
|
|
1659
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1660
|
-
})(unsupportedIterableToArray);
|
|
1661
|
-
|
|
1662
1715
|
var nonIterableRest = {exports: {}};
|
|
1663
1716
|
|
|
1664
1717
|
(function (module) {
|
|
@@ -1754,59 +1807,6 @@ var createForOfIteratorHelper = {exports: {}};
|
|
|
1754
1807
|
|
|
1755
1808
|
var _createForOfIteratorHelper = /*@__PURE__*/getDefaultExportFromCjs(createForOfIteratorHelper.exports);
|
|
1756
1809
|
|
|
1757
|
-
var toConsumableArray = {exports: {}};
|
|
1758
|
-
|
|
1759
|
-
var arrayWithoutHoles = {exports: {}};
|
|
1760
|
-
|
|
1761
|
-
(function (module) {
|
|
1762
|
-
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
1763
|
-
|
|
1764
|
-
function _arrayWithoutHoles(arr) {
|
|
1765
|
-
if (Array.isArray(arr)) return arrayLikeToArray$1(arr);
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
module.exports = _arrayWithoutHoles;
|
|
1769
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1770
|
-
})(arrayWithoutHoles);
|
|
1771
|
-
|
|
1772
|
-
var iterableToArray = {exports: {}};
|
|
1773
|
-
|
|
1774
|
-
(function (module) {
|
|
1775
|
-
function _iterableToArray(iter) {
|
|
1776
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
module.exports = _iterableToArray;
|
|
1780
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1781
|
-
})(iterableToArray);
|
|
1782
|
-
|
|
1783
|
-
var nonIterableSpread = {exports: {}};
|
|
1784
|
-
|
|
1785
|
-
(function (module) {
|
|
1786
|
-
function _nonIterableSpread() {
|
|
1787
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
module.exports = _nonIterableSpread;
|
|
1791
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1792
|
-
})(nonIterableSpread);
|
|
1793
|
-
|
|
1794
|
-
(function (module) {
|
|
1795
|
-
var arrayWithoutHoles$1 = arrayWithoutHoles.exports;
|
|
1796
|
-
var iterableToArray$1 = iterableToArray.exports;
|
|
1797
|
-
var unsupportedIterableToArray$1 = unsupportedIterableToArray.exports;
|
|
1798
|
-
var nonIterableSpread$1 = nonIterableSpread.exports;
|
|
1799
|
-
|
|
1800
|
-
function _toConsumableArray(arr) {
|
|
1801
|
-
return arrayWithoutHoles$1(arr) || iterableToArray$1(arr) || unsupportedIterableToArray$1(arr) || nonIterableSpread$1();
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
module.exports = _toConsumableArray;
|
|
1805
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1806
|
-
})(toConsumableArray);
|
|
1807
|
-
|
|
1808
|
-
var _toConsumableArray = /*@__PURE__*/getDefaultExportFromCjs(toConsumableArray.exports);
|
|
1809
|
-
|
|
1810
1810
|
var r,
|
|
1811
1811
|
B = r || (r = {});
|
|
1812
1812
|
B.Pop = "POP";
|
|
@@ -2286,6 +2286,17 @@ var Stacks = /*#__PURE__*/function () {
|
|
|
2286
2286
|
value: function getItem(index) {
|
|
2287
2287
|
return this.stacks[index];
|
|
2288
2288
|
}
|
|
2289
|
+
}, {
|
|
2290
|
+
key: "getLastIndex",
|
|
2291
|
+
value: function getLastIndex(pathname) {
|
|
2292
|
+
var list = _toConsumableArray(this.stacks).reverse();
|
|
2293
|
+
|
|
2294
|
+
return list.findIndex(function (page) {
|
|
2295
|
+
var _page$path;
|
|
2296
|
+
|
|
2297
|
+
return ((_page$path = page.path) === null || _page$path === void 0 ? void 0 : _page$path.replace(/\?.*/g, '')) === pathname;
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2289
2300
|
}, {
|
|
2290
2301
|
key: "getDelta",
|
|
2291
2302
|
value: function getDelta(pathname) {
|
|
@@ -2294,17 +2305,18 @@ var Stacks = /*#__PURE__*/function () {
|
|
|
2294
2305
|
} // NOTE: 此处为了修复浏览器后退多级页面,在大量重复路由状况下可能出现判断错误的情况 (增强判断能力只能考虑在 query 中新增参数来判断,暂时搁置)
|
|
2295
2306
|
|
|
2296
2307
|
|
|
2297
|
-
|
|
2298
|
-
var _r$path;
|
|
2299
|
-
|
|
2300
|
-
return ((_r$path = r.path) === null || _r$path === void 0 ? void 0 : _r$path.replace(/\?.*/g, '')) === pathname;
|
|
2301
|
-
});
|
|
2302
|
-
return this.length - 1 - prevIndex;
|
|
2308
|
+
return this.getLastIndex(pathname) || 1;
|
|
2303
2309
|
}
|
|
2304
2310
|
}, {
|
|
2305
2311
|
key: "getPrevIndex",
|
|
2306
2312
|
value: function getPrevIndex(pathname) {
|
|
2307
|
-
|
|
2313
|
+
var lastIndex = this.getLastIndex(pathname);
|
|
2314
|
+
|
|
2315
|
+
if (lastIndex < 0) {
|
|
2316
|
+
return -1;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
return this.length - 1 - lastIndex;
|
|
2308
2320
|
}
|
|
2309
2321
|
}, {
|
|
2310
2322
|
key: "pop",
|
|
@@ -3819,10 +3831,10 @@ function pageOnReady(page) {
|
|
|
3819
3831
|
var pageEl = document.getElementById(page.path);
|
|
3820
3832
|
|
|
3821
3833
|
if (pageEl && !(pageEl !== null && pageEl !== void 0 && pageEl['__isReady'])) {
|
|
3822
|
-
var _el$componentOnReady
|
|
3834
|
+
var _el$componentOnReady, _el$componentOnReady$;
|
|
3823
3835
|
|
|
3824
3836
|
var el = pageEl.firstElementChild;
|
|
3825
|
-
el === null || el === void 0 ? void 0 : (_el$componentOnReady = el['componentOnReady']) === null || _el$componentOnReady === void 0 ? void 0 : _el$componentOnReady.call(el)
|
|
3837
|
+
el === null || el === void 0 ? void 0 : (_el$componentOnReady = el['componentOnReady']) === null || _el$componentOnReady === void 0 ? void 0 : (_el$componentOnReady$ = _el$componentOnReady.call(el)) === null || _el$componentOnReady$ === void 0 ? void 0 : _el$componentOnReady$.then(function () {
|
|
3826
3838
|
runtime$1.requestAnimationFrame(function () {
|
|
3827
3839
|
page.onReady();
|
|
3828
3840
|
pageEl['__isReady'] = true;
|
|
@@ -4045,7 +4057,7 @@ function createRouter(app, config, framework) {
|
|
|
4045
4057
|
shouldLoad = true;
|
|
4046
4058
|
|
|
4047
4059
|
case 46:
|
|
4048
|
-
if (!shouldLoad) {
|
|
4060
|
+
if (!(shouldLoad || stacks.length < 1)) {
|
|
4049
4061
|
_context.next = 54;
|
|
4050
4062
|
break;
|
|
4051
4063
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro-h5",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0-canary.0",
|
|
4
4
|
"description": "Taro h5 framework",
|
|
5
5
|
"main:h5": "src/index.js",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"author": "O2Team",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tarojs/api": "3.
|
|
37
|
-
"@tarojs/router": "3.
|
|
38
|
-
"@tarojs/runtime": "3.
|
|
36
|
+
"@tarojs/api": "3.5.0-canary.0",
|
|
37
|
+
"@tarojs/router": "3.5.0-canary.0",
|
|
38
|
+
"@tarojs/runtime": "3.5.0-canary.0",
|
|
39
39
|
"base64-js": "^1.3.0",
|
|
40
40
|
"jsonp-retry": "^1.0.3",
|
|
41
41
|
"mobile-detect": "^1.4.2",
|
|
42
42
|
"whatwg-fetch": "^3.4.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a0222bc41bc05b0e34413d6db3de963d777a5015"
|
|
45
45
|
}
|