提交 d19275ef 编写于 作者: Q qiang

fix: 解决titleNView内button未设置text导致报错的问题

上级 87b48861
{
"name": "@dcloudio/uni-h5",
"version": "0.3.0",
"version": "0.3.1",
"description": "uni-app h5",
"main": "dist/index.umd.min.js",
"scripts": {
......
......@@ -6,12 +6,12 @@
class="uni-page-head"
>
<div class="uni-page-head-hd">
<div
v-show="backButton"
class="uni-page-head-btn"
<div
v-show="backButton"
class="uni-page-head-btn"
@click="_back">
<i
:style="{color:color,fontSize:'27px'}"
<i
:style="{color:color,fontSize:'27px'}"
class="uni-btn-icon">&#xe601;</i>
</div>
<template v-for="(btn,index) in btns">
......@@ -32,15 +32,15 @@
</div>
</template>
</div>
<div
v-if="!searchInput"
<div
v-if="!searchInput"
class="uni-page-head-bd">
<div
:style="{fontSize:titleSize,opacity:type==='transparent'?0:1}"
class="uni-page-head__title"
>
<i
v-if="loading"
<i
v-if="loading"
class="uni-loading"/>
{{ titleText }}
</div>
......@@ -89,8 +89,8 @@
</template>
</div>
</div>
<div
v-if="type!=='transparent'"
<div
v-if="type!=='transparent'"
class="uni-placeholder"/>
</uni-page-head>
</template>
......@@ -371,7 +371,7 @@ export default {
btn.fontFamily = fontFamily
}
btn.color = this.type === 'transparent' ? '#fff' : (btn.color || this.textColor)
let fontSize = btn.fontSize || (this.type === 'transparent' || btn.text.indexOf('\\u') >= 0 ? '22px' : '27px')
let fontSize = btn.fontSize || (this.type === 'transparent' || /\\u/.test(btn.text) ? '22px' : '27px')
if (/\d$/.test(fontSize)) {
fontSize += 'px'
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册