diff --git a/src/pages/link/index.tsx b/src/pages/link/index.tsx
index 3db66af..5fc5a23 100644
--- a/src/pages/link/index.tsx
+++ b/src/pages/link/index.tsx
@@ -5,24 +5,26 @@ import { IoCopyOutline } from "react-icons/io5";
import { copy } from '../../utils';
import { observer } from 'mobx-react';
import store from '../../store';
+import { useTranslation } from 'react-i18next';
const Link = () => {
const { userInfo } = store.state
+ const { t } = useTranslation()
return (
-
推广链接
+
{t('Promotion links')}
-
代理推广链接
+
{t('Agent promotion link')}
- 推荐码:
+ {t('Referral code')}:
{userInfo.inviti_code}
copy(userInfo.inviti_code)} />
@@ -40,7 +42,7 @@ const Link = () => {
backgroundColor: '#007DBA'
}}
onClick={() => copy(`${window.origin}/#/createProxy?code=${userInfo.inviti_code}`)}
- >链接复制
+ >{t('Copy link')}
diff --git a/src/pages/record/assets/index.tsx b/src/pages/record/assets/index.tsx
index 90ff2e6..7c00adf 100644
--- a/src/pages/record/assets/index.tsx
+++ b/src/pages/record/assets/index.tsx
@@ -7,11 +7,12 @@ import { useMemo } from 'react'
import { ConfigProvider, Tabs } from 'antd'
import { http_account_assetsRecords, http_cash } from '../../../http/api'
import { getTime } from '../../../utils'
+import { useTranslation } from 'react-i18next'
const AssetsRecords = () => {
const { screenWidth } = store.state
-
+ const { t } = useTranslation()
const containerWidth = useMemo(() => {
if (screenWidth > 1420) {
return 1420 - 310
@@ -28,12 +29,12 @@ const AssetsRecords = () => {
apiFun={http_account_assetsRecords}
columns={[
{
- title: '状态',
+ title: t('Status'),
dataIndex: 'status',
width: 150
},
{
- title: '时间',
+ title: t('Time'),
dataIndex: 'time',
width: 200,
render: (time: number) => (
@@ -41,28 +42,28 @@ const AssetsRecords = () => {
)
},
{
- title: '事件',
+ title: t('Event'),
dataIndex: 'event',
width: 150
},
{
- title: '订单',
+ title: t('Order'),
dataIndex: 'order',
width: 120
},
{
- title: '账户',
+ title: t('Account'),
dataIndex: 'account'
},
{
- title: '金额',
+ title: t('Amount'),
dataIndex: 'amount',
render: (val: string) => (
${val}
)
},
{
- title: '描述',
+ title: t('Describe'),
dataIndex: 'describe'
},
@@ -78,7 +79,7 @@ const AssetsRecords = () => {
extraProps={{ type: 1 }}
columns={[
{
- title: '时间',
+ title: t('Time'),
dataIndex: 'time',
width: 200,
render: (time: number) => (
@@ -86,26 +87,26 @@ const AssetsRecords = () => {
)
},
{
- title: '订单',
+ title: t('Order'),
dataIndex: 'order',
},
{
- title: '描述',
+ title: t('Describe'),
dataIndex: 'describe',
},
{
- title: '金额',
+ title: t('Describe'),
dataIndex: 'amount'
},
{
- title: '剩余',
+ title: t('Remaining'),
dataIndex: 'balance',
render: (val: string) => (
${val}
)
},
{
- title: '状态',
+ title: t('Status'),
dataIndex: 'status'
},
]}
@@ -120,7 +121,7 @@ const AssetsRecords = () => {
extraProps={{ type: 2 }}
columns={[
{
- title: '时间',
+ title: t('Time'),
dataIndex: 'time',
width: 200,
render: (time: number) => (
@@ -128,26 +129,26 @@ const AssetsRecords = () => {
)
},
{
- title: '订单',
+ title: t('Order'),
dataIndex: 'order',
},
{
- title: '描述',
+ title: t('Describe'),
dataIndex: 'describe',
},
{
- title: '金额',
+ title: t('Amount'),
dataIndex: 'amount'
},
{
- title: '剩余',
+ title: t('Remaining'),
dataIndex: 'balance',
render: (val: string) => (
${val}
)
},
{
- title: '状态',
+ title: t('Status'),
dataIndex: 'status'
},
]}
@@ -162,7 +163,7 @@ const AssetsRecords = () => {
extraProps={{ type: 3 }}
columns={[
{
- title: '时间',
+ title: t('Time'),
dataIndex: 'time',
width: 200,
render: (time: number) => (
@@ -170,26 +171,26 @@ const AssetsRecords = () => {
)
},
{
- title: '订单',
+ title: t('Order'),
dataIndex: 'order',
},
{
- title: '描述',
+ title: t('Describe'),
dataIndex: 'describe',
},
{
- title: '金额',
+ title: t('Amount'),
dataIndex: 'amount'
},
{
- title: '剩余',
+ title: t('Remaining'),
dataIndex: 'balance',
render: (val: string) => (
${val}
)
},
{
- title: '状态',
+ title: t('Status'),
dataIndex: 'status'
},
]}
@@ -199,7 +200,7 @@ const AssetsRecords = () => {
return (
-
账单记录
+
{t('Billing records')}
{
资金账户',
+ label: t('Cash Wallet-Asset Account'),
children: WalletToAsseetRecord(),
},
{
key: '3',
- label: '现金钱包->其他会员',
+ label: t('Cash Wallet-Other Members'),
children: AssetToVipRecords(),
},
{
key: '4',
- label: '资产账户->现金钱包',
+ label: t('Asset Account-Cash Wallet'),
children: AssetToWalletRecords(),
}
]} />
diff --git a/src/pages/record/bonus/index.tsx b/src/pages/record/bonus/index.tsx
index 9e23613..2693410 100644
--- a/src/pages/record/bonus/index.tsx
+++ b/src/pages/record/bonus/index.tsx
@@ -7,10 +7,12 @@ import { useMemo } from 'react'
import { http_bonus } from '../../../http/api'
import { getTime } from '../../../utils'
import { Input, Select } from 'antd'
+import { useTranslation } from 'react-i18next'
const BonusRecords = () => {
const { screenWidth } = store.state
+ const { t } = useTranslation()
const containerWidth = useMemo(() => {
if (screenWidth > 1420) {
@@ -23,48 +25,48 @@ const BonusRecords = () => {
}, [screenWidth])
const options = [
- { label: '请选择类型', value: 0 },
- { label: '交易利润', value: 1 },
- { label: '盈利分红', value: 2 },
- { label: '超级奖励', value: 3 },
- { label: '交易佣金', value: 4 },
- { label: '星级奖励', value: 5 },
+ { label: t('Please choose the type'), value: 0 },
+ { label: t('Trading profit'), value: 1 },
+ { label: t('Profit dividends'), value: 2 },
+ { label: t('Super reward'), value: 3 },
+ { label: t('Trading commissions'), value: 4 },
+ { label: t('Star reward'), value: 5 },
]
const searchConfigList = [
{
key: 'type',
name: 'type',
- label: '全部类型',
+ label: t('All types'),
initialValue: 0,
- slot:
+ slot:
},
{
key: 'order',
name: 'order',
- label: '订单号',
+ label: t('Order number'),
initialValue: '',
- slot:
+ slot:
},
{
key: 'assets',
name: 'assets',
- label: '资金账户',
+ label: t('Capital account'),
initialValue: '',
- slot:
+ slot:
}
]
return (
-
奖金明细
+
{t('Bonus details')}
(
@@ -72,30 +74,30 @@ const BonusRecords = () => {
)
},
{
- title: '订单',
+ title: t('Order'),
dataIndex: 'order'
},
{
- title: '事件',
+ title: t('Event'),
dataIndex: 'event',
width: 200
},
{
- title: '来自',
+ title: t('From'),
dataIndex: 'source'
},
// {
// title: '受益'
// },
{
- title: '金额',
+ title: t('Amount'),
dataIndex: 'amount',
render: (val: string) => (
${val}
)
},
{
- title: '余额',
+ title: t('Balance'),
dataIndex: 'balance',
render: (val: string) => (
${val}
diff --git a/src/pages/record/deposit/index.tsx b/src/pages/record/deposit/index.tsx
index 920cda7..3ae6528 100644
--- a/src/pages/record/deposit/index.tsx
+++ b/src/pages/record/deposit/index.tsx
@@ -6,11 +6,12 @@ import store from '../../../store'
import { useMemo } from 'react'
import { http_depositHistory, http_withdrawRecords } from '../../../http/api'
import { getTime } from '../../../utils'
+import { useTranslation } from 'react-i18next'
const DepositRecords = () => {
const { screenWidth } = store.state
-
+ const { t } = useTranslation()
const containerWidth = useMemo(() => {
if (screenWidth > 1420) {
return 1420 - 310
@@ -23,18 +24,18 @@ const DepositRecords = () => {
return (
-
存款记录
+
{t('Deposit records')}
(
@@ -42,11 +43,11 @@ const DepositRecords = () => {
)
},
{
- title: '订单',
+ title: t('Order'),
dataIndex: 'order'
},
{
- title: '到账金额',
+ title: t('Amount received'),
dataIndex: 'amount',
width: 160,
render: (val: string) => (
@@ -54,7 +55,7 @@ const DepositRecords = () => {
)
},
{
- title: '付款金额',
+ title: t('Payment amount'),
dataIndex: 'payment_amount',
width: 160,
render: (val: string) => (
@@ -62,7 +63,7 @@ const DepositRecords = () => {
)
},
{
- title: '账号',
+ title: t('Account'),
dataIndex: 'account'
}
]}
diff --git a/src/pages/record/escrow/index.tsx b/src/pages/record/escrow/index.tsx
index 106449e..5ec3b1a 100644
--- a/src/pages/record/escrow/index.tsx
+++ b/src/pages/record/escrow/index.tsx
@@ -6,10 +6,12 @@ import store from '../../../store'
import { useMemo } from 'react'
import { http_escrowRecords } from '../../../http/api'
import { getTime } from '../../../utils'
+import { useTranslation } from 'react-i18next'
const EscrowRecords = () => {
const { screenWidth } = store.state
+ const { t } = useTranslation()
const containerWidth = useMemo(() => {
if (screenWidth > 1420) {
@@ -23,18 +25,18 @@ const EscrowRecords = () => {
return (
-
托管记录
+
{t('Escrow records')}
(
@@ -42,7 +44,7 @@ const EscrowRecords = () => {
)
},
{
- title: '结束时间',
+ title: t('End time'),
dataIndex: 'end_time',
width: 200,
render: (time: number) => (
@@ -50,7 +52,7 @@ const EscrowRecords = () => {
)
},
{
- title: '金额',
+ title: t('Amount'),
dataIndex: 'amount',
width: 160,
render: (val: string) => (
diff --git a/src/pages/record/withdraw/index.tsx b/src/pages/record/withdraw/index.tsx
index 52fa766..a2e4952 100644
--- a/src/pages/record/withdraw/index.tsx
+++ b/src/pages/record/withdraw/index.tsx
@@ -6,10 +6,12 @@ import store from '../../../store'
import { useMemo } from 'react'
import { http_withdrawRecords } from '../../../http/api'
import { getTime } from '../../../utils'
+import { useTranslation } from 'react-i18next'
const WithdrawRecords = () => {
const { screenWidth } = store.state
+ const { t } = useTranslation()
const containerWidth = useMemo(() => {
if (screenWidth > 1420) {
@@ -23,18 +25,18 @@ const WithdrawRecords = () => {
return (
-
取款记录
+
{t('Withdraw records')}
(
@@ -42,33 +44,33 @@ const WithdrawRecords = () => {
)
},
{
- title: '订单',
+ title: t('Order'),
dataIndex: 'order'
},
{
- title: '取款金额',
+ title: t('Withdraw amount'),
dataIndex: 'amount',
render: (val: string) => (
${val}
)
},
{
- title: '到账金额',
+ title: t('Amount received'),
dataIndex: 'receipt_amount',
render: (val: string) => (
${val}
)
},
{
- title: '账号',
+ title: t('Account'),
dataIndex: 'account'
},
{
- title: '收款户名',
+ title: t('Account name'),
dataIndex: 'type'
},
{
- title: '收款地址',
+ title: t('Receive address'),
dataIndex: 'address'
}
]}
diff --git a/src/pages/security/index.tsx b/src/pages/security/index.tsx
index 0a2a093..831485d 100644
--- a/src/pages/security/index.tsx
+++ b/src/pages/security/index.tsx
@@ -6,18 +6,20 @@ import CountdownTimer, { CountdownTimerRef } from "../../components/CountdownTim
import { useRef } from "react"
import { observer } from "mobx-react"
import store from "../../store"
+import { useTranslation } from "react-i18next"
const Security = () => {
const { userInfo } = store.state
const [form] = Form.useForm()
const countdownRef = useRef(null)
+ const { t } = useTranslation()
const onFinish: FormProps['onFinish'] = async (values) => {
const res: any = await http_reset_password(values)
if (res.code === 0) {
notification.success({
- message: '修改成功,请重新登录'
+ message: t('Modification successful, please log in again')
})
store.setToken('')
}
@@ -25,11 +27,11 @@ const Security = () => {
const validatePassword = (_: any, value: string) => {
if (!value) {
- return Promise.reject(new Error("请输入新密码"));
+ return Promise.reject(new Error(t('Please enter a new password')));
}
const regex = /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,32}$/;
if (!regex.test(value)) {
- return Promise.reject(new Error("密码必须包含字母和数字,长度为8-32位"));
+ return Promise.reject(new Error(t('Password must contain letters and numbers and be 8-32 characters long')));
}
return Promise.resolve();
};
@@ -44,11 +46,11 @@ const Security = () => {
})
if (res.code === 0) {
notification.success({
- message: '验证码发送成功'
+ message: t('Verification code sent successfully')
})
} else {
notification.error({
- message: '验证码发送失败'
+ message: t('Failed to send verification code')
})
countdownRef.current?.handleStop()
}
@@ -61,31 +63,31 @@ const Security = () => {
return (
-
办理存款
+
{t('Security settings')}
-
修改登录密码
+
{t('Change login password')}
-
1.在使用过程中请务必确认设备安全,防止数据被篡改或泄露。
-
2.邮箱验证码可能会延时送达,请您耐心等待。
+
{t('1. Please make sure the device is safe during use to prevent data from being tampered with or leaked.')}
+
{t('2. The email verification code may be delayed, please wait patiently.')}
diff --git a/src/pages/submit/index.tsx b/src/pages/submit/index.tsx
index 1f91ab1..223e372 100644
--- a/src/pages/submit/index.tsx
+++ b/src/pages/submit/index.tsx
@@ -5,6 +5,8 @@ import { useRouter } from '../../hooks/useRouter'
import store from '../../store'
import { useEffect, useState } from 'react'
import { http_code, http_login, http_submit } from '../../http/api'
+import { useTranslation } from 'react-i18next'
+import LanguageMenu from '../../components/LanguageMenu'
type FieldType = {
account: string;
password: string;
@@ -13,6 +15,7 @@ type FieldType = {
const Submit = () => {
const [form] = Form.useForm()
+ const { t } = useTranslation()
const onFinish: FormProps
['onFinish'] = async (values) => {
const res: any = await http_submit({
@@ -20,7 +23,7 @@ const Submit = () => {
})
if (res.code === 0) {
notification.success({
- message: '提交成功'
+ message: t('Submit success')
})
form.resetFields()
}
@@ -31,8 +34,12 @@ const Submit = () => {
}, [])
return (
-
+
+
+
+
diff --git a/src/pages/team/index.tsx b/src/pages/team/index.tsx
index 33a9376..44fa867 100644
--- a/src/pages/team/index.tsx
+++ b/src/pages/team/index.tsx
@@ -4,12 +4,14 @@ import { useEffect, useState } from 'react'
import { http_team } from '../../http/api'
import { observer } from 'mobx-react'
import store from '../../store'
+import { useTranslation } from 'react-i18next'
const Team = () => {
const { token } = store.state
const [rootAccount, setRootState] = useState('')
const [teamAccount, setTeamAccount] = useState([])
+ const { t } = useTranslation()
useEffect(() => {
const getData = async () => {
@@ -25,7 +27,7 @@ const Team = () => {
return (
-
团队详情
+
{t('Team details')}
diff --git a/src/pages/transfer/index.tsx b/src/pages/transfer/index.tsx
index 9def1c2..a751334 100644
--- a/src/pages/transfer/index.tsx
+++ b/src/pages/transfer/index.tsx
@@ -4,15 +4,17 @@ import { useState } from 'react'
import { observer } from 'mobx-react'
import store from '../../store'
import { http_transfer } from '../../http/api'
+import { useTranslation } from 'react-i18next'
const Transfer = () => {
const { userInfo } = store.state
const [form] = Form.useForm()
+ const { t } = useTranslation()
const options = [
- { label: '现金钱包-资产账户', value: 1 },
- { label: '现金钱包-其他会员', value: 2 },
- { label: '资产账户-现金钱包', value: 3 }
+ { label: t('Cash Wallet-Asset Account'), value: 1 },
+ { label: t('Cash Wallet-Other Members'), value: 2 },
+ { label: t('Asset Account-Cash Wallet'), value: 3 }
]
const [type, setType] = useState(-1)
@@ -30,7 +32,7 @@ const Transfer = () => {
store.getUserInfo()
form.resetFields()
notification.success({
- message: '提交成功'
+ message: t('Submit success')
})
}
@@ -38,14 +40,14 @@ const Transfer = () => {
return (
-
资金划转
+
{t('Assets transfer')}
-
资金转账-注意事项
+
{t('Assets transfer-matters needing attention')}
-
1.在使用过程中请务必确认设备安全,防止数据被篡改或泄露。
-
2.资金转账过程中如遇卡顿等情况,请稍后处理或联系客服。
-
3.资金转账操作后,系统会有延时情况;如超过10分钟仍未到账,请联系客服。
+
{t('1.Please ensure the safety of the equipment during use,Prevent data from being tampered with or leaked。')}
+
{t('2.In the process of fund transfer, if there is a delay or other situation,Please handle it later or contact customer service。')}
+
{t('3.After fund transfer operation,There may be delays in the system;If exceeding10Minutes have not yet arrived,Please contact customer service。')}
@@ -55,17 +57,17 @@ const Transfer = () => {
onFinish={onFinish}
form={form}
>
-
资金操作}>
-
+ {t('Assets operations')}}>
+
{
type < 3 ? (
- 钱包金额:
+ {t('Wallet balance')}:
${userInfo.balance}
) : (
- 资产账户金额:
+ {t('Asset account amount')}:
${userInfo.account_balance}
)
@@ -74,35 +76,35 @@ const Transfer = () => {
{
type === 2 && (
-
-
+
+
)
}
{
type === 1 && (
- 资金账户}>
-
+ {t('Capital account')}}>
+
)
}
{
type === 3 && (
- 资金账户}>
-
+ {t('Capital account')}}>
+
)
}
- 转账金额}>
-
+ {t('Transfer amount')}}>
+
- 提交
+ {t('submit')}
diff --git a/src/pages/withdraw/index.tsx b/src/pages/withdraw/index.tsx
index 6b16c22..39ffa62 100644
--- a/src/pages/withdraw/index.tsx
+++ b/src/pages/withdraw/index.tsx
@@ -5,12 +5,14 @@ import store from '../../store'
import { useMemo, useRef, useState } from 'react'
import CountdownTimer, { CountdownTimerRef } from '../../components/CountdownTimer'
import { http_send_email, http_withdraw } from '../../http/api'
+import { useTranslation } from 'react-i18next'
const Withdraw = () => {
const [form] = Form.useForm()
const { receiveAccount, userInfo } = store.state
const countdownRef = useRef(null)
+ const { t } = useTranslation()
const options = useMemo(() => {
const map = receiveAccount.map(item => ({
@@ -24,7 +26,7 @@ const Withdraw = () => {
if (Number(values.amount) > Number(userInfo.balance)) {
notification.warning({
- message: '余额不足'
+ message: t('Insufficient balance')
})
return
}
@@ -36,7 +38,7 @@ const Withdraw = () => {
if (res.code === 0) {
form.resetFields()
notification.success({
- message: '提交成功'
+ message: t('Submit success')
})
}
@@ -52,11 +54,11 @@ const Withdraw = () => {
})
if (res.code === 0) {
notification.success({
- message: '验证码发送成功'
+ message: t('Verification code sent successfully')
})
} else {
notification.error({
- message: '验证码发送失败'
+ message: t('Failed to send verification code')
})
countdownRef.current?.handleStop()
}
@@ -68,11 +70,11 @@ const Withdraw = () => {
return (
-
办理取款
+
{t('Handle withdraw')}
-
提示
-
在使用过程中请务必确认设备安全,防止数据篡改或泄露。
+
{t('Hint')}
+
{t('Please make sure the device is safe during use to prevent data tampering or leakage.')}
@@ -82,25 +84,25 @@ const Withdraw = () => {
form={form}
>
-
取款账号}>
-
+ {t('Withdraw account')}}>
+
- 取款金额}>
+ {t('Withdraw amount')}}>
-
收款方式}>
-
+ {t('Receive methods')}}>
+
- 验证码}>
+ {t('Verification Code')}}>
-
-
+
+
@@ -109,7 +111,7 @@ const Withdraw = () => {
- 提交
+ {t('Submit')}
diff --git a/src/router/index.tsx b/src/router/index.tsx
index 7ee8867..3354895 100644
--- a/src/router/index.tsx
+++ b/src/router/index.tsx
@@ -10,6 +10,7 @@ import { unLoginPath } from "./routes";
import { Divider, Modal } from "antd";
import { NotifyStatus_Type } from "../types";
import { http_notify } from "../http/api";
+import { useTranslation } from "react-i18next";
import LanguageMenu from "../components/LanguageMenu";
const LayoutRouter = () => {
@@ -18,6 +19,8 @@ const LayoutRouter = () => {
const [visible, setVisible] = useState(false)
const { token, screenWidth } = store.state
const [notifys, setNotifys] = useState([] as any)
+ const { t } = useTranslation()
+
//
useEffect(() => {
@@ -31,6 +34,7 @@ const LayoutRouter = () => {
}
}, [])
+
useEffect(() => {
if (!token && !unLoginPath.includes(location.pathname) && location.pathname !== "/submit") {
@@ -46,8 +50,6 @@ const LayoutRouter = () => {
try {
const res: any = await http_notify()
if (res.code === 0) {
- console.log(res);
-
setNotifys(res.data)
const type = window.localStorage.getItem('NotifyStatus') || NotifyStatus_Type.show
if (type === NotifyStatus_Type.show && res.data && res.data.length > 0) {
@@ -72,14 +74,16 @@ const LayoutRouter = () => {
}
}, [token])
+ if (location.pathname === '/submit') return <>>
+
return (
<>
{
!token ? (
<>
- {/*
-
-
*/}
+
+
+
>
) : (
@@ -103,7 +107,7 @@ const LayoutRouter = () => {
onCancel={() => setVisible(false)}
footer={() => null}
width={screenWidth > 1000 ? '60%' : '90%'}
- title="平台公告"
+ title={t('Platform announcement')}
>
{
diff --git a/src/router/renderRouter.tsx b/src/router/renderRouter.tsx
index 24c7974..1a0ed18 100644
--- a/src/router/renderRouter.tsx
+++ b/src/router/renderRouter.tsx
@@ -2,14 +2,12 @@ import { Suspense } from "react";
import { Route, Routes } from "react-router-dom";
import routes from "./routes";
import { observer } from "mobx-react";
+import { Spin } from "antd";
const RenderRouter = () => {
return (
-
+
}>
{routes.map(item => {
diff --git a/src/router/routes.tsx b/src/router/routes.tsx
index 7731ad7..d025620 100644
--- a/src/router/routes.tsx
+++ b/src/router/routes.tsx
@@ -74,10 +74,6 @@ const routes = [
path: "/assetsRecords",
element:
},
- {
- path: "/personal",
- element:
- },
{
path: '/withdrawRecords',
element:
diff --git a/src/styles/app.scss b/src/styles/app.scss
index 7751b99..3c1eddd 100644
--- a/src/styles/app.scss
+++ b/src/styles/app.scss
@@ -58,7 +58,7 @@
}
.balance-button {
- width: 158px;
+ width: 188px;
height: 58px;
border-radius: 29px;
background-color: #fff;
@@ -66,6 +66,7 @@
font-size: 14px;
font-weight: normal;
text-align: center;
+ overflow: hidden;
}
}
diff --git a/src/styles/home.scss b/src/styles/home.scss
index f33ccd1..eafd4ac 100644
--- a/src/styles/home.scss
+++ b/src/styles/home.scss
@@ -62,7 +62,7 @@
border-radius: 5px;
}
- .upload{
+ .upload {
width: 100px;
height: 100px;
border-style: dashed;
@@ -73,14 +73,15 @@
user-select: none;
overflow: hidden;
position: relative;
- .delete{
+
+ .delete {
position: absolute;
top: 0;
right: 0;
z-index: 1;
}
- &:active{
+ &:active {
opacity: 0.6;
}
}
@@ -190,8 +191,10 @@
}
}
-.ant-tabs-nav-wrap {
- overflow: hidden;
- overflow-x: scroll;
- width: 400px;
+@media (max-width:1000px) {
+ .ant-tabs-nav-wrap {
+ overflow: hidden;
+ overflow-x: scroll;
+ max-width: calc(var(--width) - 30px);
+ }
}
\ No newline at end of file
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 9dea92c..b1dd039 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -1,4 +1,5 @@
import { notification } from "antd"
+import i18next from "i18next"
export function copy(value: string, cb?: Function) {
// 动态创建 textarea 标签
@@ -18,7 +19,7 @@ export function copy(value: string, cb?: Function) {
document.execCommand('Copy')
document.body.removeChild(textarea)
notification.success({
- message: '复制成功'
+ message: i18next.t('Copy successfully')
})
if (cb && Object.prototype.toString.call(cb) === '[object Function]') {
cb()