Browse Source

Fix: update tags list after edit

remotes/philippdormann/main
Nelson Chan 4 years ago
parent
commit
970b6e077f
  1. 6
      src/pages/EditMonitor.vue

6
src/pages/EditMonitor.vue

@ -287,7 +287,7 @@ export default {
this.dnsresolvetypeOptions = dnsresolvetypeOptions; this.dnsresolvetypeOptions = dnsresolvetypeOptions;
}, },
methods: { methods: {
init() { fetchTags() {
this.$root.getSocket().emit("getTags", (res) => { this.$root.getSocket().emit("getTags", (res) => {
if (res.ok) { if (res.ok) {
this.tags = res.tags; this.tags = res.tags;
@ -295,6 +295,9 @@ export default {
toast.error(res.msg) toast.error(res.msg)
} }
}); });
},
init() {
this.fetchTags();
if (this.isAdd) { if (this.isAdd) {
console.log("??????") console.log("??????")
@ -345,6 +348,7 @@ export default {
this.$refs.tagsManager.submit(this.monitor.id); this.$refs.tagsManager.submit(this.monitor.id);
this.$root.getSocket().emit("editMonitor", this.monitor, (res) => { this.$root.getSocket().emit("editMonitor", this.monitor, (res) => {
this.fetchTags();
this.processing = false; this.processing = false;
this.$root.toastRes(res) this.$root.toastRes(res)
}) })

Loading…
Cancel
Save