feat: 回显表单

This commit is contained in:
2026-01-21 16:24:56 +08:00
parent 542583efc6
commit 1c49dc25b1
3 changed files with 59 additions and 8 deletions

View File

@@ -7,7 +7,10 @@
class="logo"
/>
</div>
<div class="header-right flex align-center">
<div
class="header-right flex align-center"
@click="handleBtnClick"
>
<div class="text">{{ btnText }}</div>
<img
src="@/assets/images/award/arrow.png"
@@ -89,7 +92,11 @@
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { ref, computed, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const showQRcode = ref(false)
const handleCloseQRcode = () => {
@@ -106,6 +113,30 @@
return 'Back to Introduction'
}
})
watch(
() => route.path,
val => {
console.log('val', val)
if (val.includes('apply')) {
btnType.value = 'form'
} else {
btnType.value = 'index'
}
console.log('btnType', btnType.value)
},
{
immediate: true
}
)
const handleBtnClick = () => {
if (btnType.value === 'index') {
router.push('/award/apply')
} else {
router.push('/award/index')
}
}
</script>
<style lang="less" scoped>