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

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,35 +123,28 @@ 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' }, [
135
- // fixed titlebar
136
- h('div', {
137
- class: ['mpx-titlebar', { 'mpx-titlebar--hidden': this.hidden }],
138
- style: this.rootStyle
139
- }, [
140
- h('div', { class: 'mpx-titlebar__safe', style: this.safeStyle }, [
141
- h('div', { class: 'mpx-titlebar__inner', style: this.innerStyle }, [
142
- h('div', { class: 'mpx-titlebar__left', on: { click: this.onLeftClick } }, leftChildren),
143
- h('div', { class: 'mpx-titlebar__center' }, centerChildren),
144
- h('div', { class: 'mpx-titlebar__right' }, [])
145
- ])
126
+ return h('div', { class: 'page-wrapper' }, [
127
+ h('div', {
128
+ class: ['mpx-titlebar', { 'mpx-titlebar--hidden': this.hidden }],
129
+ style: this.rootStyle
130
+ }, [
131
+ h('div', { class: 'mpx-titlebar__safe', style: this.safeStyle }, [
132
+ h('div', { class: 'mpx-titlebar__inner', style: this.innerStyle }, [
133
+ h('div', { class: 'mpx-titlebar__left', on: { click: this.onLeftClick } }, leftChildren),
134
+ h('div', { class: 'mpx-titlebar__center' }, centerChildren),
135
+ h('div', { class: 'mpx-titlebar__right' }, [])
146
136
  ])
147
- ]),
148
-
149
- // page content wrapper: default slot is page content
150
- h('div', { class: 'mpx-titlebar__content', style: this.contentStyle }, [
151
- h('div', { class: 'mpx-titlebar__scroll' }, this.$slots.default || [])
152
137
  ])
153
- ])
138
+ ]),
139
+ h('page', {}, [ this.$slots.default ])
140
+ ])
154
141
  }
155
142
  }
156
143
  </script>
157
144
 
158
145
  <style scoped>
159
- .mpx-titlebar {
160
- width: 100%;
161
- box-sizing: border-box;
162
- -webkit-font-smoothing: antialiased;
146
+ .page-wrapper {
147
+ padding-top: calc(env(safe-area-inset-top, 0px) + 44px);
163
148
  }
164
149
  .mpx-titlebar--hidden {
165
150
  display: none;
@@ -207,25 +192,22 @@ export default {
207
192
  cursor: pointer;
208
193
  }
209
194
 
210
- /* wrapper and content layout */
211
- .mpx-titlebar-wrapper {
212
- position: relative;
213
- width: 100%;
214
- height: 100%;
215
- }
216
-
217
195
  .mpx-titlebar {
196
+ /* flex-shrink: 0; */
197
+ height: calc(env(safe-area-inset-top, 0px) + 44px);
198
+ width: 100%;
199
+ box-sizing: border-box;
200
+ -webkit-font-smoothing: antialiased;
218
201
  position: fixed;
219
202
  top: 0;
220
203
  left: 0;
221
204
  right: 0;
222
- z-index: 1000;
205
+ z-index: 99999;
223
206
  }
224
207
 
225
208
  .mpx-titlebar__content {
226
- box-sizing: border-box;
227
- width: 100vw;
228
- height: 100vh;
209
+ flex: 1;
210
+ overflow: hidden;
229
211
  transform: translateZ(0);
230
212
  }
231
213
 
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.14",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"