mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-04 13:06:50 +00:00
GUI code refactoring (#2051)
* refactor: update vue component filenames Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: update store and state variable names Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: variable name correction Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: store module name correction Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: variable name correction Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<!-- <v-dialog :value="true">-->
|
||||
<v-card>
|
||||
<v-textarea v-model="template" />
|
||||
|
||||
<v-btn @click="ImportTemplate">
|
||||
import
|
||||
</v-btn>
|
||||
</v-card>
|
||||
<!-- </v-dialog>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ImportTemplate',
|
||||
props: {
|
||||
nodes: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
template: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
importTemplate() {
|
||||
try {
|
||||
const template = JSON.parse(this.template)
|
||||
this.$store.dispatch('sqlMgr/ActSqlOp', [{
|
||||
dbAlias: this.nodes.dbAlias,
|
||||
env: '_noco'
|
||||
}, 'xcModelsCreateFromTemplate', {
|
||||
template
|
||||
}])
|
||||
} catch (e) {
|
||||
this.$toast.error(e.message).goAway(3000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user