feat: 1.统一右侧抽屉关闭按钮布局 2.统一 UI 组件为 Ant Design 移除 radix-ui、floating-ui 组件 3. 修复 ESLint 文件格式错误的问题
This commit is contained in:
@@ -17,15 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { useEffectEvent } from '../../../hooks/common/useEffectEvent';
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import {
|
||||
Modal,
|
||||
Button,
|
||||
Spin,
|
||||
Typography,
|
||||
Space,
|
||||
Toast,
|
||||
} from '@/components/ui';
|
||||
import { Modal, Button, Spin, Typography, Space, Toast } from '@/components/ui';
|
||||
import { IconRefresh, IconClose } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import QRCode from 'qrcode';
|
||||
@@ -46,7 +40,7 @@ const WechatQRModal = ({ visible, onClose, orderData, pollFn }) => {
|
||||
const errorCountRef = useRef(0); // 错误计数
|
||||
|
||||
// 生成二维码
|
||||
useEffect(() => {
|
||||
const onVisibilityChange = useEffectEvent(() => {
|
||||
if (visible && orderData && orderData.code_url) {
|
||||
// 【Bug#5修复】重置过期状态,避免上一个过期订单影响新订单的展示
|
||||
setExpired(false);
|
||||
@@ -60,7 +54,11 @@ const WechatQRModal = ({ visible, onClose, orderData, pollFn }) => {
|
||||
stopPolling();
|
||||
stopExpireTimer();
|
||||
};
|
||||
}, [visible, orderData]);
|
||||
});
|
||||
useEffect(
|
||||
() => onVisibilityChange(),
|
||||
[onVisibilityChange, visible, orderData],
|
||||
);
|
||||
|
||||
const generateQRCode = async (url) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user