vue-element-plus-admin
vue-element-plus-admin copied to clipboard
UseForm如何动态绑定数值
您好,我是Element Plus 的新用户,感谢您提供了这样一个框架。我很喜欢Form的封装,很方便。但是该如何动态为里面的组件赋值呢? 比如我该如何获取其中一个input/option的值?又该如何对其进行动态赋值?EP 有 v-model,但是本项目的Form没有找到相应的方法。另外,从api获取下来的数据,要想进行结合是否只能对获取到的res.data对象进行map后然后将api的值分别写到相应Form组件中?非常感谢赐教!再次感谢。
如下图: 我想在schema数据中的另一个input组件对下图的option进行值操作,应该如何实现?
{
field: 'name',
label: 'test',
component: 'Input',
colProps: {
span: 16,
onInput: () => {
setValues({
})
}
}
},
我试着在 schema中加入 ref 但是无效
{
field: 'name',
label: 'test',
component: 'Input',
ref: 'ref_name',
colProps: {
span: 16,
onInput: () => {
console.log(proxy.$refs.ref_name)
}
}
},

同问,请问Form的Api是怎么用的?
我这样写没有效果
any fixes?