使用uni-data-select下拉选择器报错

文章报道了在Vue应用中使用uni-icons组件时遇到的警告,指出可能是因为自闭合标签书写错误。解决方法是确保正确注册组件并提供name选项,将`<uni-icons/>`改为`<uni-icons><uni-icons/></uni-icons>`。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错:

[Vue warn]: Unknown custom element: <uni-icons> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <UniDataSelect> at uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue
       <UTransition> at uni_modules/uview-ui/components/u-transition/u-transition.vue
         <UPopup> at uni_modules/uview-ui/components/u-popup/u-popup.vue

原因:

查看源码发现使用的是自闭和标签<uni-icons /> 修改成<uni-icons> <uni-icons />即可

解决:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值