提交 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 () {
...@@ -141,6 +145,7 @@ export default { ...@@ -141,6 +145,7 @@ export default {
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)
......
...@@ -42,7 +42,13 @@ ...@@ -42,7 +42,13 @@
<i <i
v-if="loading" v-if="loading"
class="uni-loading"/> class="uni-loading"/>
<img
v-if="titleImage!==''"
:src="titleImage"
class="uni-page-head__title_image" >
<template v-else>
{{ titleText }} {{ titleText }}
</template>
</div> </div>
</div> </div>
<div <div
...@@ -268,6 +274,12 @@ uni-page-head .uni-page-head__title .uni-loading { ...@@ -268,6 +274,12 @@ uni-page-head .uni-page-head__title .uni-loading {
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>
import appendCss from 'uni-platform/helpers/append-css' import appendCss from 'uni-platform/helpers/append-css'
...@@ -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.
先完成此消息的编辑!
想要评论请 注册