mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-02 03:40:27 +08:00
添加和修改域名只需要点击一次保存按钮
This commit is contained in:
@@ -19,6 +19,7 @@ Vue.component("server-name-box", {
|
||||
callback: function (resp) {
|
||||
var serverName = resp.data.serverName
|
||||
that.serverNames.push(serverName)
|
||||
setTimeout(that.submitForm, 100)
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -34,6 +35,7 @@ Vue.component("server-name-box", {
|
||||
callback: function (resp) {
|
||||
var serverName = resp.data.serverName
|
||||
Vue.set(that.serverNames, index, serverName)
|
||||
setTimeout(that.submitForm, 100)
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -69,6 +71,9 @@ Vue.component("server-name-box", {
|
||||
}
|
||||
})
|
||||
return result
|
||||
},
|
||||
submitForm: function () {
|
||||
Tea.runActionOn(this.$refs.serverNamesRef.form)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -95,7 +100,7 @@ Vue.component("server-name-box", {
|
||||
}
|
||||
},
|
||||
template: `<div>
|
||||
<input type="hidden" name="serverNames" :value="JSON.stringify(serverNames)"/>
|
||||
<input type="hidden" name="serverNames" :value="JSON.stringify(serverNames)" ref="serverNamesRef"/>
|
||||
<div v-if="serverNames.length > 0">
|
||||
<div v-for="(serverName, index) in serverNames" class="ui label small basic" :class="{hidden: serverName.isShowing === false}">
|
||||
<em v-if="serverName.type != 'full'">{{serverName.type}}</em>
|
||||
|
||||
Reference in New Issue
Block a user