Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
7d1e4b5b01
@ -0,0 +1,42 @@
|
||||
.WordNumberTextarea {
|
||||
outline: none; /* 去掉输入字符时的默认样式 */
|
||||
appearance:none;
|
||||
-webkit-appearance:none;
|
||||
-moz-appearance:none;
|
||||
background-color: white;
|
||||
text-shadow: none;
|
||||
-webkit-writing-mode: horizontal-tb !important;
|
||||
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
||||
resize:none; /*禁止拉伸*/
|
||||
border: none; /*去掉默认边框*/
|
||||
width: 100%;
|
||||
height:150px;
|
||||
border:none;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.WordNumbernote {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
text-decoration: none;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
height: auto;
|
||||
border: 1px solid rgba(234,234,234,1);
|
||||
border-radius: 0.125rem;
|
||||
margin: 0.31rem;
|
||||
padding: 0.19rem;
|
||||
backgroud:rgba(234,234,234,1);
|
||||
padding-bottom: 10px;
|
||||
padding-right: 10px;
|
||||
|
||||
}
|
||||
.WordNumberTextarea-count {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
font-size: 0.28rem;
|
||||
color: #adadad;
|
||||
padding-right: 0.25rem;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
import React, { Component } from 'react';
|
||||
import './WordNumberTextarea.css';
|
||||
class WordNumberTextarea extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
render() {
|
||||
return(
|
||||
<div className="WordNumbernote">
|
||||
<textarea
|
||||
placeholder={this.props.placeholder}
|
||||
className="WordNumberTextarea"
|
||||
value={this.props.value}
|
||||
onInput={(e)=>this.props.onInput(e)}
|
||||
maxlength={this.props.maxlength}
|
||||
/>
|
||||
<div className="WordNumberTextarea-count"><span>{this.props.value===undefined?0:this.props.value.length}</span>/{this.props.maxlength}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default WordNumberTextarea;
|
Loading…
Reference in new issue