mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-27 16:50:56 +00:00
Search Doc
This commit is contained in:
+33
-29
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { Ico } from '../../components/ui'
|
||||
import { Table } from 'antd'
|
||||
import { Table, Row, Col } from 'antd'
|
||||
import styles from './ico.less'
|
||||
|
||||
const iconlist = ['Cherry', 'Cheese', 'Bread', 'Beer', 'Beet', 'Bacon', 'Banana', 'Asparagus', 'Apple']
|
||||
@@ -10,34 +10,38 @@ const IcoPage = () => <div className='content-inner'>
|
||||
{iconlist.map(item => <li key={item}><Ico className={styles.icon} type={item} /><span className={styles.name}>{item}</span></li>)}
|
||||
</ul>
|
||||
<h2 style={{margin: '16px 0'}}>Props</h2>
|
||||
<Table rowKey={(record, key) => key}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={[
|
||||
{
|
||||
title: '参数',
|
||||
dataIndex: 'props'
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
dataIndex: 'desciption'
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'type'
|
||||
},
|
||||
{
|
||||
title: '默认值',
|
||||
dataIndex: 'default'
|
||||
}
|
||||
]}
|
||||
dataSource={[
|
||||
{
|
||||
props: 'type',
|
||||
desciption: '图标类型',
|
||||
type: 'string',
|
||||
default: '-'
|
||||
}]} />
|
||||
<Row>
|
||||
<Col lg={18} md={24}>
|
||||
<Table rowKey={(record, key) => key}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={[
|
||||
{
|
||||
title: '参数',
|
||||
dataIndex: 'props'
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
dataIndex: 'desciption'
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'type'
|
||||
},
|
||||
{
|
||||
title: '默认值',
|
||||
dataIndex: 'default'
|
||||
}
|
||||
]}
|
||||
dataSource={[
|
||||
{
|
||||
props: 'type',
|
||||
desciption: '图标类型',
|
||||
type: 'String',
|
||||
default: '-'
|
||||
}]} />
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
export default IcoPage
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
import React from 'react'
|
||||
import { Search } from '../../components/ui'
|
||||
import { Table, Row, Col, Card } from 'antd'
|
||||
|
||||
const SearchPage = () => <div className='content-inner'>
|
||||
<Row gutter={32}>
|
||||
<Col lg={8} md={12}>
|
||||
<Card title='默认'>
|
||||
<Search />
|
||||
</Card>
|
||||
</Col>
|
||||
<Col lg={8} md={12}>
|
||||
<Card title='附带选择'>
|
||||
<Search {...{
|
||||
select: true,
|
||||
selectOptions: [{ value: 'components', name: '组件' }, { value: 'page', name: '页面' }],
|
||||
selectProps: {
|
||||
defaultValue: 'components'
|
||||
}
|
||||
}} />
|
||||
</Card>
|
||||
</Col>
|
||||
<Col lg={8} md={12}>
|
||||
<Card title='大小'>
|
||||
<Search size='large' style={{marginBottom: 16}} />
|
||||
<Search size='small' />
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<h2 style={{margin: '16px 0'}}>Props</h2>
|
||||
<Row>
|
||||
<Col lg={18} md={24}>
|
||||
<Table rowKey={(record, key) => key}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={[
|
||||
{
|
||||
title: '参数',
|
||||
dataIndex: 'props'
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
dataIndex: 'desciption'
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'type'
|
||||
},
|
||||
{
|
||||
title: '默认值',
|
||||
dataIndex: 'default'
|
||||
}
|
||||
]}
|
||||
dataSource={[
|
||||
{
|
||||
props: 'size',
|
||||
desciption: '设置Search大小,可选值为 【small】 【large】 或者不设',
|
||||
type: 'String',
|
||||
default: '-'
|
||||
},
|
||||
{
|
||||
props: 'select',
|
||||
desciption: '设置是否有选择器',
|
||||
type: 'Boolean',
|
||||
default: 'false'
|
||||
},
|
||||
{
|
||||
props: 'selectOptions',
|
||||
desciption: '选择器的选项,格式为[{name:"",value:""}]或者[{value:""}]',
|
||||
type: 'Array',
|
||||
default: '-'
|
||||
},
|
||||
{
|
||||
props: 'selectProps',
|
||||
desciption: '选择器的属性,可参考antd的【Select】组件',
|
||||
type: 'Object',
|
||||
default: '-'
|
||||
},
|
||||
{
|
||||
props: 'onSearch',
|
||||
desciption: '点击搜索按钮或者点击清除时的回调',
|
||||
type: 'Function({keyword:string,field:string})',
|
||||
default: '-'
|
||||
}]} />
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
export default SearchPage
|
||||
Reference in New Issue
Block a user