换成单集群模式
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Tea.context(function () {
|
||||
var that = this;
|
||||
|
||||
if (typeof this.keywordInput == "undefined" || this.keywordInput == null) {
|
||||
this.keywordInput = "";
|
||||
}
|
||||
@@ -13,30 +15,29 @@
|
||||
this.keywordInput = String(this.keyword);
|
||||
|
||||
this.doSearch = function () {
|
||||
this.keyword = String(this.keywordInput || "").trim();
|
||||
that.keyword = String(that.keywordInput || "").trim();
|
||||
};
|
||||
|
||||
this.clearSearch = function () {
|
||||
this.keywordInput = "";
|
||||
this.keyword = "";
|
||||
that.keywordInput = "";
|
||||
that.keyword = "";
|
||||
};
|
||||
|
||||
this.filteredDomains = function () {
|
||||
let domains = Array.isArray(this.domains) ? this.domains : [];
|
||||
let keyword = String(this.keyword || "").trim().toLowerCase();
|
||||
let keyword = (that.keyword || "").trim().toLowerCase();
|
||||
if (keyword.length == 0) {
|
||||
return domains;
|
||||
return that.domains || [];
|
||||
}
|
||||
return domains.filter(function (domain) {
|
||||
return (that.domains || []).filter(function (domain) {
|
||||
let name = (domain.name || "").toLowerCase();
|
||||
return name.indexOf(keyword) >= 0;
|
||||
});
|
||||
};
|
||||
|
||||
this.bindDomain = function () {
|
||||
teaweb.popup("/httpdns/apps/domains/createPopup?appId=" + this.app.id, {
|
||||
height: "24em",
|
||||
width: "46em",
|
||||
teaweb.popup("/httpdns/apps/domains/createPopup?appId=" + that.app.id, {
|
||||
height: "12em",
|
||||
width: "36em",
|
||||
title: "添加域名",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
|
||||
Reference in New Issue
Block a user