mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-08 16:00:26 +08:00
初步实现多集群共享节点
This commit is contained in:
@@ -8,7 +8,7 @@ Vue.component("dns-route-selector", {
|
||||
return {
|
||||
routes: routes,
|
||||
routeCodes: routes.$map(function (k, v) {
|
||||
return v.code
|
||||
return v.code + "@" + v.domainId
|
||||
}),
|
||||
isAdding: false,
|
||||
routeCode: ""
|
||||
@@ -31,7 +31,7 @@ Vue.component("dns-route-selector", {
|
||||
}
|
||||
let that = this
|
||||
let route = this.vAllRoutes.$find(function (k, v) {
|
||||
return v.code == that.routeCode
|
||||
return v.code + "@" + v.domainId == that.routeCode
|
||||
})
|
||||
if (route == null) {
|
||||
return
|
||||
@@ -53,8 +53,8 @@ Vue.component("dns-route-selector", {
|
||||
template: `<div>
|
||||
<input type="hidden" name="dnsRoutesJSON" :value="JSON.stringify(routeCodes)"/>
|
||||
<div v-if="routes.length > 0">
|
||||
<tiny-basic-label v-for="route in routes" :key="route.code">
|
||||
{{route.name}} <a href="" @click.prevent="remove(route)"><i class="icon remove"></i></a>
|
||||
<tiny-basic-label v-for="route in routes" :key="route.code + '@' + route.domainId">
|
||||
{{route.name}} <span class="grey small">({{route.domainName}})</span><a href="" @click.prevent="remove(route)"><i class="icon remove"></i></a>
|
||||
</tiny-basic-label>
|
||||
<div class="ui divider"></div>
|
||||
</div>
|
||||
@@ -64,7 +64,7 @@ Vue.component("dns-route-selector", {
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown auto-width" v-model="routeCode">
|
||||
<option value="">[请选择]</option>
|
||||
<option v-for="route in vAllRoutes" :value="route.code">{{route.name}}</option>
|
||||
<option v-for="route in vAllRoutes" :value="route.code + '@' + route.domainId">{{route.name}}({{route.domainName}})</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
|
||||
Reference in New Issue
Block a user