1.0.8 • Published 5 years ago

dystore v1.0.8

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

dystore

vue数据仓库

安装

npm install dystore --save

快速开始

  • 安装
import dystore from 'dystore'
let store = {
  test:"123"
}
Vue.use(dystore,store)
  • 数据仓库
let a = this.$store.state.data1
this.$store.state.test = '456'
  • mapState
import { mapState } from 'dystore'

{
  ...,
  computed:{
    ...mapState({
      test:'state.data1'
    })
  },
  ...
}

赋值(可以直接赋值)
this.test='123'
取值
<div>{{ test }}</div> 
  • event-bus
this.$store.$emit('testevent','123')

this.$store.$on('testevent',(res)=>{
    console.log(res)
})
  • chrome调试工具(应用商店搜索dystore)

点击下载

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago