Showing
2 changed files
with
12 additions
and
2 deletions
| ... | @@ -35,7 +35,7 @@ const keepPages = computed(() => store.getKeepPages); | ... | @@ -35,7 +35,7 @@ const keepPages = computed(() => store.getKeepPages); |
| 35 | 35 | ||
| 36 | // // TAG: 全局设置页面标题 | 36 | // // TAG: 全局设置页面标题 |
| 37 | // const $route = useRoute(); | 37 | // const $route = useRoute(); |
| 38 | -watchEffect(() => useTitle("表单标题")); | 38 | +// watchEffect(() => useTitle("表单标题")); |
| 39 | // 监听路由变化 | 39 | // 监听路由变化 |
| 40 | // 切换路由页面返回顶部 | 40 | // 切换路由页面返回顶部 |
| 41 | const $router = useRouter(); | 41 | const $router = useRouter(); | ... | ... |
| ... | @@ -57,7 +57,16 @@ | ... | @@ -57,7 +57,16 @@ |
| 57 | <script setup> | 57 | <script setup> |
| 58 | import "@vant/touch-emulator"; | 58 | import "@vant/touch-emulator"; |
| 59 | import { createComponentType } from "@/hooks/useComponentType"; | 59 | import { createComponentType } from "@/hooks/useComponentType"; |
| 60 | -import _ from "lodash"; | 60 | +import { |
| 61 | + Cookies, | ||
| 62 | + $, | ||
| 63 | + _, | ||
| 64 | + axios, | ||
| 65 | + storeToRefs, | ||
| 66 | + mainStore, | ||
| 67 | + Toast, | ||
| 68 | + useTitle, | ||
| 69 | +} from "@/utils/generatePackage.js"; | ||
| 61 | import { useRoute } from "vue-router"; | 70 | import { useRoute } from "vue-router"; |
| 62 | import { queryFormAPI } from "@/api/form.js"; | 71 | import { queryFormAPI } from "@/api/form.js"; |
| 63 | import { addFormDataAPI } from "@/api/data.js"; | 72 | import { addFormDataAPI } from "@/api/data.js"; |
| ... | @@ -152,6 +161,7 @@ onMounted(async () => { | ... | @@ -152,6 +161,7 @@ onMounted(async () => { |
| 152 | .setAttribute("style", `background-color: ${styleColor.backgroundColor}`); | 161 | .setAttribute("style", `background-color: ${styleColor.backgroundColor}`); |
| 153 | const { data } = await queryFormAPI({ form_code: $route.query.code }); | 162 | const { data } = await queryFormAPI({ form_code: $route.query.code }); |
| 154 | const form_data = data[0]; | 163 | const form_data = data[0]; |
| 164 | + useTitle(form_data.name); | ||
| 155 | // 重构数据结构 | 165 | // 重构数据结构 |
| 156 | let page_header = {}; | 166 | let page_header = {}; |
| 157 | let page_form = []; | 167 | let page_form = []; | ... | ... |
-
Please register or login to post a comment