- 短信服务 签名,添加后台管理
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import { Select } from 'antd';
|
||||
import * as React from 'react';
|
||||
|
||||
export interface IDictionarySelectProps extends Select {
|
||||
dicKey?: string;
|
||||
defaultValue?: string | number | boolean;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react/prefer-stateless-function
|
||||
export default class DictionarySelectD extends React.Component<IDictionarySelectProps, any> {}
|
||||
|
||||
@@ -4,7 +4,13 @@ import DictionaryContext from './DictionaryContext';
|
||||
|
||||
export default class DictionarySelect extends PureComponent {
|
||||
renderSelect(children) {
|
||||
return <Select {...this.props}>{children}</Select>;
|
||||
// eslint-disable-next-line react/destructuring-assignment
|
||||
// const { initialValue } = this.props['data-__meta'];
|
||||
const propsX = this.props;
|
||||
if (propsX.defaultValue === 'undefined' || propsX.defaultValue === 'null') {
|
||||
propsX.defaultValue = undefined;
|
||||
}
|
||||
return <Select {...propsX}>{children}</Select>;
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import { Select } from 'antd';
|
||||
import * as React from 'react';
|
||||
|
||||
export interface IDictionaryTextProps extends Select {
|
||||
dicKey?: string;
|
||||
dicValue?: string | number | boolean | Array<string | number | boolean>;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react/prefer-stateless-function
|
||||
export default class DictionaryText extends React.Component<IDictionaryTextProps, any> {}
|
||||
|
||||
Reference in New Issue
Block a user