vue-plugin-helper-decorator

A bundle of decorator for using vue plugin
38,383 3
Install
npm install vue-plugin-helper-decorator
Latest Version:0.0.12
Vue:2
License:MIT
Last Updated:Nov 5, 2019
Links: GitHub  ·  npm
Maintainer: kc_vip30

Vue Plugin Helper Decorator

npm Build Status

This library fully depends on vue-class-component.

Description

It helps for using vue plugins.

Now support:

License

MIT License

Install

npm i -S vue-plugin-helper-decorator

Usage

// In component
import { required } from 'vuelidate/lib/validators'
import { SocketIO, Validation, OnIdle, OnActive } from 'vue-plugin-helper-decorator'
@Component({})
export class DummyComponent extends Vue {
  @SocketIO({
    name: 'reconnect' // can declare your custom event name / names
  })
  public myReconnect() {
    console.log('reconnect')
  }

  @Validation()
  public validationObject() {
    return {
      name: {
        required
      }
    }
  }
  
  @OnIdle()
  public whenIdle() {
    console,log('Idle now')
  }
  
  @OnActive()
  public whenActive() {
    console,log('Active now')
  }
}

Related Packages

@21cnfe/onekit-mp-cli

小程序框架开发工具

1,063
duplicate-dependencies-webpack-plugin

webpack plugin to find duplicated dependencies from your bundle

332,104 6
@debut/plugin-report

Report generation for strategy backtesting in debut

4,011 18
@amilochau/core-vue3

Core plugin for vue.js (v3) projects

3,802 0
@lg2/nuxt3-plugin-link-resolver

link resolver plugin fro nuxt3

3,544 0

Version History

Version Released License
0.0.12 MIT
0.0.11 MIT
0.0.9 MIT
0.0.8 MIT
0.0.7 MIT