hz-zhhq-app/components/cu-custom.vue

83 lines
1.3 KiB
Vue
Raw Normal View History

2025-01-22 10:53:47 +08:00
<template>
<view>
<view class="cu-custom">
<view class="cu-bar">
<view class="action" @tap="BackPage" v-if="isBack">
<image style="width: 44upx;height: 44upx;" src="/static/back.png" ></image>
</view>
<view class="content">
<slot name="content"></slot>
</view>
<slot name="right"></slot>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
name: 'cu-custom',
computed: {
},
props: {
bgColor: {
type: String,
default: ''
},
isBack: {
type: [Boolean, String],
default: false
},
bgImage: {
type: String,
default: ''
},
},
methods: {
BackPage() {
uni.navigateBack({
delta: 1
});
}
}
}
</script>
<style lang="scss" scoped>
.cu-custom{
width: 100%;
height: 100%;
position: relative;
background: url('../static/img/background.png') no-repeat;
background-repeat: no-repeat;
background-size: 100% 100%;
// background-position: center;
}
.cu-bar{
z-index: 100;
position: fixed;
width: 100%;
height: 80upx;
}
.action{
z-index: 110;
position: absolute;
top: 25upx;
left: 40upx;
}
.content{
width: 100%;
font-size: 36upx;
font-weight: bold;
text-align: center;
position: absolute;
top: 20upx;
// z-index: 100;
left: 0;
}
</style>