03 2024 档案

摘要:众所周知,vue2有生命周期,而vue3也有 而vue2的created和beforecreated在vue3中都由setup替代了 <script setup lang="ts"> import { onBeforeMount, onMounted, onBeforeUpdate, onUpdat 阅读全文 »
posted @ 2024-03-13 16:51 文采呱呱 阅读(11) 评论(0) 推荐(0) 编辑
摘要:父组件 <script setup lang="ts"> import person from '@/components/person.vue' import { ref, reactive, defineProps } from 'vue' import { type Person } from 阅读全文 »
posted @ 2024-03-13 15:49 文采呱呱 阅读(10) 评论(0) 推荐(0) 编辑
摘要:储存标记中的内容 <template> <div class="about"> <h1 ref="Holly">你好</h1> <button @click="hhh">点击输出上述h1</button> </div> </template> <script lang="ts" setup> imp 阅读全文 »
posted @ 2024-03-07 22:24 文采呱呱 阅读(7) 评论(0) 推荐(0) 编辑
摘要:<template> <div class="about"> <p>情况一,监事ref的值</p> <h1>求和 {{sum}}</h1> <button @click="changeSum">++++</button> </div> </template> <script lang="ts" se 阅读全文 »
posted @ 2024-03-03 22:00 文采呱呱 阅读(86) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示