修复less导入污染全局
This commit is contained in:
@ -3,6 +3,7 @@ import { Form, Input, Switch, Tabs, message, Button } from 'antd';
|
||||
import WangEditor from '@/components/WangEidtor/WangEidtor';
|
||||
import { TopStatus, EnglishSetting } from '@/dicts/noticeManageDict';
|
||||
import { addNotice, updateNotice, getNoticeDetail } from '@/servers/api/notice';
|
||||
import styles from './noticeManage.less';
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
@ -161,13 +162,12 @@ const NoticeManageForm: React.FC<NoticeManageFormProps> = ({ id, isEdit, onSucce
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</Form>
|
||||
<div style={{ textAlign: 'right', marginTop: '20px' }}>
|
||||
<div className={styles.formActions}>
|
||||
<Button onClick={() => onSuccess()}>取消</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
loading={loading}
|
||||
onClick={handleSubmit}
|
||||
style={{ marginLeft: '8px' }}
|
||||
>
|
||||
提交
|
||||
</Button>
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Descriptions, Divider, Card, Tag } from 'antd';
|
||||
import { NoticeStatus, NoticeStatusText, NoticeStatusColor } from '@/dicts/noticeManageDict';
|
||||
import styles from './noticeManage.less';
|
||||
|
||||
interface NoticeManageInfoProps {
|
||||
data: API.NoticeRecord | null;
|
||||
@ -18,7 +19,7 @@ const NoticeManageInfo: React.FC<NoticeManageInfoProps> = ({ data }) => {
|
||||
if (!data) return null;
|
||||
|
||||
return (
|
||||
<div className="notice-detail-view">
|
||||
<div className={styles.noticeDetailView}>
|
||||
<Descriptions bordered column={2} size="small">
|
||||
<Descriptions.Item label="标题" span={2}>
|
||||
{data.title}
|
||||
@ -35,15 +36,15 @@ const NoticeManageInfo: React.FC<NoticeManageInfoProps> = ({ data }) => {
|
||||
</Descriptions>
|
||||
|
||||
<Divider orientation="left">中文内容</Divider>
|
||||
<Card size="small" bordered={false} className="content-card">
|
||||
<div className="notice-content" dangerouslySetInnerHTML={{ __html: data.content }} />
|
||||
<Card size="small" bordered={false} className={styles.contentCard}>
|
||||
<div className={styles.noticeContent} dangerouslySetInnerHTML={{ __html: data.content }} />
|
||||
</Card>
|
||||
|
||||
{data.contentEn && (
|
||||
<>
|
||||
<Divider orientation="left">英文内容</Divider>
|
||||
<Card size="small" bordered={false} className="content-card">
|
||||
<div className="notice-content" dangerouslySetInnerHTML={{ __html: data.contentEn }} />
|
||||
<Card size="small" bordered={false} className={styles.contentCard}>
|
||||
<div className={styles.noticeContent} dangerouslySetInnerHTML={{ __html: data.contentEn }} />
|
||||
</Card>
|
||||
</>
|
||||
)}
|
||||
@ -52,4 +53,3 @@ const NoticeManageInfo: React.FC<NoticeManageInfoProps> = ({ data }) => {
|
||||
};
|
||||
|
||||
export default NoticeManageInfo;
|
||||
|
@ -0,0 +1,18 @@
|
||||
.noticeDetailView {
|
||||
.contentCard {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.noticeContent {
|
||||
padding: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.formActions {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
|
||||
button {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
EyeOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { getNoticeList, addNotice, updateNotice, deleteNotice, batchDeleteNotice, updateNoticeStatus, updateNoticeTopStatus, getNoticeDetail } from '@/servers/api/notice';
|
||||
import './noticeManage.less';
|
||||
import styles from './noticeManage.less';
|
||||
import {
|
||||
NoticeStatus,
|
||||
NoticeStatusText,
|
||||
|
Reference in New Issue
Block a user