123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <view>
- <view class="header-wrap" :style="{backgroundColor: bg}">
- <view :style="{opacity: showLeft ? 1 : 0}" class="left" @click="goBack()">
- <image src="@/static/right-arrow.png" alt="" />
- </view>
- <view class="center">{{ name }}</view>
- <view class="right"></view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- }
- },
- props: ['name','showLeft','showRight', 'bg'],
- onLoad() {
- },
- methods: {
- goBack() {
- this.$emit('goBack')
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .header-wrap {
- display: flex;
- justify-content: center;
- align-items: center;
- color: white;
- height: 85rpx;
- font-size: 38rpx;
- padding: 0 34rpx;
-
- .left {
- width: 20%;
- transform: rotate(180deg);
- text-align: right;
- image {
- width: 20rpx;
- height: 36rpx;
- }
- }
-
- .center {
- width: 60%;
- text-align: center;
- }
-
- .right {
- width: 20%;
- }
- }
- </style>
|