Ver Fonte

bug 修复

lilei há 4 anos atrás
pai
commit
1c45feb456
1 ficheiros alterados com 1 adições e 7 exclusões
  1. 1 7
      src/views/basicData/expenseType/editModal.vue

+ 1 - 7
src/views/basicData/expenseType/editModal.vue

@@ -124,13 +124,7 @@ export default {
       } else {
         //  获取父级分类 名称
         if (this.nowData && this.nowData.namePaths) {
-          let namePathsArr = []
-          namePathsArr = this.nowData.namePaths.split(',')
-          this.parentType = ''
-          namePathsArr.map((item, index) => {
-            this.parentType += item + ' > '
-          })
-          this.parentType = this.parentType ? this.parentType.substr(0, this.parentType.length - 3) : ''
+          this.parentType = this.nowData.namePaths.replace(/,/g, '>')
         } else {
           this.parentType = ''
         }