mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 01:50:27 +08:00
SSH认证可搜索
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
Tea.context(function () {
|
||||
this.grantId = 0;
|
||||
this.grantId = 0
|
||||
this.keyword = ""
|
||||
let allGrants = this.grants.$copy()
|
||||
|
||||
this.selectGrant = function (grant) {
|
||||
NotifyPopup({
|
||||
@@ -8,5 +10,20 @@ Tea.context(function () {
|
||||
grant: grant
|
||||
}
|
||||
})
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
this.$delay(function () {
|
||||
let that = this
|
||||
this.$watch("keyword", function (keyword) {
|
||||
if (keyword.length > 0) {
|
||||
that.grants = allGrants.$findAll(function (k, grant) {
|
||||
return teaweb.match(grant.name, keyword)
|
||||
|| teaweb.match(grant.description, keyword)
|
||||
|| teaweb.match(grant.username, keyword)
|
||||
})
|
||||
} else {
|
||||
that.grants = allGrants
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user