浏览代码

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

zhangxc 5 年之前
父节点
当前提交
e696dcdde0
共有 1 个文件被更改,包括 2 次插入2 次删除
  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
     const {diagShowTmp} = this.props
     let tmpFst = pinyin.getCamelChars(this.state.title);
     let tmpFst = pinyin.getCamelChars(this.state.title);
     // console.log(tmpFst.substr(0,1).toUpperCase())
     // 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
       // this.$inp.current.vaule = tmpFst
-    document.getElementById ('FstInp').value=tmpFst.substr(0,1).toUpperCase()
+    document.getElementById ('FstInp').value=tmpFst.toUpperCase()
     
     
   }
   }
   closeSaveModule() {
   closeSaveModule() {