This commit is contained in:
xiangheng
2024-07-05 10:54:58 +08:00
parent deb2b51595
commit abdbfcacc1
2 changed files with 7 additions and 2 deletions

View File

@@ -88,7 +88,10 @@ onMounted(() => {
}) })
const elFormRef = shallowRef<FormInstance>() const elFormRef = shallowRef<FormInstance>()
function getData() { function getData() {
return new Promise((resolve, reject) => { return new Promise<{
formData: any
target: string
}>((resolve, reject) => {
elFormRef.value.validate((valid) => { elFormRef.value.validate((valid) => {
if (!valid) { if (!valid) {
reject({ target: this.tabName }) reject({ target: this.tabName })

View File

@@ -16,7 +16,9 @@ function getFieldWidgets() {
return fieldList return fieldList
} }
function getData() { function getData() {
return new Promise((resolve, reject) => { return new Promise<{
formData: any
}>((resolve, reject) => {
try { try {
const jsonData = designerRef.value.getFormJson() const jsonData = designerRef.value.getFormJson()
console.log('jsonData', jsonData) console.log('jsonData', jsonData)