form-create
form-create copied to clipboard
自定义title时,控制台给出警告。如何优雅的使用form.item的slot?
版本号: "@form-create/element-ui": "^3.1.13"
"element-plus": "^2.2.14" "vue": "^3.2.37"
问题:
自定义form-item的label的时候使用title属性:
{
type: "select",
field: "id",
title: {
title: " ",
children: [
{
type: "span",
children: ["选择"]
},
{
type: "span",
children: ["增加选择"],
style: "color:#409eff",
on: {
click: () => {
this.add();
}
}
}
]
}
chrome控制台给出警告:[Vue warn]: Failed setting prop "children" on <span>: value [object Object] is invalid. TypeError: Cannot set property children of #<Element> which has only a getter
期望的结果 :
- 控制台无警告
- 如何正确使用
form.item的slot?
ps: 警告在"@form-create/element-ui": "^3.1.2"、"element-plus": "^2.0.2"也会有。
感谢反馈 我这边检查一下
3.1.14版本已优化警告信息