添加 dic 组件,select 和 value text
This commit is contained in:
26
admin-web/src/pages/Dictionary/DictionaryValueSelect.js
Normal file
26
admin-web/src/pages/Dictionary/DictionaryValueSelect.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { connect } from 'dva';
|
||||
import DictionarySelect from '../../components/Dictionary/DictionarySelect';
|
||||
|
||||
@connect(({ dictionarySelect, loading }) => ({
|
||||
data: dictionarySelect,
|
||||
loading: loading.models.dictionarySelect,
|
||||
}))
|
||||
class DictionaryValueSelect extends PureComponent {
|
||||
componentDidMount() {
|
||||
const { dataKey, dispatch } = this.props;
|
||||
dispatch({
|
||||
type: 'dictionarySelect/query',
|
||||
payload: {
|
||||
dataKey,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data } = this.props;
|
||||
return <DictionarySelect {...this.props} list={data.list} />;
|
||||
}
|
||||
}
|
||||
|
||||
export default DictionaryValueSelect;
|
||||
Reference in New Issue
Block a user