# vue-data-dict
**Repository Path**: mxnjs/vue-data-dict
## Basic Information
- **Project Name**: vue-data-dict
- **Description**: Data dict for Vue2
- **Primary Language**: JavaScript
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 0
- **Created**: 2023-09-29
- **Last Updated**: 2023-10-07
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Data dict for Vue2
## Installation
```js
npm i vue-data-dict -S
```
## Examples
### install
```vue
import Vue from 'vue'
import VueDataDict from 'vue-data-dict'
Vue.use(VueDataDict, {
onCreated(dict) {
console.log('dict created: %o', dict)
},
onReady(dict) {
console.log('dict ready: %o', dict)
},
metas: {
'*': {
request(dictMeta) {
return Promise // get data from remote server
},
responseConverter(response, dictMeta) {
// you can use "VueDataDict.convertData({ ... }, dictMeta)" to convert Object to DictData
return response.map(e => VueDataDict.convertData(e, dictMeta))
}
}
}
})
```
### use
```vue
```
## Licence
This repository is licensed under the [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) license.