mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-02-26 03:45:37 +08:00
优化WAF区域/省份封禁:增加仅允许、增加中国香港澳台、内地等特殊区域
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
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.change = function () {
|
||||
|
||||
}
|
||||
|
||||
this.submit = function () {
|
||||
let selectedProvinces = []
|
||||
this.provinces.forEach(function (province) {
|
||||
if (province.isChecked) {
|
||||
selectedProvinces.push(province)
|
||||
}
|
||||
})
|
||||
NotifyPopup({
|
||||
code: 200,
|
||||
data: {
|
||||
selectedProvinces: selectedProvinces
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user