@mpxjs/webpack-plugin 2.10.7-beta.10 → 2.10.7-beta.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.
@@ -74,12 +74,16 @@ registered in parent context!`)
74
74
  option.componentPath = '/' + outputPath
75
75
  }
76
76
  if (ctorType === 'app') {
77
+ const webConfig = Object.assign({}, { disablePageTransition: true }, global.__mpx.config.webConfig)
78
+ const disablePageTransition = !!webConfig.disablePageTransition
77
79
  option.data = function () {
78
80
  return {
79
- transitionName: ''
81
+ transitionName: '',
82
+ disablePageTransition: disablePageTransition
80
83
  }
81
84
  }
82
- if (!global.__mpx.config.webConfig.disablePageTransition) {
85
+
86
+ if (!disablePageTransition) {
83
87
  option.watch = {
84
88
  $route: {
85
89
  handler () {
@@ -39,7 +39,7 @@ module.exports = function (template, {
39
39
  const idName = (el && el.match(/#(.*)/) && el.match(/#(.*)/)[1]) || 'app'
40
40
  template = {
41
41
  tag: 'template',
42
- content: `<div id="${idName}"><transition :name="transitionName"><mpx-keep-alive><router-view></router-view></mpx-keep-alive></transition></div>`
42
+ content: `<div id="${idName}"><transition v-if="!disablePageTransition" :name="transitionName"><mpx-keep-alive><router-view></router-view></mpx-keep-alive></transition><mpx-keep-alive v-else><router-view></router-view></mpx-keep-alive></div>`
43
43
  }
44
44
  builtInComponentsMap['mpx-keep-alive'] = {
45
45
  resource: addQuery('@mpxjs/webpack-plugin/lib/runtime/components/web/mpx-keep-alive.vue', { isComponent: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.7-beta.10",
3
+ "version": "2.10.7-beta.11",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"