Fork me on GitHub
摘要: 1、vue2 使用 Options API (选项API),逻辑分散在 data, methods, props, filters, mounted, created 中 <template> <button @click="increment">count is: {{ count }}</but 阅读全文
posted @ 2024-01-02 14:25 锄田君 阅读(73) 评论(0) 推荐(0)
摘要: 一、生命周期 vue3在组合式API(Composition API)中使用生命周期钩子时需要先引入,vue2在选项API(Options API)中可以直接调用生命周期钩子 //vue3 <script setup> import { onMounted } from 'vue' onMounte 阅读全文
posted @ 2024-01-02 14:01 锄田君 阅读(223) 评论(0) 推荐(0)