소스 검색

保存模板自动填充首字母

zhangxc 5 년 전
부모
커밋
23ba860009
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/components/Operation/index.jsx

+ 2 - 2
src/components/Operation/index.jsx

@@ -211,10 +211,10 @@ class Operation extends Component {
     let tmpFst = pinyin.getCamelChars(this.state.title);
     console.log(tmpFst)
     console.log(tmpFst.substr(0,1).toUpperCase())
-    this.setState({fstName:tmpFst})
+    this.setState({fstName:tmpFst.substr(0,1).toUpperCase()})
     console.log(this.$inp)
       // this.$inp.current.vaule = tmpFst
-    document.getElementById ('FstInp').value=tmpFst
+    document.getElementById ('FstInp').value=tmpFst.substr(0,1).toUpperCase()
     
   }
   closeSaveModule() {