mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-31 17:58:12 +00:00
perf: 优化移动端布局
This commit is contained in:
parent
bba5bb7411
commit
ebbde8afd3
@ -36,10 +36,10 @@
|
|||||||
<GuidePage/>
|
<GuidePage/>
|
||||||
|
|
||||||
<!--返回效果-->
|
<!--返回效果-->
|
||||||
<MobileBack/>
|
<MobileBack v-if="isFirstPage"/>
|
||||||
|
|
||||||
<!--移动端通知-->
|
<!--移动端通知-->
|
||||||
<MobileNotification/>
|
<MobileNotification v-if="isFirstPage"/>
|
||||||
|
|
||||||
<!--网络提示-->
|
<!--网络提示-->
|
||||||
<NetworkException v-if="windowLandscape"/>
|
<NetworkException v-if="windowLandscape"/>
|
||||||
@ -134,7 +134,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['ws', 'themeConf', 'windowOrientation', 'safeAreaSize', 'mobileTabbar']),
|
...mapState(['ws', 'themeConf', 'windowOrientation', 'safeAreaSize', 'isFirstPage', 'mobileTabbar']),
|
||||||
|
|
||||||
statusColor({routeName}) {
|
statusColor({routeName}) {
|
||||||
if (!routeName) {
|
if (!routeName) {
|
||||||
|
|||||||
3
resources/assets/js/app.js
vendored
3
resources/assets/js/app.js
vendored
@ -339,7 +339,8 @@ const $preload = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const pageInfo = $A.eeuiAppGetPageInfo() || {};
|
const pageInfo = $A.eeuiAppGetPageInfo() || {};
|
||||||
if (pageInfo.pageName === 'firstPage') {
|
store.state.isFirstPage = pageInfo.pageName === 'firstPage'
|
||||||
|
if (store.state.isFirstPage) {
|
||||||
$A.eeuiAppGetSafeAreaInsets().then(data => {
|
$A.eeuiAppGetSafeAreaInsets().then(data => {
|
||||||
const proportion = data.height / window.outerHeight
|
const proportion = data.height / window.outerHeight
|
||||||
store.state.safeAreaSize = {
|
store.state.safeAreaSize = {
|
||||||
|
|||||||
3
resources/assets/js/store/state.js
vendored
3
resources/assets/js/store/state.js
vendored
@ -23,6 +23,9 @@ export default {
|
|||||||
windowHeight: windowHeight,
|
windowHeight: windowHeight,
|
||||||
safeAreaSize: {top: 0, bottom: 0, data: null}, // 安全区域尺寸
|
safeAreaSize: {top: 0, bottom: 0, data: null}, // 安全区域尺寸
|
||||||
|
|
||||||
|
// 是否第一个页面(eeui)
|
||||||
|
isFirstPage: false,
|
||||||
|
|
||||||
// 浏览器窗口方向
|
// 浏览器窗口方向
|
||||||
windowOrientation: windowOrientation,
|
windowOrientation: windowOrientation,
|
||||||
windowLandscape: windowOrientation === 'landscape', // 横屏
|
windowLandscape: windowOrientation === 'landscape', // 横屏
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user