Skip to content

Commit e61c1c7

Browse files
feat: add basic Button Tabs
1 parent 70d1b77 commit e61c1c7

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.umirc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default {
2121
],
2222
],
2323
publicPath: '/code-river-pc/',
24+
theme:'./src/theme.js',
2425
history: 'hash',
2526
cssLoaderOptions: {},
2627
alias: {

src/pages/basic/index.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { Card } from 'antd';
2+
import { Card, Button, Tabs } from 'antd';
33
import { connect } from 'dva';
44
import * as styles from './static/style.less';
55

@@ -9,6 +9,8 @@ import Input from 'component/common/Input';
99
import Popover from 'component/common/Popover';
1010
import Select from 'component/common/Select';
1111

12+
const { TabPane } = Tabs
13+
1214
@connect(({ displayModel }) => ({
1315
displayModel,
1416
}))
@@ -37,6 +39,19 @@ export default class Display extends Component<any> {
3739
<Card title=" input输入框">
3840
<Input />
3941
</Card>
42+
43+
<Card title="Button 按钮">
44+
<Button type="primary" style={{marginRight: '8px'}}>确定</Button>
45+
<Button>取消</Button>
46+
</Card>
47+
48+
<Card title="Tabs 标签页">
49+
<Tabs defaultActiveKey="1">
50+
<TabPane tab="Tab 1" key="1">Content of Tab Pane 1</TabPane>
51+
<TabPane tab="Tab 2" key="2">Content of Tab Pane 2</TabPane>
52+
<TabPane tab="Tab 3" key="3">Content of Tab Pane 3</TabPane>
53+
</Tabs>
54+
</Card>
4055
</div>
4156
);
4257
}
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +0,0 @@
1-
import Button from '@material-ui/core/Button';
2-
import styles from '../style.less';
3-
4-
function Index({ onClick }) {
5-
return (
6-
<Button
7-
variant="contained"
8-
className={styles.crButton}
9-
onClick={onClick}
10-
>
11-
登录
12-
</Button>
13-
)}
14-
15-
export default Index

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy