摘要:
1: 常见事件修饰符: 1.1: .stop 等同于javaScript 中的event.stopPropagation(); 防止事件冒泡; 1.2: .prevent: 等同于javaScript 中event.preventDefault(); 防止执行预设的行为。 1.3: .capture 阅读全文
posted @ 2022-05-17 21:31
月花夕沉
阅读(769)
评论(0)
推荐(0)
摘要:
一、什么是Vuex 官网:Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式。它采用集中式存储管理应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化。Vuex 也集成到 Vue 的官方调试工具 devtools extension ,提供了诸如零配置的 time-tr 阅读全文
posted @ 2022-05-17 21:14
月花夕沉
阅读(2181)
评论(0)
推荐(0)
摘要:
1.this. $router.push( ) 跳转到指定的URL,在history栈中添加一个记录,点击后退会返回上一个页面。 1. 不带参数 // 字符串 this.$router.push('/home') this.$router.push('/home/first') // 对象 this 阅读全文
posted @ 2022-05-17 20:50
月花夕沉
阅读(417)
评论(0)
推荐(0)
摘要:
vue-new Vue参数对象 new Vue参数对象 在脚手架cli2中是这样写的: new Vue({ el: '#app', router, store, components: { App }, template: '<App/>' }) 在脚手架cli3中是这样写的: new Vue({ 阅读全文
posted @ 2022-05-17 20:46
月花夕沉
阅读(143)
评论(0)
推荐(0)

浙公网安备 33010602011771号