1.0.18 • Published 7 years ago
wp-vue-utilities v1.0.18
My Utilities for Vue.js
I use these in some of my applications.
This package require $ (jQuery) as global variable.
To install:
npm install --save-dev wp-vue-utilities
To import:
import WpVueUtilities from 'wp-vue-utilities';
/*In order to use AjaxForm*/
Vue.component('ajax-form', WpVueUtilities.AjaxForm);
To Use AjaxForm, an Example:
<template>
<ajax-form
:inputs="inputs"
:buttons="buttons"
:config="config"
>
</ajax-form>
</template>
<script>
export default {
data(){
return {
inputs: [
{
type: 'text',
name: 'address',
label: {
name: 'Address'
},
required: true
}
],
buttons: {
cancel: {
label: 'Cancel',
},
confirm: {
label: 'Confirm'
}
},
config: {
inputErrorClass: 'input-error',
responseOkRoute: {
name: 'list-sites'
},
postUrl: 'http://localhost/sites/create/'
}
};
}
}
</script>
There are more others options, check the code!
1.0.18
7 years ago
1.0.17
7 years ago
1.0.16
7 years ago
1.0.15
7 years ago
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
7 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago