Skip to content

vc-virtual-list 添加props作为attr在dom上 #7919

@saltedFishSpikes

Description

@saltedFishSpikes

Version

4.2.5

Environment

"vue": "^3.4.29" , "ant-design-vue": "~4.2.3"

Reproduction link

https://github.com/vueComponent/ant-design-vue/tree/main/components/vc-virtual-list

Steps to reproduce

[Vue warn]: Failed setting prop "prefix" on <div>: value XY is invalid. TypeError: Cannot set property prefix of #<Element> which has only a getter

目前在select组件上遇到过,当使用options字段传入数据而非select-option,且数据中有类似prefix的属性会出现

demo:打开浏览器控制台后,展开select选项
https://codesandbox.io/p/sandbox/ji-ben-shi-yong-ant-design-vue-4-2-5-forked-jl5pxz?file=%2Fsrc%2Fdemo.vue

微信截图_20241107104032

微信截图_20241107104355

What is expected?

控制台没有警告

What is actually happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions