界面优化
This commit is contained in:
@@ -232,7 +232,7 @@
|
||||
<td colspan="7" v-if="!site.nasname" style="color:#339933;font-weight:bold;">{{site.city}}</td>
|
||||
<td v-if="site.nasname">{{site.city}}</td>
|
||||
<td v-if="site.nasname">{{site.supply}}</td>
|
||||
<td v-if="site.nasname">{{site.nasname}}</td>
|
||||
<td v-if="site.nasname">{{site.nasname}} <a style="cursor:pointer;" v-on:click="copyText(site.nasname)">复制</a></td>
|
||||
<td v-if="site.nasname">{{site.ip}}</td>
|
||||
<td v-if="site.nasname">{{site.daikuan}}</td>
|
||||
<td v-if="site.nasname">{{site.online}}</td>
|
||||
@@ -343,7 +343,7 @@
|
||||
data: {
|
||||
table_data: [],
|
||||
search_all_data: '',
|
||||
search_product_data:'',
|
||||
search_product_data:'混拨',
|
||||
product_id:0,
|
||||
l2tp:'',
|
||||
search_field:'全部',
|
||||
@@ -363,6 +363,31 @@
|
||||
this.select_product(0);
|
||||
},
|
||||
methods: {
|
||||
copyText(text) {
|
||||
// 检查浏览器是否支持 Clipboard API
|
||||
if (!navigator.clipboard) {
|
||||
// 如果不支持,则使用传统的 document.execCommand("copy") 方式
|
||||
const textArea = document.createElement("textarea");
|
||||
textArea.value = text;
|
||||
textArea.style.position = "fixed";
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(textArea);
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用 Clipboard API 复制内容到剪切板
|
||||
navigator.clipboard.writeText(text).then(
|
||||
function() {
|
||||
console.log("复制成功");
|
||||
},
|
||||
function() {
|
||||
console.log("复制失败");
|
||||
}
|
||||
);
|
||||
},
|
||||
select_product(ProductId){
|
||||
this.product_id = ProductId;
|
||||
let datalist = [];
|
||||
|
||||
Reference in New Issue
Block a user