MCPcopy Create free account
hub / github.com/ElemeFE/element-react / render

Method render

src/input-number/InputNumber.jsx:140–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 }
139
140 render(): React.DOM {
141 const { controls, disabled, size } = this.props;
142 const { value, inputActive } = this.state;
143
144 return (
145 <div style={this.style()} className={this.className('el-input-number', size && `el-input-number--${size}`, {
146 'is-disabled': disabled,
147 'is-without-controls': !controls
148 })}>
149 {
150 controls && (
151 <span
152 className={this.classNames("el-input-number__decrease", {
153 'is-disabled': this.minDisabled
154 })}
155 onClick={this.decrease.bind(this)}
156 >
157 <i className="el-icon-minus"></i>
158 </span>
159 )
160 }
161 {
162 controls && (
163 <span
164 className={this.classNames("el-input-number__increase", {
165 'is-disabled': this.maxDisabled
166 })}
167 onClick={this.increase.bind(this)}
168 >
169 <i className="el-icon-plus"></i>
170 </span>
171 )
172 }
173 <Input
174 ref="input"
175 className={this.classNames({
176 'is-active': inputActive
177 })}
178 value={value}
179 disabled={disabled}
180 size={size}
181 onChange={this.onInput.bind(this)}
182 onKeyDown={this.onKeyDown.bind(this)}
183 onBlur={this.onBlur.bind(this)} />
184 </div>
185 )
186 }
187}
188
189InputNumber.propTypes = {

Callers

nothing calls this directly

Calls 3

styleMethod · 0.80
classNameMethod · 0.80
classNamesMethod · 0.80

Tested by

no test coverage detected