界面优化
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
<tr style="color:red">
|
||||
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-status="@(item.Status)" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" style="width: 0.4rem;height: 0.4rem;" /></td>
|
||||
<td>@item.ProductName/@item.PackageName</td>
|
||||
<td>@item.Account<br>@item.Pwd</td>
|
||||
<td>@item.Account <a style="cursor:pointer;" v-on:click="copyText('@item.Account')">复制</a><br>@item.Pwd <a style="cursor:pointer;" v-on:click="copyText('@item.Pwd')">复制</a></td>
|
||||
<td>
|
||||
<button type="button" class="btnXq toDetail"
|
||||
a-Id="@item.Id"
|
||||
@@ -526,6 +526,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