提交 8669a33a 编写于 作者: L liuxiaohang

bug(h5): 修复带协议iconPath在h5无法显示问题

上级 7cf26c6f
<template>
<uni-tabbar :class="['uni-tabbar-'+position]">
<div
:style="{backgroundColor:backgroundColor}"
class="uni-tabbar"
<div
:style="{backgroundColor:backgroundColor}"
class="uni-tabbar"
>
<div
:style="{backgroundColor:borderColor}"
class="uni-tabbar-border"
<div
:style="{backgroundColor:borderColor}"
class="uni-tabbar-border"
/>
<div
v-for="(item,index) in list"
:key="item.pagePath"
class="uni-tabbar__item"
@click="_switchTab(item,index)"
<div
v-for="(item,index) in list"
:key="item.pagePath"
class="uni-tabbar__item"
@click="_switchTab(item,index)"
>
<div class="uni-tabbar__bd">
<div
v-if="item.iconPath"
:class="{'uni-tabbar__icon__diff':!item.text}"
class="uni-tabbar__icon"
<div
v-if="item.iconPath"
:class="{'uni-tabbar__icon__diff':!item.text}"
class="uni-tabbar__icon"
>
<img :src="_getRealPath($route.meta.pagePath===item.pagePath?item.selectedIconPath:item.iconPath)">
<div
v-if="item.redDot"
:class="{'uni-tabbar__badge':!!item.badge}"
class="uni-tabbar__reddot"
<div
v-if="item.redDot"
:class="{'uni-tabbar__badge':!!item.badge}"
class="uni-tabbar__reddot"
>
{{ item.badge }}
</div>
</div>
<div
v-if="item.text"
<div
v-if="item.text"
:style="{color:$route.meta.pagePath===item.pagePath?selectedColor:color,fontSize:item.iconPath?'10px':'14px'}"
class="uni-tabbar__label"
class="uni-tabbar__label"
>
{{ item.text }}
<div
v-if="item.redDot&&!item.iconPath"
:class="{'uni-tabbar__badge':!!item.badge}"
class="uni-tabbar__reddot"
<div
v-if="item.redDot&&!item.iconPath"
:class="{'uni-tabbar__badge':!!item.badge}"
class="uni-tabbar__reddot"
>
{{ item.badge }}
</div>
......@@ -228,9 +228,6 @@ export default {
},
methods: {
_getRealPath (filePath) {
if (filePath.indexOf('/') !== 0) {
filePath = '/' + filePath
}
return getRealPath(filePath)
},
_switchTab ({
......@@ -259,4 +256,4 @@ export default {
}
}
}
</script>
</script>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册