mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 08:46:38 +08:00
文档对话不显示文档列表的 bug
This commit is contained in:
parent
950e7d1b00
commit
825a1b1027
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user