feat(ui): 添加自定义关闭按钮组件并应用到所有模态框

This commit is contained in:
zhang1106
2026-03-12 12:40:12 +08:00
parent 668ea073e6
commit 4569eabda7
22 changed files with 129 additions and 3 deletions
+8
View File
@@ -53,6 +53,7 @@ import Papa from 'papaparse';
import { motion, AnimatePresence } from 'framer-motion';
import { designTokens } from '../config/theme';
import { debounce } from '../utils/common';
import CloseButton from '../components/CloseButton';
const { Option } = Select;
const { Panel } = Collapse;
@@ -1235,6 +1236,11 @@ function CableManagement() {
width={700}
okText="确定"
cancelText="取消"
closeIcon={<CloseButton />}
styles={{
content: { padding: '24px' },
header: { marginBottom: 16 },
}}
okButtonProps={{
style: {
background: designTokens.colors.primary.gradient,
@@ -1446,6 +1452,7 @@ function CableManagement() {
</div>
}
open={importModalVisible}
closeIcon={<CloseButton />}
onCancel={() => {
setImportModalVisible(false);
setImportPreview([]);
@@ -1595,6 +1602,7 @@ function CableManagement() {
</div>
}
open={conflictModalVisible}
closeIcon={<CloseButton />}
onCancel={() => {
setConflictModalVisible(false);
setConflictInfo(null);