refactor(project): remove store mock fallback flows and unify real-data states
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user