123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <div class="title-box" :style="{ backgroundImage: titleImg }">
- <span>{{ title }}</span>
- <img
- v-if="hasMore"
- class="more"
- :src="require('@/assets/imgs/maps/icon_more.png')"
- alt=""
- @click="$emit('openMore')"
- />
- </div>
- </template>
- <script>
- import TitleImg from '@/assets/imgs/panels/title_bg@2x.png'
- export default {
- props: {
- title: {
- type: String,
- default: '',
- },
- hasMore: {
- type: Boolean,
- default: false,
- },
- longTitle: {
- type: Boolean,
- default: false,
- },
- },
- computed: {
- titleImg() {
- return `url(${TitleImg})`
- },
- },
- }
- </script>
- <style lang="less" scoped>
- .title-box {
- width: 100%;
- height: 42px;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- padding-left: 28px;
- display: flex;
- align-items: center;
- position: relative;
- span {
- margin-left: 5px;
- //
- font-size: 15px;
- color: #ffffff;
- letter-spacing: 1px;
- font-weight: 700;
- }
- .more {
- width: 28px;
- height: 28px;
- position: absolute;
- top: 0;
- right: 20px;
- cursor: pointer;
- }
- }
- </style>
|