Commit 729a78f4 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化站点跳转信息展示

parent 5532badb
......@@ -206,15 +206,14 @@ export default {
description: (
<div>
<div class="notif-name">完整链接:</div>
<div id="FullUrl">{redirectUrl + params}</div>
<div>{redirectUrl + params}</div>
<div class="notif-name">链接参数:</div>
<div id="Params">{params}</div>
<div>{params}</div>
</div>
),
style: {
"word-break": "break-all",
},
onClick: _this.copyContent,
icon: <a-icon type="smile" style="color: #108ee9" />,
});
}
......@@ -276,35 +275,6 @@ export default {
return false;
},
// 复制链接内容
copyContent(dom) {
let target = dom.target.id;
if (target === "FullUrl") {
this.copy("FullUrl");
} else if (target === "Params") {
this.copy("Params");
}
},
copy(element) {
let _this = this;
let dom = document.getElementById(element);
let textToCopy = dom.innerText;
// let range = document.createRange();
// range.selectNodeContents(dom);
// let selection = window.getSelection();
// selection.removeAllRanges();
// selection.addRange(range);
navigator.clipboard
.writeText(textToCopy)
.then(function () {
_this.$message.success("复制成功");
})
.catch(function (err) {
_this.$message.error("复制失败");
});
},
// 获取重定向地址
getFinalRedirect(url) {
return fetch(url, { method: "GET", redirect: "follow" })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment