0.0.12 • Published 5 years ago

vue-plugin-helper-decorator v0.0.12

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

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')
  }
}
0.0.12

5 years ago

0.0.11

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago