xaboy / form-create

:fire::fire::fire: 强大的低代码动态表单组件,通过JSON数据驱动表单渲染,适配移动端,支持可视化设计。提高开发者对表单的开发效率。目前在政务系统、OA系统、ERP系统、电商系统、流程管理等系统中已稳定应用。
https://www.form-create.com/
MIT License
6.08k stars 978 forks source link

resetFields方法不生效 #734

Open lu-yanpeng opened 3 days ago

lu-yanpeng commented 3 days ago

版本

@form-create/element-ui@3.2.12 vue@3.5.12 element-plus@2.8.6

问题

<script setup lang="ts">
import { ref } from 'vue'

const fApi = ref(null);
// ...其他代码

const onReset = () => {
  // 不生效也不报错
  fApi.value.resetFields()
}
</script>

<template>
  <div>
    <form-create :rule="rule" v-model:api="fApi" :option="options"/>
    <el-button @click="onReset ">重置</el-button>
  </div>
</template>

vue3.5.12的项目里,调用fApi的resetFields方法不生效也不报错,debugger的时候也不会进入到函数里面。试了一下api的几个方法都不行,好像关于formApi的所有方法都不会生效。回退到vue 3.4.38版本就正常

xaboy commented 1 day ago

感谢反馈,我这边检查一下