Skip to content

vue3.0的jsx中表单组件的v-modal不能正常使用 #6844

@mizhicangyue

Description

@mizhicangyue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.0.0-rc.6

Environment

macOS ventura | chrome:115.0.5790.170(正式版本) (arm64) | antdv:4.0.0

Reproduction link

https://www.antdv.com/components/input-cn

Steps to reproduce

1.写一个在jsx中用Input的demo
2.代码如下
import {defineComponent, ref} from "vue";
import {Button, Input,} from "ant-design-vue";
export default defineComponent({
setup(props) {
const value = ref('hello')

return () => {
return



<Button onClick={()=>{
console.log(value.value)
}}>提交

} } })

What is expected?

能够正常的完成v-modal双向数据绑定

What is actually happening?

点击按钮去展示值的时候报错
runtime-core.esm-bundler.js:221 Uncaught TypeError: Assignment to constant variable.
at onUpdate:value (issue.jsx:16:43)
at callWithErrorHandling (runtime-core.esm-bundler.js:158:18)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:17)
at emit (runtime-core.esm-bundler.js:664:5)
at runtime-core.esm-bundler.js:7422:45
at triggerChange (Input.js:113:7)
at callWithErrorHandling (runtime-core.esm-bundler.js:158:18)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:17)
at emit (runtime-core.esm-bundler.js:664:5)
at runtime-core.esm-bundler.js:7422:45

截屏2023-08-13 17 55 10

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