样式规范
通用样式
- 通用样式
- 存放在 hzero-front/src/assets/styles/ 中
- global.less: 全局的样式
- hzero-ui-override.less: 覆盖hzero-ui库的样式
- mixins.less: mixin 方法
- utils.less: mixin 方法 不推荐使用
- variables.less: 变量
1. 开发-界面
/**
* Event - 事件规则
* @date 2019-09-03
* @author WY <yang.wang06@hand-china.com>
* @copyright ® HAND 2019
*/
import React from 'react';
import { Button, Modal } from 'hzero-ui';
import { Header, Content } from 'components/Page';
import intl from 'utils/intl';
import SearchForm from './SearchForm';
import DataTable from './DataTable';
import EditForm from './EditForm';
export default class Event extends React.Component {
render() {
const { dataSource, pagination } = this.props;
const {
isCreate = false,
editModalVisible = false,
editRecord,
} = this.state;
return (
<React.Fragment>
<Header title={intl.get('demo.test.view.title.header').d('事件规则')}>
<Button type="primary">
{intl.get('hzero.common.button.batchImport').d('批量导入')}
</Button>
</Header>
<Content>
<SearchForm
wrappedComponentRef={this.searchFormRef}
onSearch={this.handleLineSearchFormSearch}
onChange={this.handleTableChange}
/>
<DataTable dataSource={dataSource} pagination={pagination}/>
</Content>
<Modal
visible={editModalVisible}
title={
isCreate
? intl.get('demo.test.view.title.new').d('新建事件规则')
: intl.get('demo.test.view.title.edit').d('编辑事件规则')
}
onOk={this.handleEditModalOk}
onCancel={this.handleEditModalCancel}
>
<EditForm
isCreate={isCreate}
dataSource={editRecord}
wrappedComponentRef={this.editFormRef}
/>
</Modal>
</React.Fragment>
);
}
}