-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Добавлено чуток информации о использовании
- Loading branch information
Showing
1 changed file
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
# vuetify_drf_forms | ||
|
||
## Project setup | ||
``` | ||
npm install | ||
``` | ||
### plugins/vuetify_drf_forms.js | ||
```javascript | ||
import Vue from 'vue'; | ||
import VuetifyDRF from 'vuetify-drf-forms'; | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
npm run serve | ||
export default ({store}) => { | ||
Vue.use(VuetifyDRF, {store}); | ||
}; | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
npm run build | ||
### nuxt.config.js | ||
```javascript | ||
... | ||
plugins: [ | ||
... | ||
{src: '~plugins/vuetify_drf_forms', mode: 'client'} | ||
], | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
npm run lint | ||
### Использование формы | ||
```javascript | ||
import CForm from 'vuetify-drf-forms/src/components/CForm.vue'; | ||
const endpoint = 'API ENDPOINT'; | ||
export default { | ||
mixins: [CForm], | ||
data() { | ||
return { | ||
endpoint, | ||
... | ||
} | ||
... | ||
} | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |