mirror of
https://github.com/vform666/variant-form3-vite.git
synced 2024-11-10 09:39:20 +08:00
fix(vue3-generator): change instance.ctx to proxy
This commit is contained in:
parent
8d6c3d7fbc
commit
bab74d2869
@ -46,7 +46,7 @@ export const genVue3JS = function (formConfig, widgetList) {
|
|||||||
const instance = getCurrentInstance()
|
const instance = getCurrentInstance()
|
||||||
|
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
instance.ctx.$refs['vForm'].validate(valid => {
|
instance.proxy.$refs['vForm'].validate(valid => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
|
|
||||||
//TODO: 提交表单
|
//TODO: 提交表单
|
||||||
@ -54,7 +54,7 @@ export const genVue3JS = function (formConfig, widgetList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
instance.ctx.$refs['vForm'].resetFields()
|
instance.proxy.$refs['vForm'].resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user