vue-update-query-mixin
v1.1.7
Published
Provided this.updateQuery(Object) mixin for updating query string, for Vue 1.x|2.x
Downloads
521
Readme
Vue update-query mixin
Intellectual property of Oneway.mobi
Requirements
- Vue 1.x | 2.x
- Vue Router 0.7.x | 2.x
Installation
npm i vue-update-query-mixin -S
Usage
// This is a Vue component
import updateQuery from 'vue-update-query-mixin'
export default {
mixins: [updateQuery],
...
}
From now on, this.updateQuery
is available within the component
Example
Current url: http://demo.com/#!/test?a=1&b=2
After Running: this.updateQuery({ a: 2, b: 3 })
url changed to: http://demo.com/#!/test?a=2&b=3
This mixin is based on
update-query