fix:修复套餐管理和格式化工具的中英适配
This commit is contained in:
@@ -127,7 +127,9 @@
|
||||
/>
|
||||
<ASelect
|
||||
v-model:value="formState.durationUnit"
|
||||
:options="timeUnits.map(unit => ({ label: unit, value: unit }))"
|
||||
:options="timeUnits.map(item => ({
|
||||
label: item.label,
|
||||
value: item.key }))"
|
||||
style="width: 100px"
|
||||
/>
|
||||
</div>
|
||||
@@ -168,17 +170,18 @@ import type { Rule } from 'ant-design-vue/es/form';
|
||||
import {
|
||||
formatBandwidth,
|
||||
formatStorage,
|
||||
formatTime,
|
||||
useFormatTime,
|
||||
convertStorage,
|
||||
convertTime,
|
||||
storageUnits,
|
||||
timeUnits,
|
||||
useTimeUnits,
|
||||
type StorageUnit,
|
||||
type TimeUnit
|
||||
} from '@/utils/units';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
|
||||
const timeUnits = useTimeUnits();
|
||||
const formatTime = useFormatTime();
|
||||
const wrapperEl = shallowRef<HTMLElement | null>(null);
|
||||
const { height: wrapperElHeight } = useElementSize(wrapperEl);
|
||||
|
||||
@@ -355,7 +358,7 @@ const formState = ref<PackageForm>({
|
||||
rateLimitId: undefined,
|
||||
durationEnable: false,
|
||||
duration: 0,
|
||||
durationUnit: t('page.package.hour'),
|
||||
durationUnit: 'hour',
|
||||
clientNumEnable: false,
|
||||
clientNum: 0,
|
||||
packageEnable: true
|
||||
@@ -468,7 +471,7 @@ const handleCancel = () => {
|
||||
rateLimitId: undefined,
|
||||
durationEnable: false,
|
||||
duration: 0,
|
||||
durationUnit:`${t('page.package.hour')}`,
|
||||
durationUnit:'hour',
|
||||
clientNumEnable: false,
|
||||
clientNum: 0,
|
||||
packageEnable: true
|
||||
|
||||
Reference in New Issue
Block a user