From ba9e189dd33c8d48f7f4ac36bcefeef9afb426f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 七月 2023 23:40:49 +0800 Subject: [PATCH] 2023-07-17 --- src/tabviews/custom/components/card/cardcellList/asyncButtonComponent.jsx | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/card/cardcellList/asyncButtonComponent.jsx b/src/tabviews/custom/components/card/cardcellList/asyncButtonComponent.jsx index 9c160c8..aa0307b 100644 --- a/src/tabviews/custom/components/card/cardcellList/asyncButtonComponent.jsx +++ b/src/tabviews/custom/components/card/cardcellList/asyncButtonComponent.jsx @@ -1,6 +1,4 @@ import React, {Component} from 'react' -import { Button } from 'antd' - /** * @description 寮傛鍔犺浇妯″潡 * @param {*} importComponent @@ -21,14 +19,17 @@ this.setState({component}) } + componentWillUnmount () { + this.setState = () => { + return + } + } + // <Button className="loading-skeleton" disabled={true}></Button> // 楠ㄦ灦鎸夐挳 render() { const C = this.state.component - const btn = this.props.btn || {} - return C ? - <C {...this.props} /> : - <Button className={'mk-btn mk-' + btn.class} type={btn.show !== 'button' ? 'link' : ''} icon={btn.icon} disabled={true} >{btn.label}</Button> + return C ? <C {...this.props} /> : null } } } \ No newline at end of file -- Gitblit v1.8.0