Ver código fonte

修复第一次上传回写问题

wolyshaw 4 anos atrás
pai
commit
a29701b3cd
2 arquivos alterados com 14 adições e 11 exclusões
  1. 12 9
      src/components/singe-file-upload/index.vue
  2. 2 2
      vue.config.js

+ 12 - 9
src/components/singe-file-upload/index.vue

@@ -32,15 +32,18 @@ export default {
     }
   },
   watch: {
-    value() {
-      if (this.value) {
-        this.filelist = [{
-          name: this.value,
-          url: this.value,
-        }]
-      } else {
-        this.remove()
-      }
+    value: {
+      handler() {
+        if (this.value) {
+          this.filelist = [{
+            name: this.value,
+            url: this.value,
+          }]
+        } else {
+          this.remove()
+        }
+      },
+      immediate: true
     }
   },
   data() {

+ 2 - 2
vue.config.js

@@ -21,8 +21,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://47.114.176.40:8000' // 测试服
-// let target = 'http://dev.dayaedu.com/' // 乔
+// let target = 'http://47.114.176.40:8000' // 测试服
+let target = 'http://dev.dayaedu.com/' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**