feat: 🚀 切换站点清空语言

This commit is contained in:
2025-08-07 14:51:54 +08:00
parent 1566a72cb6
commit 29d6ba59c9
6 changed files with 387 additions and 48 deletions

View File

@@ -239,6 +239,7 @@ const options = reactive({
const options1 = reactive({
theme: "snow",
debug: "warn",
strict: false,
modules: {
toolbar: {
container: [
@@ -377,6 +378,7 @@ const handleHttpUpload = async options => {
fileItem.path = data.path;
}
const allFilesUploaded = imageListDb.value.every(item => item.path);
console.log(allFilesUploaded, "=allFilesUploaded=");
if (allFilesUploaded) {
let rawQuillEditor = "";
let quill = "";
@@ -395,10 +397,13 @@ const handleHttpUpload = async options => {
const insertPosition = selection ? selection.index : quill.getLength();
imageListDb?.value?.forEach(item => {
// 使用光标位置插入图片
quill.insertEmbed(insertPosition, "customImage", {
url: item.path,
id: item.serverImgId || generateUUID()
});
setTimeout(() => {
quill.insertEmbed(insertPosition, "customImage", {
url: item.path,
id: item.serverImgId || generateUUID()
});
}, 100);
// 插入后光标后移一位(避免多张图片重叠插入)
quill.setSelection(insertPosition + 1);
});