| | |
| | | */ |
| | | import { ref, reactive, computed, nextTick } from "vue"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { clone } from "lodash"; |
| | | import { deepClone } from "@/utils/index.js" |
| | | |
| | | |
| | | /** |
| | | * 创建表单数据管理功能 |
| | |
| | | } |
| | | |
| | | // 向后兼容的默认导出 |
| | | export default function useFormDataSimple(initData) { |
| | | const form = reactive(clone(initData, true)); |
| | | export default function useFormDatas(initData) { |
| | | const form = reactive(deepClone(initData, true)); |
| | | |
| | | function resetForm() { |
| | | const initData2 = JSON.parse(JSON.stringify(initData)); |