mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-11 19:53:50 +08:00
opt: optimize markdown image parser, identify image and blockquote tags
This commit is contained in:
@@ -102,6 +102,13 @@ export default defineComponent({
|
||||
border-radius: 5px;
|
||||
overflow: auto;
|
||||
|
||||
img {
|
||||
max-width: 600px;
|
||||
border-radius: 10px;
|
||||
margin 10px 0
|
||||
}
|
||||
|
||||
|
||||
a {
|
||||
color #20a0ff
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ import {ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {httpGet, httpPost} from "@/utils/http";
|
||||
import {PictureFilled, Plus} from "@element-plus/icons-vue";
|
||||
import {isImage} from "@/utils/libs";
|
||||
|
||||
const props = defineProps({
|
||||
userId: String,
|
||||
@@ -69,11 +70,6 @@ const fetchFiles = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const isImage = (ext) => {
|
||||
const expr = /\.(jpg|jpeg|png|gif|bmp|svg)$/i;
|
||||
return expr.test(ext);
|
||||
}
|
||||
|
||||
const getFileIcon = (ext) => {
|
||||
const files = {
|
||||
".docx": "doc.png",
|
||||
|
||||
Reference in New Issue
Block a user