vue3element-plus警告 [Vue warn]: Invalid prop: type check failed for prop “content“. Expected String w

在Vue应用中遇到一个警告,提示content属性的类型检查失败,预期为字符串但接收到的是数字。问题出在尝试用引号包裹的变量(scope.row.remarks)作为el-popover的content,而应该直接使用变量,避免字符串化。
摘要由CSDN通过智能技术生成

runtime-core.esm-bundler.js:38 [Vue warn]: Invalid prop: type check failed for prop "content". Expected String with value "10", got Number with value 10. 

错误:

        

<el-popover

                    placement="top-start"

                    :width="150"

                    trigger="hover"

                    :content="scope.row.remarks"

                    effect="dark">

                    <template #reference>

                      {{ scope.row.remarks }}

                    </template>

                  </el-popover>

主要原因:

 el-popover 的可扩展使用 是在内部写扩展内容

不能使用引号 的方式写变量

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值