@mpxjs/webpack-plugin 2.10.3-beta.12 → 2.10.3-beta.13

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.
@@ -72,14 +72,6 @@ export default {
72
72
  height: this.innerHeight
73
73
  }
74
74
  }
75
- ,
76
- // content wrapper style: padding-top to avoid being covered by fixed titlebar
77
- contentStyle () {
78
- // use calc to combine innerHeight and safe-area inset
79
- return {
80
- paddingTop: this.hidden ? '0px' : `calc(${this.innerHeight} + env(safe-area-inset-top, 0px))`
81
- }
82
- }
83
75
  },
84
76
  methods: {
85
77
  // 左侧点击:派发事件并在可回退时回退
@@ -131,7 +123,8 @@ export default {
131
123
  ]
132
124
 
133
125
  // top-level wrapper: contains fixed titlebar and page content wrapper
134
- return h('page', { class: 'mpx-titlebar-wrapper' }, [
126
+ return h('page', { }, [
127
+ h('div', { class: 'mpx-titlebar-wrapper' }, [
135
128
  // fixed titlebar
136
129
  h('div', {
137
130
  class: ['mpx-titlebar', { 'mpx-titlebar--hidden': this.hidden }],
@@ -147,10 +140,12 @@ export default {
147
140
  ]),
148
141
 
149
142
  // page content wrapper: default slot is page content
150
- h('div', { class: 'mpx-titlebar__content', style: this.contentStyle }, [
143
+ h('div', { class: 'mpx-titlebar__content' }, [
151
144
  h('div', { class: 'mpx-titlebar__scroll' }, this.$slots.default || [])
152
145
  ])
153
146
  ])
147
+ ])
148
+
154
149
  }
155
150
  }
156
151
  </script>
@@ -210,22 +205,19 @@ export default {
210
205
  /* wrapper and content layout */
211
206
  .mpx-titlebar-wrapper {
212
207
  position: relative;
213
- width: 100%;
214
- height: 100%;
208
+ width: 100vw;
209
+ height: 100vh;
210
+ display: flex;
211
+ flex-direction: column;
215
212
  }
216
213
 
217
214
  .mpx-titlebar {
218
- position: fixed;
219
- top: 0;
220
- left: 0;
221
- right: 0;
222
- z-index: 1000;
215
+ flex-shrink: 0;
223
216
  }
224
217
 
225
218
  .mpx-titlebar__content {
226
- box-sizing: border-box;
227
- width: 100vw;
228
- height: 100vh;
219
+ flex: 1;
220
+ overflow: hidden;
229
221
  transform: translateZ(0);
230
222
  }
231
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.3-beta.12",
3
+ "version": "2.10.3-beta.13",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"