Switch

GITHUB

To create switch (handler, toggle) element use this component.


Code:

  
HTML
<fvSwitch v-model="input" />
  
Javascript
export default { data () { return { input: undefined } } }

Examples:





Notes:


    API:

    NameTypeDefaultDescription
    value
    ---
    ---
    Value of input
    required
    Boolean or Function
    false
    Does input required to be ON? Also with function type you can pass function with one argument (fn(value){}) and return Boolean value.
    disabled
    Boolean
    false
    Does input disabled?
    onValue
    ---
    true
    Export value when handler is ON.
    offValue
    ---
    false
    Export value when handler is OFF.