Sun Jun 4 15:48:00 UTC 2023 inscode

上级 a5450115
......@@ -8,13 +8,13 @@ import TheWelcome from './components/TheWelcome.vue'
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<HelloWorld msg="You did ithahahh!" />
</div>
</header>
<main>
<!-- <main>
<TheWelcome />
</main>
</main> -->
</template>
<style scoped>
......
<script setup>
import { onMounted, onUpdated, reactive,ref } from 'vue';
const obj=reactive({
name:'kjp'
})
const ha=ref(6)
console.log('22222')
defineProps({
msg: {
type: String,
required: true
}
})
function edit(){
obj.name='ppppp'
ha.value=77
}
onMounted(()=>{
console.log('555555')
console.log(ha.value)
})
onUpdated(()=>{
console.log()
})
</script>
<template>
......@@ -15,6 +33,8 @@ defineProps({
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
<a target="_blank" href="https://vuejs.org/">Vue 3</a>.
</h3>
<h2>姓名:{{ obj.name }}</h2>年龄:{{ ha }}
<button @click='edit'>修改名字</button>
</div>
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册