fix(admin): 修复聚合扫码配置页面问题并根治 antd 组件 Tailwind 间距类 cssinjs 覆盖

- AggregateScanConfig: 补传 method 参数修复通道商户候选接口报错
- AggregateScanConfig: AUTO 模式显示方式友好名称替代技术编码
- AggregateScanConfig: a-alert 间距改为 wrapper div 避免 cssinjs 覆盖
- 全局: 18 个文件 29 处 antd 组件间距类加 ! 前缀绕过 cssinjs margin:0 覆盖
- 涉及组件: a-card/a-alert/a-button/a-row/a-tag/a-divider/a-form/a-textarea/a-empty
This commit is contained in:
DaxPay Dev
2026-07-11 11:57:49 +08:00
parent 2f9bc714ed
commit 162bfd02e5
17 changed files with 49 additions and 36 deletions

View File

@@ -133,7 +133,7 @@
</a-button>
</a-form>
<a-button block class="mt-4" @click="goBack">
<a-button block class="!mt-4" @click="goBack">
<template #icon>
<IconifyIcon icon="ant-design:left-outlined" />
</template>

View File

@@ -90,7 +90,7 @@
{{ $t('_core.authentication.twoFactor.submit') }}
</a-button>
<!-- 返回 -->
<a-button block size="large" class="mt-2" @click="handleCancel">
<a-button block size="large" class="!mt-2" @click="handleCancel">
{{ $t('_core.authentication.twoFactor.cancel') }}
</a-button>
</div>

View File

@@ -68,7 +68,7 @@
</a-button>
</a-form>
<a-button block class="mt-4" @click="goBack">
<a-button block class="!mt-4" @click="goBack">
<template #icon>
<IconifyIcon icon="ant-design:left-outlined" />
</template>

View File

@@ -23,7 +23,7 @@
<AuthPageCard>
<AuthQrCodePanel :show-title="true" />
<a-button block class="mt-4" @click="goBack">
<a-button block class="!mt-4" @click="goBack">
<template #icon>
<IconifyIcon icon="ant-design:left-outlined" />
</template>

View File

@@ -44,7 +44,7 @@
<AnalysisOverview :data="data.overview" />
<!-- 图表网格核心趋势 洞察三连 深度 明细 -->
<a-row :gutter="[16, 16]" align="stretch" class="mt-4">
<a-row :gutter="[16, 16]" align="stretch" class="!mt-4">
<!-- 第二行交易趋势(多度量) + 支付方式占比 -->
<a-col :span="16">
<AnalysisTradeTrend :data="data.tradeTrend" />

View File

@@ -28,7 +28,7 @@
<component :is="headerMeta?.component" v-if="headerMeta" :data="dashboardData" />
<!-- 其余 widgets 24 栅格布局渲染 -->
<a-row :gutter="[16, 16]" align="stretch" class="mt-4">
<a-row :gutter="[16, 16]" align="stretch" class="!mt-4">
<a-col v-for="item in layout" :key="item.widgetId" :span="item.span">
<component :is="widgetMap[item.widgetId]?.component" :data="dashboardData" />
</a-col>

View File

@@ -139,7 +139,7 @@
<a-row :gutter="16">
<!-- 点对点队列 -->
<a-col :span="12">
<a-card class="mb-4 h-full" :title="$t('demos.artemis.scene.queue.title')">
<a-card class="!mb-4 h-full" :title="$t('demos.artemis.scene.queue.title')">
<p class="mb-3 text-gray-500 text-sm">
{{ $t('demos.artemis.scene.queue.description') }}
</p>
@@ -158,7 +158,7 @@
<!-- 发布订阅 -->
<a-col :span="12">
<a-card class="mb-4 h-full" :title="$t('demos.artemis.scene.topic.title')">
<a-card class="!mb-4 h-full" :title="$t('demos.artemis.scene.topic.title')">
<p class="mb-3 text-gray-500 text-sm">
{{ $t('demos.artemis.scene.topic.description') }}
</p>
@@ -177,7 +177,7 @@
<!-- 延时消息 -->
<a-col :span="12">
<a-card class="mb-4 h-full" :title="$t('demos.artemis.scene.delay.title')">
<a-card class="!mb-4 h-full" :title="$t('demos.artemis.scene.delay.title')">
<p class="mb-3 text-gray-500 text-sm">
{{ $t('demos.artemis.scene.delay.description') }}
</p>

View File

@@ -142,7 +142,7 @@
<template>
<div class="p-4">
<!-- 国际化文件上传演示 -->
<a-card :title="$t('demos.file-upload.title')" class="mb-4">
<a-card :title="$t('demos.file-upload.title')" class="!mb-4">
<!-- 国际化演示预签名方式上传文件到平台存储 -->
<p class="text-gray-500">{{ $t('demos.file-upload.description') }}</p>
</a-card>
@@ -219,7 +219,7 @@
</a-col>
</a-row>
<a-card title="图片上传组件示例 (BUploadImage)" class="mt-4">
<a-card title="图片上传组件示例 (BUploadImage)" class="!mt-4">
<a-row :gutter="16">
<a-col :span="12">
<div class="mb-2 font-medium">公有文件上传</div>

View File

@@ -27,7 +27,7 @@
<template>
<Page description="中国行政区划级联选择器组件示例" title="行政区划选择器 Demo">
<a-card class="mb-4" title="基本用法">
<a-card class="!mb-4" title="基本用法">
<a-row :gutter="24">
<a-col :span="12">
<div class="mb-2 font-medium"> 只绑定最后一级值 (valueMode="last") </div>
@@ -42,7 +42,7 @@
</a-row>
</a-card>
<a-card class="mb-4" title="不同层级">
<a-card class="!mb-4" title="不同层级">
<a-row :gutter="24">
<a-col :span="8">
<div class="mb-2 font-medium">省市二级联动</div>
@@ -62,7 +62,7 @@
</a-row>
</a-card>
<a-card class="mb-4" title="操作按钮">
<a-card class="!mb-4" title="操作按钮">
<a-space>
<a-button type="primary" @click="setTestValue"> 设置测试值 (北京市东城区) </a-button>
<a-button danger @click="clearAll"> 清空所有 </a-button>
@@ -70,7 +70,7 @@
</a-card>
<a-card title="回显测试">
<a-alert class="mb-4" message="回显原理说明" type="info" show-icon>
<a-alert class="!mb-4" message="回显原理说明" type="info" show-icon>
<template #description>
<p>中国行政区划代码本身包含层级关系</p>
<ul class="list-disc pl-4">

View File

@@ -185,7 +185,7 @@
<a-tabs v-model:active-key="activeTab" class="auth-token-tabs">
<!-- 国际化手动设置 -->
<a-tab-pane key="manual" :tab="$t('payment.merchant.channelMerchant.tabManualToken')">
<a-form ref="formRef" layout="vertical" class="pt-2" :model="formState" :rules="formRules">
<a-form ref="formRef" layout="vertical" class="!pt-2" :model="formState" :rules="formRules">
<!-- 国际化当前令牌 -->
<a-form-item :label="$t('payment.merchant.channelMerchant.appAuthTokenCurrent')">
<div class="current-token-value">
@@ -251,7 +251,7 @@
{{ $t('payment.merchant.channelMerchant.agentAuthQrTip') }}
</div>
</div>
<a-textarea :value="authUrl" :rows="2" readonly class="mt-3" />
<a-textarea :value="authUrl" :rows="2" readonly class="!mt-3" />
<div class="mt-3 text-center">
<a-button @click="handleCopyAuthUrl">
{{ $t('payment.merchant.channelMerchant.agentAuthCopy') }}

View File

@@ -167,7 +167,7 @@
</a-col>
</a-row>
<a-form-item class="mb-0">
<a-form-item class="!mb-0">
<a-space>
<a-button type="primary" :loading="signLoading" @click="handleGenSign">
<template #icon>

View File

@@ -631,7 +631,7 @@
<!-- 签名预览结果 -->
<template v-if="signPreview.signStr || signPreview.sign">
<a-divider class="my-3" />
<a-divider class="!my-3" />
<div class="preview-item mb-3">
<div class="mb-1 flex items-center justify-between">
<span class="text-xs font-medium text-foreground">

View File

@@ -133,6 +133,12 @@
methodDirectory.value = map;
}
/** 查找支付方式的友好名称 */
function findMethodLabel(provider: string, method: string): string {
const list = methodDirectory.value[provider];
return list?.find((m) => m.value === method)?.label || method;
}
/** 加载通道商户候选(DIRECT 模式用) */
async function loadChannelMchCandidates() {
const map: Record<string, LabelValue[]> = {};
@@ -141,6 +147,7 @@
const { data } = await PayRouteApi.listSceneChannelMchCandidates({
appId: appId.value,
provider: sc.provider,
method: sc.defaultMethod,
});
map[sc.scene] = data || [];
}),
@@ -181,6 +188,8 @@
editLevel.value = (effectiveLevel.value as AggregateLevel) || AGGREGATE_LEVEL.AUTO;
autoLaunch.value = config.value.autoLaunch || false;
initSceneForm();
// 无条件加载方式目录, AUTO 模式也需要查找方式友好名称
await loadMethodDirectory();
loading.value = false;
}
@@ -330,8 +339,20 @@
</template>
<a-spin :spinning="loading">
<!-- 模式切换 -->
<div class="mb-4 flex items-center gap-3">
<!-- 公共参数: 自动拉起 -->
<div class="mb-2">
<a-checkbox v-model:checked="autoLaunch" :disabled="!editing">
{{ $t('payment.merchant.aggregate.aggregate.autoLaunch') }}
</a-checkbox>
<span class="ml-2 text-xs text-muted-foreground">
{{ $t('payment.merchant.aggregate.aggregate.autoLaunchHint') }}
</span>
</div>
<a-divider class="!my-4" />
<!-- 配置模式 -->
<div class="mb-5 flex items-center gap-3">
<span class="text-sm font-medium">{{ $t('payment.merchant.aggregate.aggregate.editModeLabel') }}</span>
<a-radio-group v-model:value="editLevel" button-style="solid" :disabled="!editing">
<a-radio-button :value="AGGREGATE_LEVEL.AUTO">
@@ -350,16 +371,8 @@
</div>
<!-- 模式提示 -->
<a-alert :message="modeHint" type="info" show-icon class="mb-4" />
<!-- 自动拉起 -->
<div class="mb-4">
<a-checkbox v-model:checked="autoLaunch" :disabled="!editing">
{{ $t('payment.merchant.aggregate.aggregate.autoLaunch') }}
</a-checkbox>
<span class="ml-2 text-xs text-muted-foreground">
{{ $t('payment.merchant.aggregate.aggregate.autoLaunchHint') }}
</span>
<div class="mb-5">
<a-alert :message="modeHint" type="info" show-icon />
</div>
<!-- 场景配置 -->
@@ -372,7 +385,7 @@
<!-- AUTO 模式: 只读提示 -->
<div v-if="editLevel === AGGREGATE_LEVEL.AUTO" class="scene-content">
<a-tag color="blue">
{{ $t('payment.merchant.aggregate.aggregate.autoDerived') }}: {{ sc.defaultMethod }}
{{ $t('payment.merchant.aggregate.aggregate.autoDerived') }}: {{ findMethodLabel(sc.provider, sc.defaultMethod) }}
</a-tag>
</div>

View File

@@ -291,7 +291,7 @@
<!-- 国际化按通道动态展示页头标题 -->
<span class="text-lg font-bold text-foreground">{{ pageTitle }}</span>
<!-- 银联商务多产品共页, 用标签区分具体产品类型("银联商务(C扫B)") -->
<a-tag v-if="isUmsProduct(product) && productTypeName" color="blue" class="ml-1">
<a-tag v-if="isUmsProduct(product) && productTypeName" color="blue" class="!ml-1">
{{ productTypeName }}
</a-tag>
<span v-if="channelMerchant.channelMerchantName" class="text-sm text-muted-foreground">

View File

@@ -174,7 +174,7 @@
:size="1200"
@close="handleClose"
>
<a-form layout="inline" class="mb-4">
<a-form layout="inline" class="!mb-4">
<a-form-item :label="$t('system.protocol.version.language')">
<a-select
v-model:value="queryForm.language"

View File

@@ -76,7 +76,7 @@
allow-clear
@press-enter="handleSubmit"
/>
<a-button type="primary" block size="large" class="mt-6" @click="handleSubmit">
<a-button type="primary" block size="large" class="!mt-6" @click="handleSubmit">
{{ $t('ui.widgets.lockScreen.screenButton') }}
</a-button>
</div>

View File

@@ -179,7 +179,7 @@
</div>
<!-- 主按钮进入系统 -->
<a-button type="primary" block size="large" class="mb-3" @click="handleSubmit">
<a-button type="primary" block size="large" class="!mb-3" @click="handleSubmit">
{{ $t('ui.widgets.lockScreen.entry') }}
</a-button>