vue-query-sync
v0.1.0
Published
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm package](https://img.shields.io/npm/v/vue-query-sync.svg)](https://www.npmjs.org/package/vue-query-sync) [![downloads](https://img.shields.i
Downloads
8
Readme
Vue Query Sync
A Vue2.x directive to update your query strings after each input and sync your form elements with your search bar to having refresh-proof forms.
Installation
npm i vue-query-sync
Dependencies
- VueJs 2.6.x
- Vue Router 3.x
Usage
import VueQuerySync from 'vue-query-sync'
Vue.use(VueQuerySync)
// or
Vue.directive('query', VueQuerySync)
<!-- Automatically adds ?state=myValue query after typing. -->
<input v-query="country" />
<!-- Automatically adds ?city=myValue query after typing and two way binds the input value with query string. -->
<input v-query:sync="city" />
For More, please check the Example
Build
npm run build
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Contributors
Kaan Gökdemir - Author (@kaangokdemir) - kaangokdemir.com
License
MIT