|
|
@@ -1,11 +1,17 @@
|
|
|
<template>
|
|
|
<div class="base-header">
|
|
|
- <slot></slot>
|
|
|
+ <slot name="title" v-if="$slots.title"></slot>
|
|
|
+ <span v-else class="title">{{ title }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-export default { name: 'BaseHeader' }
|
|
|
+export default {
|
|
|
+ name: 'BaseHeader',
|
|
|
+ props: {
|
|
|
+ title: { type: String, default: '' }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -20,5 +26,17 @@ export default { name: 'BaseHeader' }
|
|
|
font-weight: 500;
|
|
|
background-size: cover;
|
|
|
background-image: url('@/assets/image/common/header-bg.png');
|
|
|
+ .title {
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ padding: 0 0.08rem;
|
|
|
+ width: 100%;
|
|
|
+ height: 0.48rem;
|
|
|
+ color: #ffffff;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|