Преглед на файлове

标签管理 标签分类

DESKTOP-O04BTUJ\muzen преди 3 години
родител
ревизия
0911d64c93
променени са 1 файла, в които са добавени 13 реда и са изтрити 4 реда
  1. 13 4
      src/views/label/tag/detail.vue

+ 13 - 4
src/views/label/tag/detail.vue

@@ -208,10 +208,19 @@ export default {
       detail(this.form.firstId).then(res => {
         if (res.code === 0) {
           this.form = res.data
-          res.data.secondTags.length > 0 ? this.inside = true : this.outside = true
-          res.data.threeTag ? '' : this.form.threeTag = []
-          console.log(res.data.secondTags);
-          this.typeOptions = res.data.threeTag.length > 0 ? res.data.threeTag : res.data.secondTags.map(i => i.threeTag)
+          if (res.data.threeTag.length > 0) {
+            this.outside = true
+            this.form.threeTag = []
+            this.typeOptions = res.data.threeTag
+          } else {
+            this.typeOptions = []
+            this.inside = true
+            res.data.secondTags.map(i => {
+              i.threeTag.map(j => {
+                this.typeOptions.push(j)
+              })
+            })
+          }
         }
       })
     },