1).main.js文件
import { createApp } from 'vue'
import App from './App.vue'
import './index.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import http from './utils/http'
const app = createApp(App)
app.config.globalProperties.$http = http //全局引入axios请求
app.use(ElementPlus)
app.mount('#app')
2).watch的写法
watch(route, (newValue, oldValue) => {
state.meta= newValue.meta
state.query=newValue.query
})
3). 字符串和对象的定义
const nodeName2 = ref('')
const state = reactive({
isEmpty: false,
listLoading: false,
})