@tarojs/taro-h5 3.3.7 → 3.3.11

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 CHANGED
@@ -2813,7 +2813,7 @@ function createRouter(app, config, framework) {
2813
2813
  app.onLaunch();
2814
2814
  var render = throttle( /*#__PURE__*/function () {
2815
2815
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
2816
- var location, action, _a, _b, _c, _d, element, pageConfig, enablePullDownRefresh, shouldLoad, delta, prevIndex, prev, el, _config, pathname, page;
2816
+ var location, action, _a, _b, _c, _d, _e, element, pageConfig, enablePullDownRefresh, shouldLoad, delta, prevIndex, prev, el, _config, pathname, routerIndex, isTabBar, page;
2817
2817
 
2818
2818
  return regeneratorRuntime.wrap(function _callee$(_context) {
2819
2819
  while (1) {
@@ -2909,8 +2909,23 @@ function createRouter(app, config, framework) {
2909
2909
  delete _config['path'];
2910
2910
  delete _config['load'];
2911
2911
  pathname = basename ? location.pathname.replace(basename, '') : location.pathname;
2912
- page = runtime.createPageConfig(enablePullDownRefresh ? (_d = runtimeHooks.createPullDownComponent) === null || _d === void 0 ? void 0 : _d.call(runtimeHooks, el, location.pathname, framework, routerConfig.PullDownRefresh) : el, pathname + runtime.stringify(qs(stacks.length)), {}, _config);
2913
- loadPage(page, pageConfig, stacks.length);
2912
+ isTabBar = (_d = routerConfig.tabBar) === null || _d === void 0 ? void 0 : _d.list.some(function (TabBarItem) {
2913
+ var _a;
2914
+
2915
+ return ((_a = TabBarItem.pagePath) === null || _a === void 0 ? void 0 : _a.replace(/\?.*/g, '')) === pathname;
2916
+ });
2917
+
2918
+ if ((stacks === null || stacks === void 0 ? void 0 : stacks.length) > 0 && isTabBar) {
2919
+ routerIndex = stacks.findIndex(function (r) {
2920
+ var _a;
2921
+
2922
+ return ((_a = r.path) === null || _a === void 0 ? void 0 : _a.replace(/\?.*/g, '')) === pathname;
2923
+ });
2924
+ }
2925
+
2926
+ routerIndex = (routerIndex || routerIndex === 0) && routerIndex !== -1 ? routerIndex : stacks.length;
2927
+ page = runtime.createPageConfig(enablePullDownRefresh ? (_e = runtimeHooks.createPullDownComponent) === null || _e === void 0 ? void 0 : _e.call(runtimeHooks, el, location.pathname, framework, routerConfig.PullDownRefresh) : el, pathname + runtime.stringify(qs(routerIndex)), {}, _config);
2928
+ loadPage(page, pageConfig, routerIndex);
2914
2929
  }
2915
2930
 
2916
2931
  case 24:
@@ -5168,7 +5183,9 @@ var Animation = /*#__PURE__*/function () {
5168
5183
  _arg$transformOrigin = arg.transformOrigin,
5169
5184
  transformOrigin = _arg$transformOrigin === void 0 ? DEFAULT.transformOrigin : _arg$transformOrigin; // 生成一条 transition 动画
5170
5185
 
5171
- this.steps.push([this.rules.join(';'), this.transform.join(' '), "".concat(TRANSFORM, "-origin: ").concat(transformOrigin), "transition: all ".concat(duration, "ms ").concat(timingFunction, " ").concat(delay, "ms")].filter(function (item) {
5186
+ this.steps.push([this.rules.map(function (rule) {
5187
+ return "".concat(rule, "!important");
5188
+ }).join(';'), "".concat(this.transform.join(' '), "!important"), "".concat(TRANSFORM, "-origin: ").concat(transformOrigin), "transition: all ".concat(duration, "ms ").concat(timingFunction, " ").concat(delay, "ms")].filter(function (item) {
5172
5189
  return item !== '' && item !== "".concat(TRANSFORM, ":");
5173
5190
  }).join(';')); // 清空 rules 和 transform
5174
5191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro-h5",
3
- "version": "3.3.7",
3
+ "version": "3.3.11",
4
4
  "description": "Taro h5 framework",
5
5
  "main:h5": "src/index.js",
6
6
  "main": "dist/index.cjs.js",
@@ -33,9 +33,9 @@
33
33
  "author": "O2Team",
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
- "@tarojs/api": "3.3.7",
37
- "@tarojs/router": "3.3.7",
38
- "@tarojs/runtime": "3.3.7",
36
+ "@tarojs/api": "3.3.11",
37
+ "@tarojs/router": "3.3.11",
38
+ "@tarojs/runtime": "3.3.11",
39
39
  "base64-js": "^1.3.0",
40
40
  "jsonp-retry": "^1.0.3",
41
41
  "mobile-detect": "^1.4.2",
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "jest-fetch-mock": "^3.0.3"
47
47
  },
48
- "gitHead": "d55c613cece0a767e8e733188353b4e4e800f029"
48
+ "gitHead": "dad3664e58bb1fe7ab752365d9cc0d0dd444c40a"
49
49
  }
@@ -295,8 +295,8 @@ class Animation {
295
295
  // 生成一条 transition 动画
296
296
  this.steps.push(
297
297
  [
298
- this.rules.join(';'),
299
- this.transform.join(' '),
298
+ this.rules.map(rule => `${rule}!important`).join(';'),
299
+ `${this.transform.join(' ')}!important`,
300
300
  `${TRANSFORM}-origin: ${transformOrigin}`,
301
301
  `transition: all ${duration}ms ${timingFunction} ${delay}ms`
302
302
  ]