Description
`render(slotRender: SlotRender): VElement {
return slotRender(slots.get(0)!, (children) => {
return (
<span
class="linkwd"
=> {
clearTimeout(clickTimer);
clickTimer = setTimeout(function () {
let urls = state.url.split(base)[1];
let urls1 = decodeURIComponent(urls);
let urls2 = Base64.decode(urls1);
if (urls2.length > 0) {
if (
urls2.endsWith("GCFX") ||
urls2.endsWith("SGCFX") ||
urls2.endsWith("SGCFG") ||
urls2.endsWith("GCFZ") ||
urls2.endsWith("SGCFZ") ||
urls2.endsWith("GCFG") ||
urls2.endsWith("CJZ") ||
urls2.endsWith("bak") ||
urls2.endsWith("sbak")
) {
return;
}
}
window.open(state.url);
}, 200);
}}
any) => {
clearTimeout(clickTimer);
let urls = state.url.split(base)[1];
let urls1 = decodeURIComponent(urls);
let urls2 = Base64.decode(urls1);
if (urls2.length > 0) {
let url = urls2;
let index = url.lastIndexOf("/");
let title = url.substring(index + 1);
let stff = "&BCSM&";
if (title.indexOf(stff) > -1) {
title = title.split(stff)[1];
}
const aElement = window.document.createElement("a"); // 创建a标签
aElement.style.display = "none";
document.body.appendChild(aElement);
aElement.href = url;
aElement.download = title;
aElement.click();
URL.revokeObjectURL(url);
document.body.removeChild(aElement);
// notification.open({
// message: title,
// description: "正在下载...",
// placement: "bottomRight",
// duration: 3,
// });
}
e.stopPropagation();
}}
>
附件:{children}
</span>
</p>
);
});
},`