Files
EdgeAdmin/web/public/js/components/dns/dns-resolver-config-box.js

43 lines
1007 B
JavaScript
Raw Normal View History

2022-05-04 16:41:28 +08:00
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>
2022-05-18 21:02:47 +08:00
<p class="comment">边缘节点使用的DNS解析库修改此项配置后需要重启节点进程才会生效<pro-warning-label></pro-warning-label></p>
2022-05-04 16:41:28 +08:00
</td>
</tr>
</table>
<div class="margin"></div>
</div>`
})