mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-12 11:20:27 +08:00
改进界面
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
Vue.component("copy-to-clipboard", {
|
||||
props: ["v-target"],
|
||||
created: function () {
|
||||
let jsFile = document.createElement("script")
|
||||
jsFile.setAttribute("src", "/js/clipboard.min.js")
|
||||
document.head.appendChild(jsFile)
|
||||
if (typeof ClipboardJS == "undefined") {
|
||||
let jsFile = document.createElement("script")
|
||||
jsFile.setAttribute("src", "/js/clipboard.min.js")
|
||||
document.head.appendChild(jsFile)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
copy: function () {
|
||||
|
||||
@@ -41,11 +41,11 @@ Vue.component("countries-selector", {
|
||||
template: `<div>
|
||||
<input type="hidden" name="countryIdsJSON" :value="JSON.stringify(countryIds)"/>
|
||||
<div v-if="countries.length > 0" style="margin-bottom: 0.5em">
|
||||
<div v-for="(country, index) in countries" class="ui label tiny">{{country.name}} <a href="" title="删除" @click.prevent="remove(index)"><i class="icon remove"></i></a></div>
|
||||
<div v-for="(country, index) in countries" class="ui label tiny basic">{{country.name}} <a href="" title="删除" @click.prevent="remove(index)"><i class="icon remove"></i></a></div>
|
||||
<div class="ui divider"></div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="ui button small" type="button" @click.prevent="add">+</button>
|
||||
<button class="ui button tiny" type="button" @click.prevent="add">+</button>
|
||||
</div>
|
||||
</div>`
|
||||
})
|
||||
@@ -1,7 +1,7 @@
|
||||
Vue.component("network-addresses-view", {
|
||||
props: ["v-addresses"],
|
||||
template: `<div>
|
||||
<div class="ui label tiny" v-if="vAddresses != null" v-for="addr in vAddresses">
|
||||
<div class="ui label tiny basic" v-if="vAddresses != null" v-for="addr in vAddresses">
|
||||
{{addr.protocol}}://{{addr.host}}:{{addr.portRange}}
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
@@ -41,11 +41,11 @@ Vue.component("provinces-selector", {
|
||||
template: `<div>
|
||||
<input type="hidden" name="provinceIdsJSON" :value="JSON.stringify(provinceIds)"/>
|
||||
<div v-if="provinces.length > 0" style="margin-bottom: 0.5em">
|
||||
<div v-for="(province, index) in provinces" class="ui label tiny">{{province.name}} <a href="" title="删除" @click.prevent="remove(index)"><i class="icon remove"></i></a></div>
|
||||
<div v-for="(province, index) in provinces" class="ui label tiny basic">{{province.name}} <a href="" title="删除" @click.prevent="remove(index)"><i class="icon remove"></i></a></div>
|
||||
<div class="ui divider"></div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="ui button small" type="button" @click.prevent="add">+</button>
|
||||
<button class="ui button tiny" type="button" @click.prevent="add">+</button>
|
||||
</div>
|
||||
</div>`
|
||||
})
|
||||
@@ -56,7 +56,7 @@ Vue.component("values-box", {
|
||||
},
|
||||
template: `<div>
|
||||
<div style="margin-bottom: 1em" v-if="vValues.length > 0">
|
||||
<div class="ui label tiny" v-for="(value, index) in vValues" style="margin-top:0.4em;margin-bottom:0.4em">{{value}}
|
||||
<div class="ui label tiny basic" v-for="(value, index) in vValues" style="margin-top:0.4em;margin-bottom:0.4em">{{value}}
|
||||
<input type="hidden" :name="name" :value="value"/>
|
||||
<a href="" @click.prevent="update(index)" title="修改"><i class="icon pencil small" ></i></a>
|
||||
<a href="" @click.prevent="remove(index)" title="删除"><i class="icon remove"></i></a>
|
||||
|
||||
Reference in New Issue
Block a user