Skip to content

Commit

Permalink
fix: 解决titleNView内button未设置text导致报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Mar 8, 2019
1 parent 87b4886 commit d19275e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/uni-h5/dist/index.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/uni-h5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-h5",
"version": "0.3.0",
"version": "0.3.1",
"description": "uni-app h5",
"main": "dist/index.umd.min.js",
"scripts": {
Expand Down
24 changes: 12 additions & 12 deletions src/platforms/h5/components/page/pageHead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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>
Expand Down Expand Up @@ -89,8 +89,8 @@
</template>
</div>
</div>
<div
v-if="type!=='transparent'"
<div
v-if="type!=='transparent'"
class="uni-placeholder"/>
</uni-page-head>
</template>
Expand Down Expand Up @@ -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'
}
Expand Down

0 comments on commit d19275e

Please sign in to comment.