界面优化
This commit is contained in:
@@ -389,10 +389,10 @@
|
||||
<td>@item.CreateTime.ToString("yyyy.MM.dd")</td>
|
||||
<td>@item.ProductName</td>
|
||||
<td>@item.PackageName</td>
|
||||
<td>@item.Account</td>
|
||||
<td>@item.Pwd<img src="~/img/change.png" class="change" v-on:click="showAccountBox(@item.Id,'@item.Account','@item.Pwd')" /></td>
|
||||
<td>@item.Account <a style="cursor:pointer;" v-on:click="copyText('@item.Account')">复制</a></td>
|
||||
<td>@item.Pwd <a style="cursor:pointer;" v-on:click="copyText('@item.Pwd')">复制</a><img src="~/img/change.png" class="change" v-on:click="showAccountBox(@item.Id,'@item.Account','@item.Pwd')" /></td>
|
||||
<td class="blueT"><span v-if="@item.ProductId==28">@(item.Remark)<a v-on:click="change_ip('@item.Id','@item.PackageName','@item.Account','@item.Remark')" data-toggle="modal" data-target="#change_ip_city">切换</a></span></td>
|
||||
<td class="blueT" v-if="@item.ProductId==28">@(item.Raw)</td>
|
||||
<td class="blueT" v-if="@item.ProductId==28">@(item.Raw) <a style="cursor:pointer;" v-on:click="copyText('@(item.Raw)')">复制</a></td>
|
||||
<td class="blueT" v-if="@item.ProductId!=28"><a asp-action="Index" asp-controller="LineList" asp-route-ProductId="@item.ProductId" target="_blank">查看</a> </td>
|
||||
|
||||
<td>@item.ConnectCount</td>
|
||||
@@ -634,6 +634,31 @@
|
||||
this.getProducts();
|
||||
},
|
||||
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("复制失败");
|
||||
}
|
||||
);
|
||||
},
|
||||
change_ip(account_id,package,account,old_ip){
|
||||
this.province_city = [];
|
||||
let data = {
|
||||
|
||||
Reference in New Issue
Block a user