提交 302d2575 编写于 作者: W wangyaqi

update: 新增H5端titleImage配置

上级 910b3d01
...@@ -132,6 +132,10 @@ export default { ...@@ -132,6 +132,10 @@ export default {
default () { default () {
return {} return {}
} }
},
titleImage: {
type: String,
default: ''
} }
}, },
data () { data () {
...@@ -140,7 +144,8 @@ export default { ...@@ -140,7 +144,8 @@ export default {
backButton: !this.isQuit && !this.$route.meta.isQuit, // redirectTo,reLaunch时可能动态修改 meta.isQuit backButton: !this.isQuit && !this.$route.meta.isQuit, // redirectTo,reLaunch时可能动态修改 meta.isQuit
backgroundColor: this.navigationBarBackgroundColor, backgroundColor: this.navigationBarBackgroundColor,
textColor: this.navigationBarTextStyle === 'black' ? '#000' : '#fff', textColor: this.navigationBarTextStyle === 'black' ? '#000' : '#fff',
titleText: this.navigationBarTitleText, titleText: this.navigationBarTitleText,
titleImage: this.titleImage,
duration: '0', duration: '0',
timingFunc: '' timingFunc: ''
}, this.titleNView) }, this.titleNView)
......
...@@ -41,8 +41,14 @@ ...@@ -41,8 +41,14 @@
> >
<i <i
v-if="loading" v-if="loading"
class="uni-loading"/> class="uni-loading"/>
{{ titleText }} <img
v-if="titleImage!==''"
:src="titleImage"
class="uni-page-head__title_image" >
<template v-else>
{{ titleText }}
</template>
</div> </div>
</div> </div>
<div <div
...@@ -267,6 +273,12 @@ uni-page-head .uni-page-head__title .uni-loading { ...@@ -267,6 +273,12 @@ uni-page-head .uni-page-head__title .uni-loading {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-top: -3px; margin-top: -3px;
}
uni-page-head .uni-page-head__title .uni-page-head__title_image {
width: auto;
height: 20px;
vertical-align: middle;
} }
</style> </style>
<script> <script>
...@@ -341,6 +353,10 @@ export default { ...@@ -341,6 +353,10 @@ export default {
default () { default () {
return false return false
} }
},
titleImage: {
type: String,
default: ''
} }
}, },
data () { data () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册