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" />
Example
For More, please check theBuild
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