uni-app<icon>标签type不生效问题

更新时间:2023-07-01 08:55:32 阅读: 评论:0

uni-app<icon>标签type不⽣效问题
肝硬化的原因
uni-app 标签type不⽣效问题
问题场景描述
登录页⾯密码框可见与不可见使⽤组件时,type为eye-filled和eye-slash-filled的类型时,图标未正常显⽰。经查阅资料:是由于项⽬中使⽤ uni-ui 的 uni-icon 组件与H5 平台新增内置 的icon 组件命名冲突导致的。
代码⽰例
<view v-if="password">
<icon v-if="isShowP" @click="isShowP = fal" class="uIconR" type="eye-filled" color="#8a8a8a"
size="20"></icon>
橘饼<icon v-el class="uIconR" @click="isShowP = true" type="eye-slash-filled" color="#8a8a8a" size="20">
</icon>
</view>
解决⽅法
⾃⼰重新引⼊组件,并起别名。
代码如下:
午安问候语
<template>
<view v-if="password">
<uniIcons v-if="isShowP" @click="isShowP = fal" class="uIconR" type="eye-filled" color="#8a8a8a"
size="20"></uniIcons>
<uniIcons v-el class="uIconR" @click="isShowP = true" type="eye-slash-filled" color="#8a8a8a" size="20">
忠爱一生</uniIcons>
优昙
</view>
</template>
<script>
import uniIcons from '../../components/uni/uni-icons/uni-icons.vue'
export default{
components:{uniIcons:uniIcons},
data(){
return{
urname:'',
找自己password:'',
isShowP: true
}
鱼滑的做法}
歌曲的英语
}
</script>

本文发布于:2023-07-01 08:55:32,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1071842.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:组件   可见   平台   问题   肝硬化
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图