generated from VLADIMIR/template_frontend
fix load image
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Вечерний детектив</title>
|
<title>Вечерний детектив</title>
|
||||||
<script type="module" crossorigin src="/assets/index-DqaE-Bm5.js"></script>
|
<script type="module" crossorigin src="/assets/index-Dn-IZW42.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-Doxvwahk.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-CZManGvh.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { Settings } from '@vicons/carbon'
|
import { Settings } from '@vicons/carbon'
|
||||||
import { Icon } from '@vicons/utils'
|
import { Icon } from '@vicons/utils'
|
||||||
import { NButton, type UploadFileInfo, useMessage } from 'naive-ui'
|
import { NButton, type UploadFileInfo, useMessage } from 'naive-ui'
|
||||||
import { NAlert, NCard, NFlex, NInput, NModal, NSpace, NTag,NText, NUpload, NUploadDragger } from 'naive-ui'
|
import { NAlert, NCard, NFlex, NInput, NModal, NSpace, NTag, NText, NUpload, NUploadDragger } from 'naive-ui'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
@@ -155,11 +155,20 @@ async function updateScenario() {
|
|||||||
|
|
||||||
function uint8ToBase64(uint8Array: Uint8Array) {
|
function uint8ToBase64(uint8Array: Uint8Array) {
|
||||||
// Преобразуем Uint8Array в двоичную строку
|
// Преобразуем Uint8Array в двоичную строку
|
||||||
const binaryString = String.fromCharCode(...uint8Array)
|
const binaryString = fromCharCodeSafe(uint8Array)
|
||||||
// Кодируем в Base64
|
// Кодируем в Base64
|
||||||
return btoa(binaryString)
|
return btoa(binaryString)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fromCharCodeSafe(arr: Uint8Array) {
|
||||||
|
let result = '';
|
||||||
|
for (let i = 0; i < arr.length; i += 50000) {
|
||||||
|
const chunk = arr.slice(i, i + 50000);
|
||||||
|
result += String.fromCharCode(...chunk);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
const code = ref('')
|
const code = ref('')
|
||||||
const name = ref('')
|
const name = ref('')
|
||||||
const text = ref('')
|
const text = ref('')
|
||||||
|
|||||||
Reference in New Issue
Block a user