Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onewaytech/vue-update-query-mixin
Provided this.updateQuery(Object) mixin for updating query string, for Vue 1.x | 2.x
https://github.com/onewaytech/vue-update-query-mixin
mixin query update vue
Last synced: 23 days ago
JSON representation
Provided this.updateQuery(Object) mixin for updating query string, for Vue 1.x | 2.x
- Host: GitHub
- URL: https://github.com/onewaytech/vue-update-query-mixin
- Owner: OneWayTech
- Created: 2016-12-28T08:21:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-10T11:17:57.000Z (almost 8 years ago)
- Last Synced: 2024-12-23T18:13:26.071Z (30 days ago)
- Topics: mixin, query, update, vue
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue update-query mixin
[![npm version][npm-v-img]][npm-url]
[![npm download][npm-dl-img]][npm-url]> Intellectual property of [Oneway.mobi](http://www.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`](https://github.com/kenberkeley/update-query)
[npm-url]: https://www.npmjs.com/package/vue-update-query-mixin
[npm-v-img]: http://img.shields.io/npm/v/vue-update-query-mixin.svg
[npm-dl-img]: http://img.shields.io/npm/dm/vue-update-query-mixin.svg