fixed bug for audio and video downloading

This commit is contained in:
RockYang
2024-11-05 11:38:32 +08:00
parent ff9142ddd4
commit 6e03f4b363
5 changed files with 30 additions and 22 deletions

View File

@@ -225,6 +225,9 @@ export function showLoginDialog(router) {
}
export const replaceImg =(img) => {
if (!img.startsWith("http")) {
img = `${location.protocol}//${location.host}/${img}`
}
const devHost = process.env.VUE_APP_API_HOST
const localhost = "http://localhost:5678"
if (img.includes(localhost)) {

View File

@@ -23,7 +23,7 @@
请选择生成思维导图的AI模型
</div>
<div class="param-line">
<el-select v-model="modelID" placeholder="请选择模型" @change="changeModel" style="width:100%">
<el-select v-model="modelID" placeholder="请选择模型" style="width:100%">
<el-option
v-for="item in models"
:key="item.id"
@@ -243,6 +243,8 @@ const downloadImage = () => {
canvas.height = svgElement.offsetHeight
let context = canvas.getContext('2d')
context.clearRect(0, 0, canvas.width, canvas.height);
context.fillStyle = 'white';
context.fillRect(0, 0, canvas.width, canvas.height);
image.onload = function () {
context.drawImage(image, 0, 0)