import * as React from "react"; import { Input } from "@alifd/next"; import { createElement } from 'react'; interface AltStringSetterProps { // 当前值 value: string; // 默认值 initialValue: string; // setter 唯一输出 onChange: (val: string) => void; // AltStringSetter 特殊配置 placeholder: string; } export default class AltStringSetter extends React.PureComponent { componentDidMount() { const { onChange, value, defaultValue } = this.props; if (value == undefined && defaultValue) { onChange(defaultValue); } } // 声明 Setter 的 title static displayName = 'AltStringSetter'; render() { const { onChange, value, placeholder,size } = this.props; return ( onChange(val)} > ); } }