refactor: prettier nc-gui v1

This commit is contained in:
Wing-Kam Wong
2022-07-06 18:19:04 +08:00
parent 9555b455e0
commit 8b863ca3d8
289 changed files with 19265 additions and 23785 deletions

View File

@@ -3,42 +3,42 @@
<v-card>
<v-textarea v-model="template" />
<v-btn @click="ImportTemplate">
import
</v-btn>
<v-btn @click="ImportTemplate"> import </v-btn>
</v-card>
<!-- </v-dialog>-->
<!-- </v-dialog>-->
</template>
<script>
export default {
name: 'ImportTemplate',
props: {
nodes: Object
nodes: Object,
},
data() {
return {
template: ''
}
template: '',
};
},
methods: {
importTemplate() {
try {
const template = JSON.parse(this.template)
this.$store.dispatch('sqlMgr/ActSqlOp', [{
dbAlias: this.nodes.dbAlias,
env: '_noco'
}, 'xcModelsCreateFromTemplate', {
template
}])
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)
this.$toast.error(e.message).goAway(3000);
}
}
}
}
},
},
};
</script>
<style scoped>
</style>
<style scoped></style>