Преглед изворни кода

h5游戏位置调整时不显示

natasha пре 1 недеља
родитељ
комит
1ff9690899

+ 8 - 0
src/views/book/courseware/create/components/base/common/UploadFile.vue

@@ -424,6 +424,14 @@ export default {
       this.content.file_list.push({ file_id, file_name, file_url });
       this.content.file_id_list.push(file_id);
       this.content.file_info_list.push({ file_id, file_name, title: '', intro });
+      if (this.canEditName) {
+        let obj = {
+          xuhao: '',
+          isEdit: false,
+          file_name: file_name,
+        };
+        this.$set(this.content.file_info, file_id, obj);
+      }
       this.visibleResource = false;
     },
     // 编辑文件名及序号

+ 7 - 0
src/views/book/courseware/preview/components/h5_games/H5GamesPreview.vue

@@ -37,6 +37,13 @@ export default {
       full_type: false,
     };
   },
+  watch: {
+    'data.file_list.length': {
+      handler(val) {
+        this.initData();
+      },
+    },
+  },
   created() {
     this.initData();
   },