- 短信服务 签名,添加后台管理

This commit is contained in:
sin-ning@aliyun.com
2019-05-26 18:17:17 +08:00
parent 24a7542704
commit e425d22bf7
14 changed files with 1156 additions and 4 deletions

View File

@@ -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> {}

View File

@@ -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() {

View File

@@ -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> {}