节点增加DNS解析库类型设置

This commit is contained in:
GoEdgeLab
2022-05-04 16:41:28 +08:00
parent b2f7efe968
commit 4aa841ee5e
8 changed files with 174 additions and 13 deletions

View File

@@ -0,0 +1,43 @@
Vue.component("dns-resolver-config-box", {
props:["v-dns-resolver-config"],
data: function () {
let config = this.vDnsResolverConfig
if (config == null) {
config = {
type: "default"
}
}
return {
config: config,
types: [
{
name: "默认",
code: "default"
},
{
name: "CGO",
code: "cgo"
},
{
name: "Go原生",
code: "goNative"
},
]
}
},
template: `<div>
<input type="hidden" name="dnsResolverJSON" :value="JSON.stringify(config)"/>
<table class="ui table definition selectable">
<tr>
<td class="title">使用的DNS解析库</td>
<td>
<select class="ui dropdown auto-width" v-model="config.type">
<option v-for="t in types" :value="t.code">{{t.name}}</option>
</select>
<p class="comment">修改此项配置后,需要重启节点进程才会生效。<pro-warning-label></pro-warning-label></p>
</td>
</tr>
</table>
<div class="margin"></div>
</div>`
})