喜欢标题,关于链接:
新的script setup(不含参考糖)
<template>
<TopNavbar title="room" />
<div>
{{ no }}
</div>
</template>
<script setup>
import TopNavbar from '@/layout/TopNavbar.vue'
import { defineProps, reactive } from 'vue'
defineProps({
no: String
})
const state = reactive({
room: {}
})
const init = async () => {
// I want use props in this
// const { data } = await getRoomByNo(props.no)
// console.log(data);
}
init()
</script>
<style>
</style>
Run Code Online (Sandbox Code Playgroud)