[WAF]省份封禁增加全选功能

This commit is contained in:
GoEdgeLab
2020-12-04 09:51:18 +08:00
parent 1dad8af0c3
commit 9e3dc3d2d2
4 changed files with 40 additions and 2 deletions

View File

@@ -1,20 +1,28 @@
Tea.context(function () {
this.isCheckingAll = false
this.countSelectedProvinces = this.provinces.$count(function (k, province) {
return province.isChecked
})
this.selectProvince = function (province) {
province.isChecked = !province.isChecked
this.change()
}
this.deselectProvince = function (province) {
province.isChecked = false
this.change()
}
this.checkAll = function () {
this.isCheckingAll = !this.isCheckingAll
let that = this
this.provinces.forEach(function (province) {
province.isChecked = that.isCheckingAll
})
this.change()
}
this.success = function () {
@@ -23,6 +31,13 @@ Tea.context(function () {
})
}
this.change = function () {
this.countSelectedProvinces = this.provinces.$count(function (k, province) {
return province.isChecked
})
}
/**
* 添加IP名单菜单
*/