改进界面

This commit is contained in:
刘祥超
2020-11-21 15:53:04 +08:00
parent 9ef9ea52f7
commit 9a1a8bd17f
31 changed files with 66 additions and 64 deletions

View File

@@ -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 () {

View File

@@ -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>`
})

View File

@@ -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>`

View File

@@ -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>`
})

View File

@@ -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"/>
&nbsp; <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>