From 2d704fb62459923206071b319f8423c3381145f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 11 六月 2025 00:18:20 +0800 Subject: [PATCH] 2025-06-11 --- src/utils/asyncIconComponent.jsx | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/utils/asyncIconComponent.jsx b/src/utils/asyncIconComponent.jsx index 7d89b29..2624be9 100644 --- a/src/utils/asyncIconComponent.jsx +++ b/src/utils/asyncIconComponent.jsx @@ -1,5 +1,5 @@ import React, {Component} from 'react' -import { Icon } from 'antd' +import { LoadingOutlined } from '@ant-design/icons' /** * @description 寮傛鍔犺浇妯″潡 @@ -21,10 +21,16 @@ this.setState({component}) } + componentWillUnmount () { + this.setState = () => { + return + } + } + render() { const C = this.state.component - return C ? <C {...this.props} /> : <Icon type="loading" /> + return C ? <C {...this.props} /> : <LoadingOutlined /> } } } \ No newline at end of file -- Gitblit v1.8.0