feat:【antd】【ele】统一 infra 和 system 的代码风格

This commit is contained in:
YunaiV
2025-09-23 00:04:41 +08:00
parent b6d7dda0b3
commit af74cf6ad9
34 changed files with 65 additions and 75 deletions

View File

@@ -1,4 +1,4 @@
<script setup lang="ts">
<script lang="ts" setup>
import type { InfraApiAccessLogApi } from '#/api/infra/api-access-log';
import { ref } from 'vue';
@@ -16,9 +16,9 @@ const [Descriptions] = useDescription({
border: true,
column: 1,
direction: 'horizontal',
labelWidth: 110,
title: '',
extra: '',
labelWidth: 110,
},
schema: useDetailSchema(),
});

View File

@@ -1,4 +1,4 @@
<script setup lang="ts">
<script lang="ts" setup>
import type { InfraApiErrorLogApi } from '#/api/infra/api-error-log';
import { ref } from 'vue';
@@ -16,9 +16,9 @@ const [Descriptions] = useDescription({
border: true,
column: 1,
direction: 'horizontal',
labelWidth: 110,
title: '',
extra: '',
labelWidth: 110,
},
schema: useDetailSchema(),
});

View File

@@ -87,6 +87,7 @@ function showTemplate() {
formData.value = makeTemplate();
}
/** 生成组件 */
function makeTemplate() {
const rule = designer.value.getRule();
const opt = designer.value.getOption();

View File

@@ -42,8 +42,8 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
label: '表名称',
component: 'Input',
componentProps: {
placeholder: '请输入表名称',
clearable: true,
placeholder: '请输入表名称',
},
},
{
@@ -51,8 +51,8 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
label: '表描述',
component: 'Input',
componentProps: {
placeholder: '请输入表描述',
clearable: true,
placeholder: '请输入表描述',
},
},
];
@@ -366,8 +366,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '表名称',
component: 'Input',
componentProps: {
placeholder: '请输入表名称',
clearable: true,
placeholder: '请输入表名称',
},
},
{
@@ -375,8 +375,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '表描述',
component: 'Input',
componentProps: {
placeholder: '请输入表描述',
clearable: true,
placeholder: '请输入表描述',
},
},
{

View File

@@ -151,8 +151,13 @@ getDetail();
</div>
<div class="mt-4 flex justify-end space-x-2">
<ElButton v-show="currentStep > 0" @click="prevStep">上一步</ElButton>
<ElButton v-show="currentStep < steps.length - 1" @click="nextStep">
<ElButton :disabled="currentStep === 0" @click="prevStep">
上一步
</ElButton>
<ElButton
:disabled="currentStep === steps.length - 1"
@click="nextStep"
>
下一步
</ElButton>
<ElButton type="primary" :loading="loading" @click="submitForm">

View File

@@ -176,6 +176,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
});
/** 获取数据源配置列表 */
// TODO @芋艿:这种场景的最佳实践;
async function initDataSourceConfig() {
try {
dataSourceConfigList.value = await getDataSourceConfigList();

View File

@@ -150,21 +150,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
</template>
<template #file-content="{ row }">
<ElImage v-if="row.type && row.type.includes('image')" :src="row.url" />
<ElButton
v-else-if="row.type && row.type.includes('pdf')"
type="primary"
link
@click="() => openWindow(row.url!)"
>
预览
</ElButton>
<ElButton
v-else
type="primary"
link
@click="() => openWindow(row.url!)"
>
下载
<ElButton type="primary" link @click="() => openWindow(row.url!)">
{{ row.type && row.type.includes('pdf') ? '预览' : '下载' }}
</ElButton>
</template>
<template #actions="{ row }">

View File

@@ -1,4 +1,4 @@
<script setup lang="ts">
<script lang="ts" setup>
import type { InfraJobLogApi } from '#/api/infra/job-log';
import { ref } from 'vue';
@@ -17,9 +17,9 @@ const [Descriptions] = useDescription({
border: true,
column: 1,
direction: 'horizontal',
labelWidth: 140,
title: '',
extra: '',
labelWidth: 140,
},
schema: useDetailSchema(),
});

View File

@@ -1,4 +1,4 @@
<script setup lang="ts">
<script lang="ts" setup>
import type { InfraJobApi } from '#/api/infra/job';
import { ref } from 'vue';
@@ -18,9 +18,9 @@ const [Descriptions] = useDescription({
border: true,
column: 1,
direction: 'horizontal',
labelWidth: 140,
title: '',
extra: '',
labelWidth: 140,
},
schema: useDetailSchema(),
});

View File

@@ -76,7 +76,7 @@ const [Modal, modalApi] = useVbenModal({
</script>
<template>
<Modal :title="getTitle" class="w-[40%]">
<Modal :title="getTitle" class="w-2/5">
<Form class="mx-4" />
</Modal>
</template>