generated from duanshuwen/webapp-vue-frontend
feat: 问卷功能开发
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
<template>
|
||||
<van-button @click="handleClick">跳转记录</van-button>
|
||||
<Layout>
|
||||
<template #title>{{ questionnaire.title }}</template>
|
||||
|
||||
<div class="list">
|
||||
{{ questionnaire.questions }}
|
||||
</div>
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<script setup name="home">
|
||||
import { getSurveyQuestionnaireUsingGet } from '@api'
|
||||
const router = useRouter()
|
||||
|
||||
// 跳转按钮操作
|
||||
@@ -10,13 +17,19 @@ const handleClick = () => {
|
||||
console.log('跳转记录')
|
||||
}
|
||||
|
||||
const questionnaire = ref({})
|
||||
const getQuestionnaire = async () => {
|
||||
questionnaire.value = await getSurveyQuestionnaireUsingGet({})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
console.log('onMounted')
|
||||
})
|
||||
|
||||
onActivated(() => {
|
||||
console.log('onActivated')
|
||||
getQuestionnaire()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
section {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user