20260722222510

This commit is contained in:
oneao committed 2026-07-22 22:25:10 +08:00
1 parent d04fad24ed
commit 59b3ccfb1c
36 files changed
+2753 -3064

No files matched your search

@@ -0,0 +1,52 @@
<script setup>
import { computed } from "vue";
import { RefreshCw } from "@lucide/vue";
import MetadataTablePanel from "./MetadataTablePanel.vue";
defineProps({ syncing: Boolean });
defineEmits(["sync"]);
const fields = defineModel("fields", { type: Array, default: () => [] });
const columns = computed(() => [
{ dataIndex: "b_field", title: "字段", width: 150 },
{ dataIndex: "b_name", title: "默认名称", width: 160, editor: { maxlength: 100 } },
{ dataIndex: "b_i18n", title: "多语言键", width: 240, editor: { maxlength: 150 } },
{
dataIndex: "b_field_type",
title: "字段类型",
width: 130,
editor: {
type: "select",
options: [
"string",
"text",
"number",
"date",
"datetime",
"boolean",
"select_id",
"select_input",
].map((value) => ({ value, label: value })),
},
},
{ dataIndex: "b_dict_code", title: "字典编码", width: 150, editor: { maxlength: 100 } },
{ dataIndex: "b_value", title: "默认值", width: 160, editor: { maxlength: 500 } },
{ dataIndex: "b_remark", title: "说明", width: 220, editor: { maxlength: 500 } },
{ dataIndex: "b_canuse", title: "启用", width: 70, align: "center", editor: "checkbox" },
]);
</script>
<template>
<MetadataTablePanel
v-model:rows="fields"
title="字段定义"
:columns="columns"
:can-add="false"
:can-delete="false"
>
<template #actions>
<a-button type="primary" :loading="syncing" @click="$emit('sync')">
<RefreshCw />从视图同步
</a-button>
</template>
</MetadataTablePanel>
</template>