feat: 🚀 切换站点清空语言
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user