This commit is contained in:
GoEdgeLab
2024-07-27 15:42:58 +08:00
parent 7279dc873f
commit d7d0c8fbfe
490 changed files with 2158 additions and 738 deletions

View File

@@ -0,0 +1,46 @@
Tea.context(function () {
this.isCheckingAll = false
this.countSelectedProviders = this.providers.$count(function (k, provider) {
return provider.isChecked
})
this.selectProvider = function (provider) {
provider.isChecked = !provider.isChecked
this.change()
}
this.deselectProvider = function (provider) {
provider.isChecked = false
this.change()
}
this.checkAll = function () {
this.isCheckingAll = !this.isCheckingAll
let that = this
this.providers.forEach(function (provider) {
provider.isChecked = that.isCheckingAll
})
this.change()
}
this.change = function () {
}
this.submit = function () {
let selectedProviders = []
this.providers.forEach(function (provider) {
if (provider.isChecked) {
selectedProviders.push(provider)
}
})
NotifyPopup({
code: 200,
data: {
selectedProviders: selectedProviders
}
})
}
})