Forráskód Böngészése

模板名称首字母取全部名称首字母

zhangxc 5 éve
szülő
commit
e696dcdde0
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/components/Operation/index.jsx

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

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