xaboy / form-create-designer

好用的Vue低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。
https://view.form-create.com/
MIT License
1.55k stars 359 forks source link

"vue": "^3.4.31","element-plus": "^2.7.2",使用回显设计表单找不到函数方法 #149

Open haioa opened 1 month ago

haioa commented 1 month ago

<fc-designer ref="designer" :config="config" height="100%" />

<script setup>
import { ref, reactive, onMounted, watch } from 'vue'
const designer = ref()
//初始化动态表单数据
const getRemoteModel = (data) => {
    designer.value.setJson(data)
}
//初始化动态表单配置
const getRemoteOptions = (optionsJson) => {
    designer.value.setOptions(optionsJson)
}

designer.value.setJson is not a function image

haioa commented 1 month ago

"@form-create/designer": "^3.2.3",

yxcboss commented 1 month ago

可以试下用designer.value.setRule(data)