refactor(project): remove store mock fallback flows and unify real-data states

This commit is contained in:
2026-02-20 09:56:35 +08:00
parent 11cd789f38
commit 22d1a44683
39 changed files with 887 additions and 610 deletions

View File

@@ -8,6 +8,7 @@ import { Button, Card, InputNumber } from 'ant-design-vue';
interface Props {
baseDeliveryFee: number;
canOperate: boolean;
freeDeliveryThreshold: null | number;
isSaving: boolean;
minimumOrderAmount: number;
@@ -46,6 +47,7 @@ function toNumber(value: null | number | string, fallback = 0) {
:precision="2"
:step="1"
:controls="false"
:disabled="!props.canOperate"
class="fees-input"
placeholder="如15.00"
@update:value="
@@ -69,6 +71,7 @@ function toNumber(value: null | number | string, fallback = 0) {
:precision="2"
:step="1"
:controls="false"
:disabled="!props.canOperate"
class="fees-input"
placeholder="如3.00"
@update:value="
@@ -92,6 +95,7 @@ function toNumber(value: null | number | string, fallback = 0) {
:precision="2"
:step="1"
:controls="false"
:disabled="!props.canOperate"
class="fees-input"
placeholder="如30.00"
@update:value="
@@ -109,8 +113,18 @@ function toNumber(value: null | number | string, fallback = 0) {
</div>
<div class="fees-actions">
<Button :disabled="props.isSaving" @click="emit('reset')">重置</Button>
<Button type="primary" :loading="props.isSaving" @click="emit('save')">
<Button
:disabled="props.isSaving || !props.canOperate"
@click="emit('reset')"
>
重置
</Button>
<Button
type="primary"
:loading="props.isSaving"
:disabled="!props.canOperate"
@click="emit('save')"
>
保存设置
</Button>
</div>