mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui-default: init
将ui-default合并至主存储库便于维护
This commit is contained in:
1 parent
6317c9057f
commit
5faa54c7ca
564 files changed
+23083
-14
No files matched your search
@@ -0,0 +1,53 @@
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import i18n from 'vj/utils/i18n';
|
||||
import Icon from 'vj/components/react/IconComponent';
|
||||
import Panel from './PanelComponent';
|
||||
import DataInput from './DataInputComponent';
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
input: state.pretest.input,
|
||||
output: state.pretest.output,
|
||||
rid: state.pretest.rid,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
handleDataChange(type, value) {
|
||||
dispatch({
|
||||
type: 'SCRATCHPAD_PRETEST_DATA_CHANGE',
|
||||
payload: {
|
||||
type,
|
||||
value,
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadPretestContainer extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<Panel
|
||||
title={(
|
||||
<span>
|
||||
<Icon name="edit" />
|
||||
{' '}
|
||||
{i18n('Pretest')}
|
||||
</span>
|
||||
)}
|
||||
>
|
||||
<div className="flex-row flex-fill">
|
||||
<DataInput
|
||||
title={i18n('Input')}
|
||||
value={this.props.input}
|
||||
onChange={(v) => this.props.handleDataChange('input', v)}
|
||||
/>
|
||||
<DataInput
|
||||
title={i18n('Output')}
|
||||
value={this.props.output}
|
||||
/>
|
||||
</div>
|
||||
</Panel>
|
||||
);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user