|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="page padding bg page-full">
|
|
<div class="page padding bg page-full">
|
|
- <form-create v-model="formData" v-model:api="fapi" :rule="rule" :option="option" @submit="onSubmit"></form-create>
|
|
|
|
|
|
+ <form-create v-if="show" v-model="formData" v-model:api="fapi" :rule="rule" :option="option" @submit="onSubmit"></form-create>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -31,6 +31,7 @@ const route = useRoute()
|
|
|
|
|
|
const code = route.path.replace('/designerPage/', '').replace('/designer/', '')
|
|
const code = route.path.replace('/designerPage/', '').replace('/designer/', '')
|
|
|
|
|
|
|
|
+const show = ref(false)
|
|
const option = ref({})
|
|
const option = ref({})
|
|
const rule = ref([])
|
|
const rule = ref([])
|
|
const fapi = ref(null)
|
|
const fapi = ref(null)
|
|
@@ -38,13 +39,14 @@ const formData = ref({})
|
|
|
|
|
|
api.get(code).then((res) => {
|
|
api.get(code).then((res) => {
|
|
if (res.content) {
|
|
if (res.content) {
|
|
- const data = JSON.parse(res.content)?.[0]
|
|
|
|
|
|
+ const data = JSON.parse(res.content)?.[0]
|
|
option.value = formCreate.parseJson(data?.options)
|
|
option.value = formCreate.parseJson(data?.options)
|
|
- rule.value = formCreate.parseJson(data?.rule)
|
|
|
|
|
|
+ rule.value = formCreate.parseJson(data?.rule)
|
|
|
|
+ show.value = true
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
-const onSubmit = (formData) => {
|
|
|
|
- //todo 提交表单
|
|
|
|
|
|
+const onSubmit = () => {
|
|
|
|
+ //todo 提交表单
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|