mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
757 B
44 lines
757 B
<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>
|
|
|