Sun Jun 4 15:48:00 UTC 2023 inscode

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