Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

以[渲染组件方式]编写表单组件,监听事件不触发 #35

Closed
zcjunblog opened this issue Aug 5, 2021 · 1 comment
Closed

Comments

@zcjunblog
Copy link

zcjunblog commented Aug 5, 2021

文档中的例子:
{ label: '店铺类型', ... component: { ... // 监听事件 on: { change: (val) => { // 注意使用箭头函数 console.log(val) } } ... } }
change事件无法触发
修改为
{ label: "店铺类型", ... component: { name: "el-input", onchange: (val) => { console.log(val) } }, },
有效

@icssoa
Copy link
Collaborator

icssoa commented Oct 13, 2021

文档中的例子: { label: '店铺类型', ... component: { ... // 监听事件 on: { change: (val) => { // 注意使用箭头函数 console.log(val) } } ... } } change事件无法触发 修改为 { label: "店铺类型", ... component: { name: "el-input", onchange: (val) => { console.log(val) } }, }, 有效

vue3 中:
component: { name: 'el-input', props: { onChange(val) { ... } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants