![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
vue使用
Start°
这个作者很懒,什么都没留下…
展开
-
vue3全局变量定义及使用
定义全局变量const app = createApp({})app.config.globalProperties.$http = () => {}全局变量使用const { proxy } = getCurrentInstance()全局变量为null如果按照上述情况还是获取不到,检测是否写在自定义函数中,尝试写在setup函数中setup(){ const { proxy } = getCurrentInstance()}...原创 2021-12-24 09:35:15 · 2559 阅读 · 0 评论 -
vue-router编程式页面跳转
1. 不携带参数this.$router.push('/xxx')2. 通过query携带参数this.$router.push({ path: '/xxx', // 使用query携带参数,可以使用path,也可以是用name name: 'xxx', // 二者可以选其一 query:{ id: 1, }})// 页面路径表现http://localhost:8080/xxxx?id=1// 组件获取参数this.$route.quer原创 2021-04-30 21:57:32 · 304 阅读 · 1 评论 -
vue中e指代元素
currentTarge中, e指代绑定事件元素target中,e指代触发事件元素原创 2020-11-19 12:30:13 · 1642 阅读 · 0 评论