improved plugin functionality

- added abiulity to extend default api router from plugion
- added dability to pass custom model definition to generic model/api functions
- added ability to pass custom API clients to generic API function
This commit is contained in:
vabene1111
2023-05-20 12:53:14 +02:00
parent ddd2f96b85
commit c777cfe5b9
5 changed files with 23 additions and 5 deletions

View File

@ -76,7 +76,8 @@ export default {
return {}
},
},
show: { required: true, type: Boolean, default: false },
show: {required: true, type: Boolean, default: false},
models: {required: false, type: Function, default: null}
},
data() {
return {
@ -92,6 +93,10 @@ export default {
mounted() {
this.id = Math.random()
this.$root.$on("change", this.storeValue) // bootstrap modal placed at document so have to listen at root of component
if (this.models !== null){
this.Models = this.models // override models definition file with prop
}
},
computed: {
advancedForm() {