Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/viur-framework/vi-vue-utils
A library for communication with the ViUR Core
https://github.com/viur-framework/vi-vue-utils
Last synced: about 1 month ago
JSON representation
A library for communication with the ViUR Core
- Host: GitHub
- URL: https://github.com/viur-framework/vi-vue-utils
- Owner: viur-framework
- License: mit
- Created: 2022-08-17T11:00:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-31T10:14:06.000Z (about 2 months ago)
- Last Synced: 2024-10-31T11:19:48.862Z (about 2 months ago)
- Language: Vue
- Homepage:
- Size: 3.17 MB
- Stars: 2
- Watchers: 6
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-viur - Vi Vue Utils - A library for communication between VueJs and the ViUR Core (Official ViUR Resources / <img src="https://github.com/viur-framework/viur-artwork/raw/main/icons/icon-vi.svg" height="32"> Vi Repositories)
README
## What does it do?
ViUR Vue Utils is a library to work with the Viur Framework## Installation
```bash
$ npm i @viur/vue-utils
```## Usage
```js
import {Request, ListRequest, destroyStore} from '@viur/vue-utils'const simpleRequest = ref() //reactive variable
Request.get("https://jsonplaceholder.typicode.com/todos/1").then(async (resp: Response)=>{
simpleRequest.value = await resp.json() //decode and set reactive variable
})let userList = ListRequest(
"teststore", // unqiue name of the Pinia store
{url:"/user/list", params:{"limit":10}}
)//fetches all users
userList.fetchAll().catch((e)=>{
console.log(e)
console.log(e.statusCode)
console.log(e.statusText)
console.log(e.response)
})// if the results and the request is not needed anymore
destroyStore(userList)```
## Dependencies
ViUR Vue Utils depends on
* [Vue](https://vuejs.org/)
* [Pinia](https://pinia.vuejs.org/)## License
Copyright © 2023 by Mausbrand Informationssysteme GmbH.
Mausbrand and ViUR are registered trademarks of Mausbrand Informationssysteme GmbH.This project is free software under the MIT license.
Please see the LICENSE file for details.