first commit

This commit is contained in:
JaguarJack
2022-12-05 23:01:12 +08:00
commit 0024080c28
322 changed files with 27698 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<template>
<el-table :data="data" class="mt-3" v-loading="loading">
<el-table-column prop="name" label="字段名称" />
<el-table-column prop="type" label="类型" />
<el-table-column prop="nullable" label="nullable">
<template #default="scope">
<el-tag v-if="scope.row.nullable"></el-tag>
<el-tag type="danger" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="default" label="默认值">
<template #default="scope"> </template>
</el-table-column>
<el-table-column prop="comment" label="注释" />
</el-table>
</template>
<script lang="ts" setup>
import { useShow } from '/admin/composables/curd/useShow'
import { onMounted } from 'vue'
import { ref } from 'vue'
const props = defineProps({
id: {
type: Number,
required: true,
},
})
const data = ref<Array<object>>()
onMounted(() => {
useShow('schema', props.id).then(r => {
data.value = r.data.columns
})
})
</script>
<style scoped></style>