0.4.0 • Published 5 years ago

vue-static-data v0.4.0

Weekly downloads
57
License
MIT
Repository
github
Last release
5 years ago

Vue Static Data

Add staticData to Vue instances and watch in awe as it does nothing.

yarn add vue-static-data

Setup

import Vue from "vue"
import VueStaticData from "vue-static-data"

Vue.use(VueStaticData)

Usage

<template>
  <div>
    <button @click="updateStatic" v-text="staticProp" />
    <button @click="updateReactive" v-text="reactiveProp" />
  </div>
</template>

<script>
export default {
  // Object | Function
  staticData: () => ({
    staticProp: "static"
  }),
  data: () => ({
    reactiveProp: "reactive"
  }),
  methods: {
    updateStatic() {
      this.staticProp = "static clicked"
    },
    updateReactive() {
      this.reactiveProp = "reactive clicked"
    }
  }
}
</script>

Author

Matthew Wagerfield

License

MIT

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago