12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <template>
- <!-- <view class="custom-header" :style="{'background-color':backgroundColors}"> -->
- <view class="custom-header">
- <image v-show="back" @click="goBack()" class="header-left" src="../static/image/icon-back.png">
- </image>
- <view :style="back?'margin-right: 30px;':''" class="header-title">
- {{ title }}
- </view>
- <view class="header-right">
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- title: {
- type: String,
- default: '',
- },
- back: {
- type: Boolean,
- default: true,
- },
- backgroundColors: {
- type: String,
- default: '#FFF',
- },
- },
- // 其他配置和逻辑
- methods: {
- goBack() {
- window.history.back(); // 返回上一级页面
- },
- },
- }
- </script>
- <style scoped>
- .custom-header {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- z-index: 999;
- height: 45px;
- }
-
- .header-left {
- width: 35px;
- height: 35px;
- }
-
- .header-title {
- text-align: center;
- width: 100%;
- font-size: 32rpx;
- font-weight: bold;
- position: relative;
- }
-
- /* 其他样式 */
- </style>
|