安装vuex依赖包:
npm install vuex --save
导入vuex包
import Vuex from 'vuex'
Vue.use (Vuex)
创建 store 对象
const store = new Vuex.Store({
// st...
4年前 (2021-09-01)
喜欢
State —数据仓库
getter—用来获取数据的
可进行计算
Mutation——用来修改数据的
同步修改
Action —用来提交mutation
可进行异步操作
...
4年前 (2021-09-01)
喜欢
多个视图依赖于同一状态
读的作用
来自不同视图的行为需要改变同一个状态
改的作用
适用于中型大型页面使用。
...
4年前 (2021-09-01)
喜欢
Vuex是一个专门为Vue.js应用程序开的状态管理模式
它采用集中式存储管理应用的所有组件的状态
并以相应的规则保证以一种可预测的方式发生变化
Vuex 是实现组件全局状态(数据)管理的一种机制,可以方便的实现组件放数据的共享
...
4年前 (2021-09-01)
喜欢
监听click 判断params类型
myChart.on('click', function (params) {
if (params.seriesType == 'scatter') {
th...
4年前 (2021-09-01)
喜欢
drawLine2 () {
window.addEventListener('resize', this.drawLine2)
let myChart = this.$echarts.init(this.$refs.echarts2)
...
4年前 (2021-09-01)
喜欢
a{
text-decoration:none;
}
还有更加详细的设置。
a:link{
text-decoration:none;
/* 指正常的未被访问过的链接*/
}
a:visited{
text-decoration:none;
/*指已经访问过的...
4年前 (2021-09-01)
喜欢
drawLine () {
window.addEventListener('resize', this.drawLine)
let myChart = this.$echarts.init(this.$refs.echarts)
...
4年前 (2021-08-31)
喜欢
drawLine () {
window.addEventListener('resize', this.drawLine)
let myChart = this.$echarts.init(this.$refs.echarts)
...
4年前 (2021-08-31)
喜欢
drawLine () {
window.addEventListener('resize', this.drawLine)
let myChart = this.$echarts.init(this.$refs.echarts)
...
4年前 (2021-08-31)
喜欢