@jiangood/open-admin 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/dist/common-plugin.js +148 -0
- package/config/dist/config.js +45 -0
- package/config/dist/index.js +18 -0
- package/package.json +41 -0
- package/src/app.js +1 -0
- package/src/asserts/welcome.png +0 -0
- package/src/forms/demoForm.jsx +16 -0
- package/src/framework/components/DownloadFileButton.d.ts +11 -0
- package/src/framework/components/DownloadFileButton.jsx +33 -0
- package/src/framework/components/Ellipsis.jsx +39 -0
- package/src/framework/components/Ellipsis.less +8 -0
- package/src/framework/components/Gap/index.d.ts +23 -0
- package/src/framework/components/Gap/index.jsx +46 -0
- package/src/framework/components/LinkButton.d.ts +14 -0
- package/src/framework/components/LinkButton.jsx +10 -0
- package/src/framework/components/NamedIcon.tsx +15 -0
- package/src/framework/components/Page/index.d.ts +17 -0
- package/src/framework/components/Page/index.jsx +30 -0
- package/src/framework/components/Page/index.less +10 -0
- package/src/framework/components/PageLoading.tsx +27 -0
- package/src/framework/components/ProModal/index.tsx +66 -0
- package/src/framework/components/ProTable/components/ToolBar/index.jsx +123 -0
- package/src/framework/components/ProTable/components/ToolBar/index.less +53 -0
- package/src/framework/components/ProTable/index.d.ts +42 -0
- package/src/framework/components/ProTable/index.jsx +260 -0
- package/src/framework/components/ProTable/index.less +14 -0
- package/src/framework/components/ProTable/utils/index.js +43 -0
- package/src/framework/components/ValueType/index.jsx +34 -0
- package/src/framework/components/ValueType/registry.jsx +27 -0
- package/src/framework/components/index.ts +17 -0
- package/src/framework/components/system/ButtonList.d.ts +8 -0
- package/src/framework/components/system/ButtonList.jsx +42 -0
- package/src/framework/components/system/HasPerm.tsx +14 -0
- package/src/framework/components/system/index.tsx +29 -0
- package/src/framework/components/view/ViewBooleanEnableDisable.tsx +20 -0
- package/src/framework/components/view/ViewEllipsis.d.ts +11 -0
- package/src/framework/components/view/ViewEllipsis.jsx +30 -0
- package/src/framework/components/view/ViewFile.d.ts +10 -0
- package/src/framework/components/view/ViewFile.jsx +49 -0
- package/src/framework/components/view/ViewFileButton.d.ts +10 -0
- package/src/framework/components/view/ViewFileButton.jsx +0 -0
- package/src/framework/components/view/ViewImage.d.ts +9 -0
- package/src/framework/components/view/ViewImage.jsx +60 -0
- package/src/framework/components/view/ViewRange/index.d.ts +16 -0
- package/src/framework/components/view/ViewRange/index.jsx +20 -0
- package/src/framework/components/view/ViewText.tsx +16 -0
- package/src/framework/components/view/index.ts +10 -0
- package/src/framework/field-components/FieldBoolean.d.ts +13 -0
- package/src/framework/field-components/FieldBoolean.jsx +76 -0
- package/src/framework/field-components/FieldDate.d.ts +27 -0
- package/src/framework/field-components/FieldDate.jsx +114 -0
- package/src/framework/field-components/FieldDateRange.d.ts +6 -0
- package/src/framework/field-components/FieldDateRange.jsx +104 -0
- package/src/framework/field-components/FieldDictSelect.d.ts +13 -0
- package/src/framework/field-components/FieldDictSelect.jsx +16 -0
- package/src/framework/field-components/FieldEditor.d.ts +10 -0
- package/src/framework/field-components/FieldEditor.jsx +58 -0
- package/src/framework/field-components/FieldNumberRange.d.ts +13 -0
- package/src/framework/field-components/FieldNumberRange.jsx +59 -0
- package/src/framework/field-components/FieldPercent.d.ts +12 -0
- package/src/framework/field-components/FieldPercent.jsx +27 -0
- package/src/framework/field-components/FieldRemoteSelect.d.ts +13 -0
- package/src/framework/field-components/FieldRemoteSelect.jsx +87 -0
- package/src/framework/field-components/FieldRemoteSelectMultiple.d.ts +13 -0
- package/src/framework/field-components/FieldRemoteSelectMultiple.jsx +86 -0
- package/src/framework/field-components/FieldRemoteSelectMultipleInline.d.ts +20 -0
- package/src/framework/field-components/FieldRemoteSelectMultipleInline.jsx +86 -0
- package/src/framework/field-components/FieldRemoteTree.d.ts +21 -0
- package/src/framework/field-components/FieldRemoteTree.jsx +45 -0
- package/src/framework/field-components/FieldRemoteTreeCascader.d.ts +23 -0
- package/src/framework/field-components/FieldRemoteTreeCascader.jsx +61 -0
- package/src/framework/field-components/FieldRemoteTreeSelect.d.ts +17 -0
- package/src/framework/field-components/FieldRemoteTreeSelect.jsx +67 -0
- package/src/framework/field-components/FieldRemoteTreeSelectMultiple.d.ts +17 -0
- package/src/framework/field-components/FieldRemoteTreeSelectMultiple.jsx +72 -0
- package/src/framework/field-components/FieldSysOrgTree.d.ts +12 -0
- package/src/framework/field-components/FieldSysOrgTree.jsx +23 -0
- package/src/framework/field-components/FieldSysOrgTreeSelect.d.ts +12 -0
- package/src/framework/field-components/FieldSysOrgTreeSelect.jsx +23 -0
- package/src/framework/field-components/FieldTable.d.ts +17 -0
- package/src/framework/field-components/FieldTable.jsx +108 -0
- package/src/framework/field-components/FieldTable.less +29 -0
- package/src/framework/field-components/FieldTableSelect.d.ts +19 -0
- package/src/framework/field-components/FieldTableSelect.jsx +59 -0
- package/src/framework/field-components/FieldUploadFile.d.ts +34 -0
- package/src/framework/field-components/FieldUploadFile.jsx +141 -0
- package/src/framework/field-components/index.ts +21 -0
- package/src/framework/field-components/system/OrgTree.tsx +61 -0
- package/src/framework/field-components/system/RoleTree.tsx +53 -0
- package/src/framework/field-components/system/index.ts +2 -0
- package/src/framework/index.ts +5 -0
- package/src/framework/pages/LoginPage.d.ts +16 -0
- package/src/framework/pages/LoginPage.jsx +135 -0
- package/src/framework/pages/LoginPage.less +53 -0
- package/src/framework/pages/LoginPageUtils.ts +36 -0
- package/src/framework/pages/index.ts +2 -0
- package/src/framework/utils/ArrUtils.ts +229 -0
- package/src/framework/utils/ColorsUtils.ts +378 -0
- package/src/framework/utils/DateUtils.ts +187 -0
- package/src/framework/utils/DeviceUtils.ts +46 -0
- package/src/framework/utils/DomUtils.ts +50 -0
- package/src/framework/utils/EventBusUtils.ts +144 -0
- package/src/framework/utils/Logger.ts +40 -0
- package/src/framework/utils/MessageUtils.tsx +170 -0
- package/src/framework/utils/ObjectUtils.ts +118 -0
- package/src/framework/utils/StorageUtils.ts +50 -0
- package/src/framework/utils/StringUtils.ts +436 -0
- package/src/framework/utils/TreeUtils.ts +251 -0
- package/src/framework/utils/UrlUtils.ts +152 -0
- package/src/framework/utils/UuidUtils.ts +88 -0
- package/src/framework/utils/ValidateUtils.ts +28 -0
- package/src/framework/utils/index.ts +16 -0
- package/src/framework/utils/system/DictUtils.ts +97 -0
- package/src/framework/utils/system/FormRegistryUtils.ts +77 -0
- package/src/framework/utils/system/HttpUtils.ts +247 -0
- package/src/framework/utils/system/PageUtils.ts +163 -0
- package/src/framework/utils/system/PermUtils.ts +79 -0
- package/src/framework/utils/system/SysUtils.ts +97 -0
- package/src/framework/utils/system/ThemeUtils.ts +27 -0
- package/src/framework/utils/system/index.ts +7 -0
- package/src/framework/view-components/ViewApproveStatus.tsx +26 -0
- package/src/framework/view-components/ViewBoolean.tsx +6 -0
- package/src/framework/view-components/ViewFlowableInstanceProgress.d.ts +12 -0
- package/src/framework/view-components/ViewFlowableInstanceProgress.jsx +97 -0
- package/src/framework/view-components/ViewFlowableInstanceProgressButton.tsx +26 -0
- package/src/framework/view-components/ViewPassword.tsx +25 -0
- package/src/framework/view-components/ViewProps.ts +11 -0
- package/src/framework/view-components/index.ts +6 -0
- package/src/index.ts +2 -0
- package/src/layouts/PageRender.d.ts +22 -0
- package/src/layouts/PageRender.jsx +90 -0
- package/src/layouts/admin/HeaderRight.jsx +104 -0
- package/src/layouts/admin/TabPageRender.jsx +158 -0
- package/src/layouts/admin/index.jsx +161 -0
- package/src/layouts/admin/index.less +65 -0
- package/src/layouts/index.jsx +165 -0
- package/src/layouts/index.less +24 -0
- package/src/loading.jsx +18 -0
- package/src/pages/404.jsx +13 -0
- package/src/pages/about.jsx +14 -0
- package/src/pages/index.jsx +25 -0
- package/src/pages/login.jsx +21 -0
- package/src/pages/system/api/ApiDoc.jsx +144 -0
- package/src/pages/system/api/index.jsx +268 -0
- package/src/pages/system/api/perm.jsx +69 -0
- package/src/pages/system/dict/Dict.jsx +72 -0
- package/src/pages/system/dict/DictItem.jsx +177 -0
- package/src/pages/system/dict/index.jsx +25 -0
- package/src/pages/system/file/index.jsx +160 -0
- package/src/pages/system/job/index.jsx +324 -0
- package/src/pages/system/log/index.jsx +78 -0
- package/src/pages/system/org/index.jsx +262 -0
- package/src/pages/system/role/index.jsx +308 -0
- package/src/pages/system/role/perm.jsx +108 -0
- package/src/pages/system/sysManual/index.jsx +127 -0
- package/src/pages/system/user/UserPerm.jsx +97 -0
- package/src/pages/system/user/index.jsx +258 -0
- package/src/pages/test.jsx +200 -0
- package/src/pages/ureport/index.jsx +16 -0
- package/src/pages/userCenter/ChangePassword.jsx +63 -0
- package/src/pages/userCenter/index.jsx +90 -0
- package/src/pages/userCenter/manual.jsx +59 -0
- package/src/pages/userCenter/message.jsx +105 -0
- package/src/style/global.less +51 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Form, Input, Modal} from "antd";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import {history} from 'umi'
|
|
6
|
+
|
|
7
|
+
export default class extends React.Component {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
onFinish = (values) => {
|
|
11
|
+
HttpUtils.post('admin/userCenter/updatePwd', values).then(() => {
|
|
12
|
+
Modal.success({
|
|
13
|
+
title: '提示',
|
|
14
|
+
content: '修改密码成功',
|
|
15
|
+
onOk: () => {
|
|
16
|
+
SysUtils.setToken(null)
|
|
17
|
+
history.push('/login')
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
validator = (rule, value) => {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
HttpUtils.create().get("admin/sysUser/pwdStrength", {password: value}).then(response => {
|
|
26
|
+
const rs = response.data
|
|
27
|
+
if (!rs.success) {
|
|
28
|
+
reject(rs.message)
|
|
29
|
+
}
|
|
30
|
+
resolve()
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
render() {
|
|
37
|
+
return <div>
|
|
38
|
+
|
|
39
|
+
<Form onFinish={this.onFinish} style={{maxWidth: 400}}>
|
|
40
|
+
|
|
41
|
+
<Form.Item name='newPassword'
|
|
42
|
+
label='新密码'
|
|
43
|
+
extra={'请输入字母、数字、特殊字符'}
|
|
44
|
+
rules={[
|
|
45
|
+
{required: true},
|
|
46
|
+
{
|
|
47
|
+
validator: this.validator
|
|
48
|
+
}
|
|
49
|
+
]}
|
|
50
|
+
>
|
|
51
|
+
<Input.Password></Input.Password>
|
|
52
|
+
</Form.Item>
|
|
53
|
+
|
|
54
|
+
<Form.Item wrapperCol={{offset: 5}} style={{marginTop: 40}}>
|
|
55
|
+
<Button type="primary" htmlType="submit">
|
|
56
|
+
确定
|
|
57
|
+
</Button>
|
|
58
|
+
</Form.Item>
|
|
59
|
+
</Form>
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Avatar, Card, Col, Row, Tabs} from "antd";
|
|
3
|
+
import ChangePassword from "./ChangePassword";
|
|
4
|
+
import {HttpUtils, Page} from "../../framework";
|
|
5
|
+
|
|
6
|
+
export default class extends React.Component {
|
|
7
|
+
|
|
8
|
+
state = {
|
|
9
|
+
info :{}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
componentDidMount() {
|
|
13
|
+
HttpUtils.get('admin/userCenter/info').then(rs=>{
|
|
14
|
+
this.setState({info:rs})
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
render() {
|
|
19
|
+
const {info} = this.state;
|
|
20
|
+
return <Page padding backgroundGray>
|
|
21
|
+
<Row gutter={[16,16]}>
|
|
22
|
+
<Col md={6} sm={24}>
|
|
23
|
+
<Card title='个人信息'>
|
|
24
|
+
|
|
25
|
+
<div className='flex-center' style={{marginBottom:32}}>
|
|
26
|
+
<Avatar size={128} title='点击修改头像' />
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<table className='tmgg-table'>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr>
|
|
33
|
+
<td>用户名称</td>
|
|
34
|
+
<td align='right'>{info.name}</td>
|
|
35
|
+
</tr>
|
|
36
|
+
<tr>
|
|
37
|
+
<td>账号</td>
|
|
38
|
+
<td align='right'>{info.account}</td>
|
|
39
|
+
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<td>手机号码</td>
|
|
42
|
+
<td>{info.phone}</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td>用户邮箱</td>
|
|
46
|
+
<td>{info.email}</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>所属部门</td>
|
|
50
|
+
<td>{info.unit} {info.dept}</td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td>所属角色</td>
|
|
54
|
+
<td>{info.roles}</td>
|
|
55
|
+
</tr>
|
|
56
|
+
<tr>
|
|
57
|
+
<td>创建日期</td>
|
|
58
|
+
<td>{info.createTime}</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
</Card>
|
|
63
|
+
</Col>
|
|
64
|
+
<Col md={18} sm={24}>
|
|
65
|
+
<Card title='个人设置'>
|
|
66
|
+
<Tabs
|
|
67
|
+
items={[
|
|
68
|
+
{
|
|
69
|
+
label: '修改密码', key: 'pwd', children: <div>
|
|
70
|
+
<ChangePassword/>
|
|
71
|
+
</div>
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: '消息订阅', key: 'topic', children: <div>
|
|
75
|
+
当账号管理邮箱后,系统消息会发送邮件给您
|
|
76
|
+
</div>
|
|
77
|
+
}
|
|
78
|
+
]}
|
|
79
|
+
tabPosition='left'
|
|
80
|
+
>
|
|
81
|
+
</Tabs>
|
|
82
|
+
</Card>
|
|
83
|
+
</Col>
|
|
84
|
+
</Row>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
</Page>
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {HttpUtils, Page, ProTable} from "../../framework";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
tableRef = React.createRef()
|
|
9
|
+
|
|
10
|
+
columns = [
|
|
11
|
+
|
|
12
|
+
{
|
|
13
|
+
title: '名称',
|
|
14
|
+
dataIndex: 'name',
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
{
|
|
20
|
+
title: '版本',
|
|
21
|
+
dataIndex: 'version',
|
|
22
|
+
render(version) {
|
|
23
|
+
return 'v' +version;
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
{
|
|
28
|
+
title: '文件',
|
|
29
|
+
dataIndex: 'fileId',
|
|
30
|
+
render(id){
|
|
31
|
+
const url = ('admin/sysFile/preview/' + id);
|
|
32
|
+
return <a href={url} target='_blank'>查看文件</a>
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
{
|
|
38
|
+
title: '更新时间',
|
|
39
|
+
dataIndex: 'updateTime',
|
|
40
|
+
},
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
render() {
|
|
47
|
+
return <Page>
|
|
48
|
+
<ProTable
|
|
49
|
+
actionRef={this.tableRef}
|
|
50
|
+
request={(params) => HttpUtils.get('admin/sysManual/pageForUser', params)}
|
|
51
|
+
columns={this.columns}
|
|
52
|
+
/>
|
|
53
|
+
</Page>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Card, Tabs, Tag} from "antd";
|
|
3
|
+
import {ProTable} from "../../framework";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
tableRef = React.createRef()
|
|
8
|
+
|
|
9
|
+
columns = [
|
|
10
|
+
{
|
|
11
|
+
title: '时间',
|
|
12
|
+
dataIndex: 'createTime',
|
|
13
|
+
width: 150
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: '标题',
|
|
17
|
+
dataIndex: 'title',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: '内容',
|
|
21
|
+
dataIndex: 'content',
|
|
22
|
+
render(content, row) {
|
|
23
|
+
return <div dangerouslySetInnerHTML={{__html: content}}/>
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: '已读时间',
|
|
28
|
+
dataIndex: 'readTime',
|
|
29
|
+
width: 150
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: '状态',
|
|
33
|
+
dataIndex: 'isRead',
|
|
34
|
+
render: (v, row) => {
|
|
35
|
+
return v == true ? <Tag color='green'>已读</Tag> : <Tag color='red'>未读</Tag>;
|
|
36
|
+
},
|
|
37
|
+
width: 80
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
title: '-',
|
|
42
|
+
dataIndex: 'option',
|
|
43
|
+
render: (read, row) => {
|
|
44
|
+
if(!row.isRead)
|
|
45
|
+
return <Button size='small' onClick={() => this.read(row)}> 标记已读 </Button>
|
|
46
|
+
}, width: 80
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
read = (record) => {
|
|
51
|
+
HttpUtils.post("admin/user/msg/read", record).then(rs => {
|
|
52
|
+
this.tableRef.current.reload()
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
render() {
|
|
59
|
+
return <Card variant={"borderless"}>
|
|
60
|
+
|
|
61
|
+
<Tabs defaultActiveKey="0" destroyOnHidden
|
|
62
|
+
>
|
|
63
|
+
<Tabs.TabPane key='0' tab='所有消息'>
|
|
64
|
+
<ProTable
|
|
65
|
+
actionRef={this.tableRef}
|
|
66
|
+
request={(params) => HttpUtils.get("admin/user/msg/page", params)}
|
|
67
|
+
columns={this.columns}
|
|
68
|
+
toolbarOptions={{showSearch:false}}
|
|
69
|
+
size='small'
|
|
70
|
+
/>
|
|
71
|
+
</Tabs.TabPane>
|
|
72
|
+
<Tabs.TabPane key='1' tab='未读消息'>
|
|
73
|
+
<ProTable
|
|
74
|
+
actionRef={this.tableRef}
|
|
75
|
+
request={(params) => HttpUtils.get("admin/user/msg/page?read=false", params)}
|
|
76
|
+
columns={this.columns}
|
|
77
|
+
rowSelection={false}
|
|
78
|
+
rowKey='id'
|
|
79
|
+
toolbarOptions={{showSearch:false}}
|
|
80
|
+
size='small'
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
</Tabs.TabPane>
|
|
85
|
+
<Tabs.TabPane key='2' tab='已读消息'>
|
|
86
|
+
|
|
87
|
+
<ProTable
|
|
88
|
+
actionRef={this.tableRef}
|
|
89
|
+
request={(params) => HttpUtils.get("admin/user/msg/page?read=true", params)}
|
|
90
|
+
rowSelection={false}
|
|
91
|
+
rowKey='id'
|
|
92
|
+
toolbarOptions={{showSearch:false}}
|
|
93
|
+
options={false}
|
|
94
|
+
size='small'
|
|
95
|
+
columns={this.columns}
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
</Tabs.TabPane>
|
|
100
|
+
|
|
101
|
+
</Tabs>
|
|
102
|
+
|
|
103
|
+
</Card>
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*主要在layout中导入*/
|
|
2
|
+
table.tmgg-table {
|
|
3
|
+
width: 100%;
|
|
4
|
+
border-collapse: collapse; /* 合并边框 */
|
|
5
|
+
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
|
|
6
|
+
table-layout: fixed;
|
|
7
|
+
|
|
8
|
+
th {
|
|
9
|
+
background-color: #f2f2f2; /* 背景色 */
|
|
10
|
+
color: #333; /* 文字颜色 */
|
|
11
|
+
font-weight: bold; /* 加粗 */
|
|
12
|
+
padding: 12px 15px; /* 内边距 */
|
|
13
|
+
text-align: left; /* 文字对齐 */
|
|
14
|
+
border-bottom: 2px solid #ddd; /* 底部边框 */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
td {
|
|
18
|
+
padding: 10px 15px; /* 内边距 */
|
|
19
|
+
border-bottom: 1px solid #ddd; /* 底部边框 */
|
|
20
|
+
text-align: left; /* 文字对齐 */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* 表格行悬停效果 */
|
|
24
|
+
|
|
25
|
+
tr:hover {
|
|
26
|
+
background-color: #f5f5f5; /* 悬停背景色 */
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* 斑马纹效果 - 交替行颜色 */
|
|
30
|
+
tr:nth-child(even) {
|
|
31
|
+
background-color: #f9f9f9;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* 响应式表格 - 在小屏幕上添加水平滚动 */
|
|
35
|
+
@media screen and (max-width: 600px) {
|
|
36
|
+
table {
|
|
37
|
+
display: block;
|
|
38
|
+
overflow-x: auto;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
.flex-center {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|