From bab74d28698c55afb7182d25ea1f8381485ad2d4 Mon Sep 17 00:00:00 2001 From: parz1 Date: Wed, 27 Jul 2022 17:53:43 +0800 Subject: [PATCH] fix(vue3-generator): change instance.ctx to proxy --- src/utils/vue3js-generator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/vue3js-generator.js b/src/utils/vue3js-generator.js index 09a6208..9a2daa6 100644 --- a/src/utils/vue3js-generator.js +++ b/src/utils/vue3js-generator.js @@ -46,7 +46,7 @@ export const genVue3JS = function (formConfig, widgetList) { const instance = getCurrentInstance() const submitForm = () => { - instance.ctx.$refs['vForm'].validate(valid => { + instance.proxy.$refs['vForm'].validate(valid => { if (!valid) return //TODO: 提交表单 @@ -54,7 +54,7 @@ export const genVue3JS = function (formConfig, widgetList) { } const resetForm = () => { - instance.ctx.$refs['vForm'].resetFields() + instance.proxy.$refs['vForm'].resetFields() } return {