fix issue

pull/360/head
vapao 2021-07-24 10:45:20 +08:00
parent 989692a56e
commit ae521d93c6
2 changed files with 20 additions and 15 deletions

View File

@ -62,7 +62,6 @@ class ComTable extends React.Component {
showTotal: total => `${total}`, showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100'] pageSizeOptions: ['10', '20', '50', '100']
}}> }}>
<Table.Column title="序号" key="series" render={(_, __, index) => index + 1}/>
<Table.Column title="应用名称" dataIndex="name"/> <Table.Column title="应用名称" dataIndex="name"/>
<Table.Column title="标识符" dataIndex="key"/> <Table.Column title="标识符" dataIndex="key"/>
<Table.Column ellipsis title="描述信息" dataIndex="desc"/> <Table.Column ellipsis title="描述信息" dataIndex="desc"/>

View File

@ -5,7 +5,7 @@
*/ */
import React from 'react'; import React from 'react';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { Menu, Input, Button, Select, PageHeader, Modal } from 'antd'; import { Menu, Input, Button, PageHeader, Modal, Space, Radio } from 'antd';
import { import {
DiffOutlined, DiffOutlined,
HistoryOutlined, HistoryOutlined,
@ -102,11 +102,11 @@ class Index extends React.Component {
<div className={styles.right}> <div className={styles.right}>
<SearchForm> <SearchForm>
<SearchForm.Item span={6} title="视图" style={{paddingLeft: 0}}> <SearchForm.Item span={6} title="视图" style={{paddingLeft: 0}}>
<Select value={view} style={{width: '100%'}} onChange={v => this.setState({view: v})}> <Radio.Group value={view} onChange={e => this.setState({view: e.target.value})}>
<Select.Option value="1"><TableOutlined style={{marginRight: 10}}/>表格</Select.Option> <Radio.Button value="1"><TableOutlined title="表格视图"/></Radio.Button>
<Select.Option value="2"><UnorderedListOutlined style={{marginRight: 10}}/>文本</Select.Option> <Radio.Button value="2"><UnorderedListOutlined title="文本视图"/></Radio.Button>
<Select.Option value="3"><NumberOutlined style={{marginRight: 10}}/>JSON</Select.Option> <Radio.Button value="3"><NumberOutlined title="JSON视图"/></Radio.Button>
</Select> </Radio.Group>
</SearchForm.Item> </SearchForm.Item>
<SearchForm.Item span={7} title="Key"> <SearchForm.Item span={7} title="Key">
<Input allowClear value={store.f_name} onChange={e => store.f_name = e.target.value} placeholder="请输入"/> <Input allowClear value={store.f_name} onChange={e => store.f_name = e.target.value} placeholder="请输入"/>
@ -114,14 +114,20 @@ class Index extends React.Component {
<SearchForm.Item span={3}> <SearchForm.Item span={3}>
<Button type="primary" icon={<SyncOutlined/>} onClick={this.handleRefresh}>刷新</Button> <Button type="primary" icon={<SyncOutlined/>} onClick={this.handleRefresh}>刷新</Button>
</SearchForm.Item> </SearchForm.Item>
<SearchForm.Item span={4}> <SearchForm.Item span={8} style={{textAlign: 'right', padding: 0}}>
<Button type="primary" style={{backgroundColor: 'orange', borderColor: 'orange'}} <Space size="large">
<AuthButton
auth="config.app.edit_config|config.service.edit_config"
disabled={view !== '1'}
type="primary"
icon={<PlusOutlined/>}
onClick={() => store.showForm()}>新增配置</AuthButton>
<Button
type="primary"
style={{backgroundColor: 'orange', borderColor: 'orange'}}
icon={<HistoryOutlined/>} icon={<HistoryOutlined/>}
onClick={store.showRecord}>更改历史</Button> onClick={store.showRecord}>更改历史</Button>
</SearchForm.Item> </Space>
<SearchForm.Item span={4} style={{textAlign: 'right'}}>
<AuthButton auth="config.app.edit_config|config.service.edit_config" disabled={view !== '1'}
type="primary" icon={<PlusOutlined/>} onClick={() => store.showForm()}>新增配置</AuthButton>
</SearchForm.Item> </SearchForm.Item>
</SearchForm> </SearchForm>