parent
da7392e320
commit
a37992d6d7
@ -0,0 +1,163 @@ |
||||
<template> |
||||
<view |
||||
class="top-nav" |
||||
:class="[isFixed ? 'pf' : 'p-relative']" |
||||
:style="{ |
||||
backgroundColor: backgroundColor, |
||||
}" |
||||
> |
||||
<!-- 顶部 --> |
||||
<view class="nav" :style="{ height: navHeight + 'px' }"> |
||||
<view |
||||
:style="{ |
||||
paddingTop: statusHeight + 'px', |
||||
color: color, |
||||
}" |
||||
class="title" |
||||
> |
||||
<view class="content"> |
||||
<!-- <image |
||||
v-if="iconType == 1" |
||||
class="left-jiantou" |
||||
:src="$metaCommon.static_url('left_back01.png')" |
||||
mode="aspectFill" |
||||
@click="goBack" |
||||
/> |
||||
<image |
||||
v-if="iconType == 2" |
||||
class="left-jiantou" |
||||
:src="$metaCommon.static_url('left_back02.png')" |
||||
mode="aspectFill" |
||||
@click="goBack" |
||||
/> |
||||
<image |
||||
v-if="iconType == 3" |
||||
class="left-jiantou" |
||||
:src="$metaCommon.static_url('left_back03.png')" |
||||
mode="aspectFill" |
||||
@click="goBack" |
||||
/> --> |
||||
<text v-if="iconType == 1" class="left-jiantou">1</text> |
||||
<text v-if="iconType == 2" class="left-jiantou">2</text> |
||||
<text v-if="iconType == 3" class="left-jiantou">3</text> |
||||
|
||||
</view> |
||||
<view |
||||
class="font-700 font-size-34rpx" |
||||
:style="{ |
||||
lineHeight: titleHeight + 'px', |
||||
}" |
||||
> |
||||
{{ title }} |
||||
<slot></slot> |
||||
</view> |
||||
<view class="right-content"> |
||||
<slot name="right"></slot> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
/** |
||||
* shoproEmpty- 数据为空页 |
||||
* @property {String} title - 标题 |
||||
* @property {String} color - 标题颜色 |
||||
* @property {String} iconType - 返回箭头的类型选择 (1==透明 2==黑色) |
||||
* @property {String} delta - 返回的层级 |
||||
* @property {Boolean} status - 是否启用自定义事件 |
||||
* @property {Boolean} isFixed - 是否启用顶部固定定位 |
||||
*/ |
||||
|
||||
import { sysInfo } from "../utils/systeminfo"; |
||||
export default { |
||||
name: "", |
||||
data() { |
||||
return { |
||||
navHeight: sysInfo.customBarHeight, |
||||
statusHeight: sysInfo.statusBarHeight, |
||||
titleHeight: sysInfo.titleBarHeight, |
||||
}; |
||||
}, |
||||
props: { |
||||
title: { |
||||
type: String, |
||||
default: "", |
||||
}, |
||||
color: { |
||||
type: String, |
||||
default: "", |
||||
}, |
||||
iconType: { |
||||
type: [String, Number], |
||||
default: 1, |
||||
}, |
||||
delta: { |
||||
type: [Number, String], |
||||
default: 1, |
||||
}, |
||||
status: { |
||||
type: Boolean, |
||||
default: true, |
||||
}, |
||||
isFixed: { |
||||
type: Boolean, |
||||
default: true, |
||||
}, |
||||
backgroundColor: { |
||||
type: String, |
||||
default: "none", |
||||
}, |
||||
}, |
||||
methods: { |
||||
goBack() { |
||||
if (this.status) { |
||||
uni.navigateBack({ |
||||
delta: Number(this.delta), |
||||
}); |
||||
} else { |
||||
this.$emit("goBack"); |
||||
} |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.content { |
||||
position: relative; |
||||
} |
||||
|
||||
.left-jiantou { |
||||
position: absolute; |
||||
width: 48rpx; |
||||
height: 48rpx; |
||||
left: 24rpx; |
||||
top: 20rpx; |
||||
} |
||||
|
||||
.top-nav { |
||||
width: 100%; |
||||
// position: fixed; |
||||
z-index: 100001; |
||||
box-sizing: border-box; |
||||
} |
||||
|
||||
.pf { |
||||
position: fixed; |
||||
} |
||||
|
||||
.p-relative { |
||||
position: relative; |
||||
} |
||||
|
||||
.title { |
||||
text-align: center; |
||||
} |
||||
.right-content { |
||||
position: absolute; |
||||
right: 24rpx; |
||||
top: 20rpx; |
||||
} |
||||
</style> |
@ -0,0 +1,34 @@ |
||||
<template> |
||||
<div> |
||||
<custom_navbar title="Ai会议助手" :isFixed="false"></custom_navbar> |
||||
<div> |
||||
<u-button :customStyle="customStyle1">立即开始会议</u-button> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import custom_navbar from "../components/custom_navbar.vue"; |
||||
export default { |
||||
components: { |
||||
custom_navbar, |
||||
}, |
||||
data() { |
||||
return { |
||||
customStyle1: { |
||||
width: "558rpx", |
||||
height: "80rpx", |
||||
borderRadius: "16rpx", |
||||
backgroundColor: "#1467FF", |
||||
color: '#fff', |
||||
fontSize: "30rpx", |
||||
fontWeight: "700", |
||||
}, |
||||
}; |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style> |
||||
|
||||
</style> |
@ -0,0 +1,30 @@ |
||||
<template> |
||||
<div class="container"> |
||||
<custom_navbar title="会议记录" :isFixed="false"></custom_navbar> |
||||
<div> |
||||
<u-search placeholder="日照香炉生紫烟" v-model="keyword" :showAction="false"></u-search> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import custom_navbar from "../components/custom_navbar.vue"; |
||||
export default { |
||||
components: { |
||||
custom_navbar, |
||||
}, |
||||
data() { |
||||
return { |
||||
keyword: "遥看瀑布挂前川", |
||||
}; |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style> |
||||
.container{ |
||||
min-height: 100vh; |
||||
background-color:#D1DCFE ; |
||||
padding: 20rpx 24rpx; |
||||
} |
||||
</style> |
@ -0,0 +1,30 @@ |
||||
let _sysInfo = uni.getSystemInfoSync(); |
||||
let statusBarHeight = 0; //状态栏高度
|
||||
let titleBarHeight = 0; //导航栏高度
|
||||
let customBarHeight = 0; //导航栏高度+导航栏高度
|
||||
|
||||
statusBarHeight = _sysInfo.statusBarHeight; |
||||
// #ifndef MP
|
||||
if (_sysInfo.platform == 'android') { |
||||
titleBarHeight = 50; |
||||
} else { |
||||
titleBarHeight = 45; |
||||
} |
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
let custom = wx.getMenuButtonBoundingClientRect(); |
||||
// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
|
||||
titleBarHeight = custom.height + (custom.top - _sysInfo.statusBarHeight) * 2; |
||||
// customBarHeight = custom.bottom + custom.top - statusBarHeight;
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
titleBarHeight = _sysInfo.titleBarHeight; |
||||
// #endif
|
||||
customBarHeight = statusBarHeight + titleBarHeight; |
||||
|
||||
_sysInfo.titleBarHeight = titleBarHeight; |
||||
_sysInfo.statusBarHeight = statusBarHeight; |
||||
_sysInfo.customBarHeight = customBarHeight; |
||||
|
||||
export const sysInfo = _sysInfo; |
Loading…
Reference in new issue