mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 05:30:27 +08:00
优化URL跳转交互
This commit is contained in:
@@ -69,8 +69,11 @@ Vue.component("http-host-redirect-box", {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
remove: function (index) {
|
remove: function (index) {
|
||||||
this.redirects.$remove(index)
|
let that = this
|
||||||
this.change()
|
teaweb.confirm("确定要删除这条跳转规则吗?", function () {
|
||||||
|
that.redirects.$remove(index)
|
||||||
|
that.change()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
change: function () {
|
change: function () {
|
||||||
let that = this
|
let that = this
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
{$template "/left_menu"}
|
{$template "/left_menu"}
|
||||||
|
|
||||||
<div class="right-box">
|
<div class="right-box">
|
||||||
<form class="ui form" method="post" data-tea-action="$" data-tea-success="success">
|
<form class="ui form" method="post" data-tea-action="$">
|
||||||
<input type="hidden" name="webId" :value="webId"/>
|
<input type="hidden" name="webId" :value="webId"/>
|
||||||
<http-host-redirect-box :v-redirects="redirects" @change="change"></http-host-redirect-box>
|
<http-host-redirect-box :v-redirects="redirects" @change="change"></http-host-redirect-box>
|
||||||
<submit-btn></submit-btn>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
Tea.context(function () {
|
Tea.context(function () {
|
||||||
this.success = NotifyReloadSuccess("保存成功")
|
|
||||||
|
|
||||||
this.change = function (values) {
|
this.change = function (values) {
|
||||||
this.$post("$")
|
this.$post("$")
|
||||||
.params({
|
.params({
|
||||||
@@ -8,7 +6,9 @@ Tea.context(function () {
|
|||||||
hostRedirectsJSON: JSON.stringify(values)
|
hostRedirectsJSON: JSON.stringify(values)
|
||||||
})
|
})
|
||||||
.success(function () {
|
.success(function () {
|
||||||
NotifyReloadSuccess("保存成功")()
|
teaweb.successToast("保存成功", null, function () {
|
||||||
|
teaweb.reload()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user