vue-gscope
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

vue-scope

To start:

$ npm install

To build your plugin:

$ npm run build

usage

npm install vue-gscope --save-dev
import VueScope from "vue-gscope";
 
const states = {
    app: {
        activePanel: false
    },
    user: {
        name: "xxx"
    }
};
 
const scope = new VueScope.Scope(states);
 
Vue.use(VueScope, scope);
 
// usage in component
console.log(this.$scope.user);
<template>
    <div class="userinfo">
        {{$scope.user.name}}
    </div>
</template>

Package Sidebar

Install

npm i vue-gscope

Weekly Downloads

5

Version

0.0.2

License

MIT

Unpacked Size

132 kB

Total Files

15

Last publish

Collaborators

  • x373241884y