页面切图
This commit is contained in:
@@ -2,19 +2,21 @@
|
||||
<Cn-page :loading='loading' noPadding>
|
||||
<view slot='body'>
|
||||
<view class='detail'>
|
||||
<view class="header">
|
||||
<image src="/static/test2.pic.jpg" mode="widthFix" style="width: 100%;" />
|
||||
</view>
|
||||
<view class="des">
|
||||
<view class="detail-header">
|
||||
<view class="header">
|
||||
<image src="/static/test2.pic.png" mode="widthFix" style="width: 100%;" />
|
||||
</view>
|
||||
<!-- <view class="des">
|
||||
<text>设备基础信息</text>
|
||||
<text class="ml10">设备状态</text>
|
||||
</view>
|
||||
<view class="nav">
|
||||
<view class="nav-menu" :class="{ 'nav-menu-active': navMenuActive == index }"
|
||||
v-for="(item, index) in navMenuList" :key="index" @click="navMenuClick(index)">{{ item.text }}
|
||||
</view> -->
|
||||
<view class="nav">
|
||||
<view class="nav-menu" :class="{ 'nav-menu-active': navMenuActive == index }"
|
||||
v-for="(item, index) in navMenuList" :key="index" @click="navMenuClick(index)">{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
|
||||
<view class="content">
|
||||
<DianWang v-if="navMenuActive == 0"></DianWang>
|
||||
<NiBian v-else-if="navMenuActive == 1"></NiBian>
|
||||
<ShuChu v-else-if="navMenuActive == 2"></ShuChu>
|
||||
@@ -25,9 +27,7 @@
|
||||
</view>
|
||||
<uni-fab ref="fab" direction="vertical" horizontal="right" vertical="bottom" :content="content"
|
||||
@trigger="trigger" />
|
||||
<uni-popup ref="share" type="share" background-color="#fff">
|
||||
<uni-popup-share title="分享到"></uni-popup-share>
|
||||
</uni-popup>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
@@ -115,6 +115,7 @@ export default {
|
||||
},
|
||||
navMenuClick (idx) {
|
||||
this.navMenuActive = idx
|
||||
uni.pageScrollTo({ scrollTop: 0, duration: 0 })
|
||||
},
|
||||
init () {
|
||||
let userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
@@ -127,10 +128,7 @@ export default {
|
||||
})
|
||||
break;
|
||||
case 4:
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/share.png',
|
||||
text: '分享',
|
||||
}, {
|
||||
this.content.splice(0, 0,{
|
||||
iconPath: '/static/subordinate.png',
|
||||
text: '用户',
|
||||
}, {
|
||||
@@ -205,6 +203,14 @@ export default {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
background: #f3f4f5;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user