[网站域名]在列表中可以查看网站域名列表,并可以筛选

This commit is contained in:
刘祥超
2020-12-07 12:11:48 +08:00
parent 4bc19f11d2
commit d98568e490
6 changed files with 85 additions and 1 deletions

View File

@@ -51,7 +51,7 @@
<span v-if="server.serverNames.length > 0">
<span v-if="server.serverNames[0].subNames == null || server.serverNames[0].subNames.length == 0">{{server.serverNames[0].name}}</span>
<span v-else>{{server.serverNames[0].subNames[0]}}</span>
<span v-if="server.countServerNames > 1">等{{server.countServerNames}}个域名</span>
<span v-if="server.countServerNames > 1">等{{server.countServerNames}}个域名 <popup-icon :href="'/servers/serverNamesPopup?serverId=' + server.id" height="20em"></popup-icon></span>
</span>
<span v-else class="disabled">-</span>
</td>

View File

@@ -0,0 +1,11 @@
{$layout "layout_popup"}
<h3>查看域名</h3>
<form class="ui form">
<input type="text" name="keyword" v-model="keyword" placeholder="输入关键词搜索" ref="focus" autocomplete="off"/>
</form>
<div style="margin-top: 1em">
<span v-for="serverName in serverNames" class="ui label basic" style="margin-bottom: 0.5em">{{serverName}}</span>
</div>

View File

@@ -0,0 +1,14 @@
Tea.context(function () {
let allServerNames = this.serverNames.$copy();
this.keyword = ""
this.$delay(function () {
let that = this
this.$watch("keyword", function (keyword) {
that.serverNames = allServerNames.$findAll(function (k, serverName) {
return teaweb.match(serverName, keyword)
})
})
})
})