oil-station/pos-uni/components/header/headers.vue

71 lines
1.0 KiB
Vue
Raw Normal View History

2024-05-13 11:22:23 +08:00
<template>
<view class="my-header">
2024-05-22 09:39:54 +08:00
<view class="my-icons" @click="gobock()">
2024-05-13 11:22:23 +08:00
<slot></slot>
</view>
<view class="my-text">{{titles}}</view>
2024-05-29 15:15:33 +08:00
<view class="my-icons" @click="clickChild()">
{{type?'筛选':''}}
</view>
2024-05-13 11:22:23 +08:00
</view>
</template>
<script>
export default {
data() {
return {
}
},
props: {
2024-05-29 15:15:33 +08:00
titles: String,
type: String
2024-05-13 11:22:23 +08:00
},
mounted() {
2024-05-22 09:39:54 +08:00
},
methods: {
gobock() {
uni.navigateBack()
2024-05-29 15:15:33 +08:00
},
clickChild() {
console.log("2222222222222222222222222")
this.$emit('chiledEvent', 123);
2024-05-22 09:39:54 +08:00
}
2024-05-13 11:22:23 +08:00
}
}
</script>
<style scoped lang="scss">
.my-header {
width: 100%;
height: 88px;
// background: linear-gradient(180deg, #B2D2FC 0%, rgba(255, 255, 255, 0.84) 100%);
display: flex;
align-items: center;
justify-content: space-between;
2024-05-22 09:39:54 +08:00
color: #fff;
2024-05-13 11:22:23 +08:00
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
z-index: 99999;
2024-05-22 09:39:54 +08:00
background: #0864e9;
2024-05-13 11:22:23 +08:00
position: fixed;
top: 0px;
.my-icons {
2024-05-29 15:15:33 +08:00
width: 50px;
2024-05-13 11:22:23 +08:00
}
.my-text {
font-weight: bold;
}
}
</style>