mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-20 08:00:30 +08:00
[用户节点]可以管理用户节点
This commit is contained in:
26
web/views/@default/settings/user-nodes/index.js
Normal file
26
web/views/@default/settings/user-nodes/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
Tea.context(function () {
|
||||
// 创建节点
|
||||
this.createNode = function () {
|
||||
teaweb.popup("/settings/userNodes/node/createPopup", {
|
||||
width: "50em",
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除节点
|
||||
this.deleteNode = function (nodeId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此节点吗?", function () {
|
||||
that.$post("/settings/userNodes/delete")
|
||||
.params({
|
||||
nodeId: nodeId
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user