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

- added watcher to update server

Ksawery Kuklinski преди 8 години
родител
ревизия
25d6a3e98f
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      webSource/serverDetails.vue

+ 5 - 0
webSource/serverDetails.vue

@@ -54,6 +54,11 @@ export default {
       server: {}
     }
   },
+  watch: {
+    "$root.servers": function () {
+      this.server = this.$root.servers[parseInt(this.$root.serversId[this.$route.params.id])];
+    }
+  },
   methods: {
     update: function () {
       if(this.$root.servers.length !== 0 && this.$root.serversId){