@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('
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}, [
|
|
140
|
-
h('div', { class: 'mpx-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
.
|
|
160
|
-
|
|
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:
|
|
205
|
+
z-index: 99999;
|
|
223
206
|
}
|
|
224
207
|
|
|
225
208
|
.mpx-titlebar__content {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
height: 100vh;
|
|
209
|
+
flex: 1;
|
|
210
|
+
overflow: hidden;
|
|
229
211
|
transform: translateZ(0);
|
|
230
212
|
}
|
|
231
213
|
|