文档对话不显示文档列表的 bug

This commit is contained in:
RockYang 2025-03-06 14:00:13 +08:00
parent 950e7d1b00
commit 825a1b1027
3 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,5 @@
# 前端 Vue 项目构建
FROM registry.cn-shenzhen.aliyuncs.com/geekmaster/nginx:latest
FROM registry.cn-hangzhou.aliyuncs.com/geekmaster/nginx:1.20.2
MAINTAINER yangjian<yangjian102621@163.com>

View File

@ -1,5 +1,5 @@
# 前端 Vue 项目构建
FROM registry.cn-hangzhou.aliyuncs.com/geekmaster/nginx:1.20.2
FROM registry.cn-shenzhen.aliyuncs.com/geekmaster/nginx:latest
MAINTAINER yangjian<yangjian102621@163.com>

View File

@ -142,20 +142,30 @@ const processFiles = () => {
const linkRegex = /(https?:\/\/\S+)/g;
const links = props.data.content.match(linkRegex);
const urlPrefix = `${window.location.protocol}//${window.location.host}`;
if (links) {
httpPost("/api/upload/list", {urls: links}).then(res => {
files.value = res.data.items
const _links = links.map((link) => {
if (link.startsWith(urlPrefix)) {
return link.replace(urlPrefix, "");
}
return link;
});
//
const urls = [...new Set([...links, ..._links])];
httpPost("/api/upload/list", { urls: urls })
.then((res) => {
files.value = res.data.items;
for (let link of links) {
if (isExternalImg(link, files.value)) {
files.value.push({url:link, ext: ".png"})
files.value.push({ url: link, ext: ".png" });
}
}
}).catch(() => {
})
.catch(() => {});
for (let link of links) {
content.value = content.value.replace(link,"")
content.value = content.value.replace(link, "");
}
}