0.2.1 • Published 7 years ago

vue-dmstore v0.2.1

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

#DM Store

Vue plugin providing simple centralized state management

##INSTALLATION

npm i --save vue-dmstore

##USAGE

DMStore = require 'vue-dmstore'
Vue.use new DMStore

new Vue().$mount('#app')

Vue.extend # TICKET component...
  name: 'Ticket'
  template: '.ticket'
  data: ->
    state: {} # placeholder for DMStore component state
  mounted: ->
    Ticket.fetch_by_id(1234).then (ticket) =>
      @state = ticket # set initial component state from data
    .catch (err) ->
      console.log err

...and in the template (notice the custom MODEL attribute!)....

.ticket
  label Date
  input(type="text", v-state-model="state.date")
  label Location
  input(type="text", v-state-model="state.location")
0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago