摘要:
1、优点 代码功能模块化,复用代码 2、建立 新建hooks文件夹,在src下 src/hooks/use功能.js 3、案例 a、模块化 src/hooks/usepoint.js import { reactive, onMounted, onBeforeUnmount} from 'vue'; 阅读全文
posted @ 2025-01-10 11:05
市丸银
阅读(35)
评论(0)
推荐(0)
摘要:
vue.config.js const { defineConfig } = require('@vue/cli-service') const {DefinePlugin} = require('webpack') module.exports = defineConfig({ transpile 阅读全文
posted @ 2025-01-10 10:14
市丸银
阅读(301)
评论(0)
推荐(0)
摘要:
一、引入 ,写在setup里面 import {onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted} from 'vue'; 二、与Vue2的关系 setup() > beforecrea 阅读全文
posted @ 2025-01-10 10:06
市丸银
阅读(61)
评论(0)
推荐(0)
摘要:
1、watch:既要指明监视的属性,也要指明监视的回调 2、watchEffect:不要指明监视的属性,监视的回调用哪个属性,就监视哪个属性 3、语法 a、引入 import { watchEffect } from 'vue'; b、使用 // 不用指明监视属性,监视回调中使用的属性 watchE 阅读全文
posted @ 2025-01-10 08:41
市丸银
阅读(41)
评论(0)
推荐(0)

浙公网安备 33010602011771号