This commit is contained in:
wucongxing8150 2025-08-15 14:08:23 +08:00
parent 703dd48e3e
commit a67ad3a01a
3 changed files with 325 additions and 697 deletions

View File

@ -1,15 +1,10 @@
<template>
<div class="uebox">
<div v-if="editorError" class="editor-error">
<p>编辑器加载失败: {{ editorError }}</p>
<button @click="retryLoad">重试加载</button>
</div>
<vue-ueditor-wrap
v-model="content"
:editor-id="props.id"
:config="editorConfig"
:editorDependencies="editorDependencies"
:editorDependencies="['ueditor.config.js', 'ueditor.all.js', 'lang/zh-cn/zh-cn.js']"
@ready="onEditorReady"
@error="onEditorError"
/>
@ -19,53 +14,9 @@
<script setup>
import { VueUeditorWrap } from 'vue-ueditor-wrap'
import { computed, reactive, onMounted, ref } from 'vue'
import { computed, onMounted, reactive, ref } from 'vue'
import { useUserStore } from '/@/store/modules/system/user.js'
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const'
// API//退
const resolveApiBase = () => {
const env = import.meta.env || {}
const candidates = [
env.VITE_APP_API_URL, // 使
env.VITE_GLOB_API_URL,
env.VITE_API_BASE,
env.VITE_API_URL,
env.VITE_BASE_API,
// /退
typeof window !== 'undefined' ? window.__API_BASE__ : '',
typeof localStorage !== 'undefined' ? localStorage.getItem('API_BASE_URL') : ''
].filter(Boolean)
const base = candidates.length > 0 ? candidates[0] : ''
return base ? base.replace(/\/+$/,'') : ''
}
const apiBase = resolveApiBase()
const uploadEndpoint = '/support/file/upload'
const resolvedServerUrl = `${apiBase}${uploadEndpoint}`
// store
const userStore = useUserStore()
// UEditor
const isProduction = computed(() => {
return apiBase.includes('dev-casedata.igandan.com') || apiBase.includes('casedata.igandan.com')
})
const ueditorBasePath = computed(() => {
if (isProduction.value) {
// 线UEditorPlus
return '/admin/web/UEditorPlus/'
}
//
return '/UEditorPlus/'
})
//
console.log('UEditor环境配置:', {
apiBase: apiBase.value,
isProduction: isProduction.value,
ueditorBasePath: ueditorBasePath.value
})
const props = defineProps({
//
@ -83,6 +34,9 @@
const emits = defineEmits(['update:modelValue'])
// userStore
const userStore = useUserStore()
const content = computed({
get() {
return props.modelValue || ''
@ -94,85 +48,154 @@
}
})
//
const editorError = ref('')
const editorReady = ref(false)
//
const onEditorReady = (editorInstance) => {
console.log('UEditor已就绪:', editorInstance);
console.log('UEditor配置:', editorInstance.options);
console.log('UEditor serverHeaders:', editorInstance.getOpt('serverHeaders'));
console.log('UEditor serverUrl:', editorInstance.getOpt('serverUrl'));
// UEditor
const editorDependencies = computed(() => {
if (isProduction.value) {
// 线使UEDITOR_HOME_URL
return [
'ueditor.config.js',
'ueditor.all.js',
'lang/zh-cn/zh-cn.js'
]
// headers
const token = userStore.getToken;
if (token) {
editorInstance.options.serverHeaders = {
'Authorization': 'Bearer ' + token
};
console.log('手动设置UEditor headers:', editorInstance.options.serverHeaders);
}
// 使
return [
'ueditor.config.js',
'ueditor.all.js',
'lang/zh-cn/zh-cn.js'
]
})
};
const onEditorError = (error) => {
console.error('UEditor错误:', error);
};
const editorConfig = reactive({
// -
get UEDITOR_HOME_URL() {
return ueditorBasePath.value
},
get UEDITOR_CORS_URL() {
return ueditorBasePath.value
},
// 使
// 使
loadConfigFromServer: false,
// 使folder
serverUrl: `${resolvedServerUrl}?folder=${FILE_FOLDER_TYPE_ENUM.ARTICLE.value}`,
serverHeaders: computed(() => ({
'Authorization': 'Bearer ' + userStore.getToken
})),
//
initialFrameHeight: 500,
UEDITOR_HOME_URL: import.meta.env.MODE=="development" ? '/UEditorPlus/' : '/admin/web/UEditorPlus/',
UEDITOR_CORS_URL: import.meta.env.MODE=="development" ? '/UEditorPlus/' : '/admin/web/UEditorPlus/',
initialFrameHeight: 400, //
initialFrameWidth: '100%',
autoHeightEnabled: false,
catchRemoteImageEnable: false,
//
enableAutoSave: true,
autoSaveInterval: 60000, // 60
enableContextMenu: true,
//
imageActionName: "uploadimage",
imageFieldName: "file",
imageMaxSize: 8388608,
imageAllowFiles: [".jpg", ".png", ".jpeg"],
imageCompressEnable: false,
imageCompressBorder: 5000,
imageInsertAlign: "none",
imageUrlPrefix: "",
//
serverUrl: `${import.meta.env.VITE_APP_API_URL || 'http://127.0.0.1:1024'}/support/file/upload?folder=1`,
// - 使gettertoken
get serverHeaders() {
const token = userStore.getToken;
console.log('UEditor上传请求token:', token);
return {
'Authorization': 'Bearer ' + token
};
},
// headers
headers: {
'Authorization': 'Bearer ' + userStore.getToken
},
// UEditor使
loadConfigFromServer: false,
// ResponseDTOUEditor
serverResponsePrepare: function(response) {
try {
// JSON
if (typeof response === 'string') {
response = JSON.parse(response);
}
// -
imageActionName: 'uploadimage',
imageFieldName: 'file',
imageMaxSize: 2048000, // 2MB
imageAllowFiles: ['.png', '.jpg', '.jpeg', '.gif', '.bmp'],
imageCompressEnable: false, // webuploader
imageCompressBorder: 1600,
imageInsertAlign: 'none',
imageUrlPrefix: '',
// ResponseDTO
if (response && response.code === 200 && response.data) {
// UEditor使FileUploadVO
return {
state: 'SUCCESS',
url: response.data.fileUrl,
title: response.data.fileName,
original: response.data.fileName,
type: response.data.fileType,
size: response.data.fileSize
};
} else {
//
return {
state: 'ERROR',
error: response.msg || '上传失败'
};
}
} catch (e) {
console.error('处理上传响应失败:', e);
return {
state: 'ERROR',
error: '响应解析失败'
};
}
},
//
scrawlActionName: "uploadscrawl",
scrawlFieldName: "file",
scrawlMaxSize: 10485760,
scrawlUrlPrefix: "",
scrawlInsertAlign: "none",
// - 使
snapscreenActionName: "uploadimage",
snapscreenFieldName: "file",
snapscreenUrlPrefix: "",
snapscreenInsertAlign: "none",
//
catcherActionName: "catchimage",
catcherFieldName: "source",
catcherLocalDomain: ["127.0.0.1", "localhost"],
catcherUrlPrefix: "",
catcherMaxSize: 10485760,
catcherAllowFiles: [".jpg", ".png", ".jpeg"],
//
videoActionName: 'uploadvideo',
videoFieldName: 'file',
videoMaxSize: 102400000, // 100MB
videoAllowFiles: ['.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.wav', '.mid'],
videoUrlPrefix: '',
videoActionName: "uploadvideo",
videoFieldName: "file",
videoUrlPrefix: "",
videoMaxSize: 104857600,
videoAllowFiles: [".mp4"],
//
fileActionName: 'uploadfile',
fileFieldName: 'file',
fileMaxSize: 51200000, // 50MB
fileAllowFiles: ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.wav', '.mid', '.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml'],
fileUrlPrefix: '',
//
fileActionName: "uploadfile",
fileFieldName: "file",
fileUrlPrefix: "",
fileMaxSize: 104857600,
fileAllowFiles: [".zip", ".pdf", ".doc"],
//
//
imageManagerActionName: "listimage",
imageManagerListSize: 20,
imageManagerUrlPrefix: "",
imageManagerInsertAlign: "none",
imageManagerAllowFiles: [".jpg", ".png", ".jpeg"],
//
fileManagerActionName: "listfile",
fileManagerUrlPrefix: "",
fileManagerListSize: 20,
fileManagerAllowFiles: [".zip", ".pdf", ".doc"],
//
formulaConfig: {
imageUrlTemplate: "https://r.latexeasy.com/image.svg?{}"
},
toolbars:[
[
"fullscreen", //
//"fullscreen", //
"source", //
"|",
"undo", //
@ -232,8 +255,6 @@
"insertimage", //
"emotion", //
"scrawl", //
"insertvideo", //
"attachment", //
"insertframe", // Iframe
"insertcode", //
"pagebreak", //
@ -267,500 +288,7 @@
"searchreplace", //
"help", //
]
],
//
imageConfig: {
disableUpload: false,
disableOnline: false,
selectCallback: null
},
//
videoConfig: {
disableUpload: false,
selectCallback: null
},
//
attachmentConfig: {
disableUpload: false,
selectCallback: null
},
//
debug: false,
autoSaveEnable: true,
autoSaveRestore: false,
maximumWords: 10000,
maxUndoCount: 20,
minFrameHeight: 220,
autoFloatEnabled: false,
topOffset: 0,
toolbarTopOffset: 0,
// - webuploader
enableContextMenu: true,
catchRemoteImageEnable: false,
autoHeightEnabled: false,
//
tipError: function(message, title) {
console.error('UEditor Error:', message);
editorError.value = message;
}
})
//
const onEditorReady = (editorInstance) => {
console.log('UEditor已就绪:', editorInstance);
editorReady.value = true;
editorError.value = '';
//
if (editorInstance && editorInstance.setEnabled) {
try {
editorInstance.setEnabled(true);
} catch (error) {
console.error('启用编辑器失败:', error);
}
}
//
if (content.value) {
try {
editorInstance.setContent(content.value);
} catch (error) {
console.error('设置初始内容失败:', error);
}
}
//
if (editorInstance && editorInstance.addListener) {
try {
//
editorInstance.addListener('afterimagepaste', function(type, data) {
console.log('图片粘贴完成:', type, data);
});
editorInstance.addListener('afterimageinsert', function(type, data) {
console.log('图片插入完成:', type, data);
});
//
editorInstance.addListener('afterimageupload', function(type, data) {
console.log('图片上传完成:', type, data);
});
//
editorInstance.addListener('contentchange', function() {
console.log('编辑器内容变化');
const content = editorInstance.getContent();
console.log('当前内容:', content);
//
if (content.includes('<img')) {
console.log('检测到图片标签');
// undefinedsrc
if (content.includes('src="undefined"')) {
console.log('检测到undefined图片src尝试修复');
//
setTimeout(() => {
// URL
console.log('尝试修复undefined图片src');
}, 2000);
}
}
});
} catch (error) {
console.error('添加事件监听器失败:', error);
}
}
//
if (editorInstance && editorInstance.execCommand) {
try {
// execCommand
const originalExecCommand = editorInstance.execCommand;
// execCommand
editorInstance.execCommand = function(command, ...args) {
console.log('执行命令:', command, args);
if (command === 'inserthtml' && args[0] && args[0].includes('<img')) {
console.log('检测到图片插入命令:', args[0]);
}
//
return originalExecCommand.call(this, command, ...args);
};
console.log('已重写execCommand方法');
} catch (error) {
console.error('重写execCommand失败:', error);
}
}
}
//
const onEditorError = (error) => {
console.error('UEditor错误:', error);
editorError.value = error.message || '编辑器加载失败';
editorReady.value = false;
}
//
const retryLoad = () => {
editorError.value = '';
editorReady.value = false;
//
location.reload();
}
//
onMounted(() => {
// UEditor
const currentUeditorBasePath = ueditorBasePath.value
console.log('=== UEditor路径配置开始 ===')
console.log('当前环境:', isProduction.value ? '线上' : '本地')
console.log('设置UEditor全局路径:', currentUeditorBasePath)
// UEditor
window.UEDITOR_HOME_URL = currentUeditorBasePath;
window.UEDITOR_CORS_URL = currentUeditorBasePath;
// UEditor
window.UEDITOR_CONFIG = window.UEDITOR_CONFIG || {};
//
window.UEDITOR_CONFIG.UEDITOR_HOME_URL = currentUeditorBasePath;
window.UEDITOR_CONFIG.UEDITOR_CORS_URL = currentUeditorBasePath;
//
Object.defineProperty(window, 'UEDITOR_HOME_URL', {
get: () => currentUeditorBasePath,
set: (value) => {
console.warn('尝试修改UEDITOR_HOME_URL:', value, ',强制保持为:', currentUeditorBasePath)
},
configurable: false
})
Object.defineProperty(window, 'UEDITOR_CORS_URL', {
get: () => currentUeditorBasePath,
set: (value) => {
console.warn('尝试修改UEDITOR_CORS_URL:', value, ',强制保持为:', currentUeditorBasePath)
},
configurable: false
})
console.log('=== UEditor路径配置完成 ===')
// -
window.UEDITOR_CONFIG.onImageUploadSuccess = function(result) {
console.log('=== 图片上传成功回调开始 ===');
console.log('原始返回数据:', result);
console.log('数据类型:', typeof result);
console.log('是否为字符串:', typeof result === 'string');
let parsedResult;
try {
// resultJSON
if (typeof result === 'string') {
parsedResult = JSON.parse(result);
} else {
parsedResult = result;
}
console.log('解析后的数据:', parsedResult);
} catch (e) {
console.error('JSON解析失败:', e);
parsedResult = result;
}
//
if (parsedResult && parsedResult.data && parsedResult.data.fileUrl) {
const returnData = {
url: parsedResult.data.fileUrl,
title: parsedResult.data.fileName || '图片',
alt: parsedResult.data.fileName || '图片',
state: 'SUCCESS'
};
console.log('返回给UEditor的数据:', returnData);
return returnData;
}
//
console.error('数据格式错误无法提取fileUrl');
console.log('完整数据:', parsedResult);
return {
state: 'ERROR',
message: '上传失败:数据格式错误'
};
};
//
window.UEDITOR_CONFIG.onVideoUploadSuccess = function(result) {
console.log('视频上传成功回调:', result);
if (result && result.data && result.data.fileUrl) {
return {
url: result.data.fileUrl,
title: result.data.fileName,
state: 'SUCCESS'
};
}
return {
state: 'ERROR',
message: '上传失败:数据格式错误'
};
};
//
window.UEDITOR_CONFIG.onFileUploadSuccess = function(result) {
console.log('附件上传成功回调:', result);
if (result && result.data && result.data.fileUrl) {
return {
url: result.data.fileUrl,
title: result.data.fileName,
state: 'SUCCESS'
};
}
return {
state: 'ERROR',
message: '上传失败:数据格式错误'
};
};
//
editorDependencies.value.forEach(dep => {
fetch(dep)
.then(response => {
if (!response.ok) {
console.error(`依赖文件加载失败: ${dep}`);
editorError.value = `依赖文件加载失败: ${dep}`;
}
})
.catch(error => {
console.error(`依赖文件请求失败: ${dep}`, error);
editorError.value = `依赖文件请求失败: ${dep}`;
});
});
//
setTimeout(() => {
console.log('=== 延迟刷新UEditor配置开始 ===')
//
if (window.UEDITOR_HOME_URL !== currentUeditorBasePath) {
console.warn('检测到UEDITOR_HOME_URL被修改:', window.UEDITOR_HOME_URL, ',强制恢复为:', currentUeditorBasePath)
window.UEDITOR_HOME_URL = currentUeditorBasePath
}
if (window.UEDITOR_CORS_URL !== currentUeditorBasePath) {
console.warn('检测到UEDITOR_CORS_URL被修改:', window.UEDITOR_CORS_URL, ',强制恢复为:', currentUeditorBasePath)
window.UEDITOR_CORS_URL = currentUeditorBasePath
}
if (window.UE && window.UEDITOR_CONFIG) {
//
Object.assign(window.UEDITOR_CONFIG, editorConfig);
//
window.UEDITOR_CONFIG.UEDITOR_HOME_URL = currentUeditorBasePath;
window.UEDITOR_CONFIG.UEDITOR_CORS_URL = currentUeditorBasePath;
console.log('=== 延迟刷新UEditor配置完成 ===')
//
if (window.UEDITOR_CONFIG.onImageUploadSuccess) {
console.log('UEditor图片上传成功回调已设置');
}
if (window.UEDITOR_CONFIG.onVideoUploadSuccess) {
console.log('UEditor视频上传成功回调已设置');
}
if (window.UEDITOR_CONFIG.onFileUploadSuccess) {
console.log('UEditor附件上传成功回调已设置');
}
// UEditor
if (window.UE && window.UE.getEditor) {
try {
const editor = window.UE.getEditor(props.id);
if (editor && editor.addListener) {
editor.addListener('afterimagepaste', function(type, data) {
console.log('图片粘贴事件:', type, data);
});
editor.addListener('afterimageinsert', function(type, data) {
console.log('图片插入事件:', type, data);
});
editor.addListener('afterimageupload', function(type, data) {
console.log('图片上传事件:', type, data);
});
}
} catch (e) {
console.log('编辑器实例获取失败,可能还未初始化:', e);
}
}
// UEditor
if (window.UE && window.UE.getEditor) {
try {
const editor = window.UE.getEditor(props.id);
if (editor) {
//
const originalInsertImage = editor.insertImage;
if (originalInsertImage) {
editor.insertImage = function(url, title, alt) {
console.log('重写的insertImage被调用:', url, title, alt);
// URLundefined
if (!url || url === 'undefined') {
console.error('图片URL无效:', url);
return false;
}
//
return originalInsertImage.call(this, url, title, alt);
};
console.log('已重写insertImage方法');
}
}
} catch (e) {
console.log('重写insertImage失败:', e);
}
}
//
if (window.fetch) {
const originalFetch = window.fetch;
window.fetch = function(url, options) {
//
if (url && url.includes('/support/file/upload') && options && options.method === 'POST') {
console.log('拦截到图片上传请求:', url);
return originalFetch(url, options).then(response => {
// 便
const clonedResponse = response.clone();
//
clonedResponse.json().then(data => {
console.log('图片上传响应:', data);
//
if (data && data.code === 0 && data.data && data.data.fileUrl) {
console.log('图片上传成功,尝试强制插入:', data.data.fileUrl);
//
setTimeout(() => {
if (window.UE && window.UE.getEditor) {
try {
const editor = window.UE.getEditor(props.id);
if (editor && editor.execCommand) {
const imgHtml = `<img src="${data.data.fileUrl}" title="${data.data.fileName}" alt="${data.data.fileName}" />`;
console.log('插入图片HTML:', imgHtml);
editor.execCommand('inserthtml', imgHtml);
}
} catch (e) {
console.error('强制插入图片失败:', e);
}
}
}, 1000);
}
}).catch(e => {
console.error('读取响应失败:', e);
});
return response;
});
}
//
return originalFetch(url, options);
};
console.log('已拦截fetch请求');
}
// XMLHttpRequestUEditor使
if (window.XMLHttpRequest) {
const originalXHROpen = window.XMLHttpRequest.prototype.open;
const originalXHRSend = window.XMLHttpRequest.prototype.send;
window.XMLHttpRequest.prototype.open = function(method, url, ...args) {
this._ueditorUrl = url;
this._ueditorMethod = method;
return originalXHROpen.call(this, method, url, ...args);
};
window.XMLHttpRequest.prototype.send = function(data) {
const xhr = this;
const url = this._ueditorUrl;
const method = this._ueditorMethod;
//
if (url && url.includes('/support/file/upload') && method === 'POST') {
console.log('XMLHttpRequest拦截到图片上传请求:', url);
//
xhr.addEventListener('load', function() {
if (xhr.status === 200) {
try {
const response = JSON.parse(xhr.responseText);
console.log('XMLHttpRequest图片上传响应:', response);
//
if (response && response.code === 0 && response.data && response.data.fileUrl) {
console.log('XMLHttpRequest图片上传成功尝试强制插入:', response.data.fileUrl);
//
setTimeout(() => {
if (window.UE && window.UE.getEditor) {
try {
const editor = window.UE.getEditor(props.id);
if (editor && editor.execCommand) {
// undefined
const currentContent = editor.getContent();
if (currentContent.includes('src="undefined"')) {
console.log('删除undefined图片');
editor.setContent(currentContent.replace(/<img[^>]*src="undefined"[^>]*>/g, ''));
}
//
const imgHtml = `<img src="${response.data.fileUrl}" title="${response.data.fileName}" alt="${response.data.fileName}" />`;
console.log('插入图片HTML:', imgHtml);
editor.execCommand('inserthtml', imgHtml);
}
} catch (e) {
console.error('XMLHttpRequest强制插入图片失败:', e);
}
}
}, 1000);
}
} catch (e) {
console.error('XMLHttpRequest响应解析失败:', e);
}
}
});
}
return originalXHRSend.call(this, data);
};
console.log('已拦截XMLHttpRequest');
}
}
}, 3000);
// -
window.addEventListener('message', function(event) {
if (event.data && event.data.type === 'ueditor-image-upload-success') {
console.log('收到图片上传成功消息:', event.data);
//
}
});
]
})
</script>
@ -768,76 +296,5 @@
<style scoped>
.uebox {
width: 100%;
border-radius: 6px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
position: relative;
}
.editor-error {
padding: 20px;
background-color: #fff2f0;
border: 1px solid #ffccc7;
border-radius: 6px;
margin-bottom: 10px;
text-align: center;
}
.editor-error button {
margin-top: 10px;
padding: 8px 16px;
background-color: #1890ff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.editor-error button:hover {
background-color: #40a9ff;
}
/* 编辑器容器样式优化 */
.uebox :deep(.edui-editor) {
border: none !important;
width: 100% !important;
height: auto !important;
}
.uebox :deep(.edui-editor-toolbarbox) {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
border-bottom: 1px solid #e8e8e8;
width: 100% !important;
display: block !important;
}
.uebox :deep(.edui-editor-iframeholder) {
border: 1px solid #e8e8e8;
border-top: none;
width: 100% !important;
height: 500px !important;
}
.uebox :deep(.edui-editor-iframeholder iframe) {
width: 100% !important;
height: 100% !important;
pointer-events: auto !important;
}
.uebox :deep(.edui-editor-iframeholder .edui-body-container) {
pointer-events: auto !important;
width: 100% !important;
height: 100% !important;
}
/* 响应式设计 */
@media (max-width: 768px) {
.uebox {
margin: 0 -8px;
}
.uebox :deep(.edui-editor-toolbarbox) {
padding: 4px;
}
}
</style>

View File

@ -0,0 +1,171 @@
<template>
<div class="uebox">
<vue-ueditor-wrap v-model="content" :editor-id="props.id" :config="editorConfig"
:editorDependencies="['ueditor.config.js', 'ueditor.all.js', 'lang/zh-cn/zh-cn.js']" />
</div>
</template>
<script setup>
import { VueUeditorWrap } from 'vue-ueditor-wrap'
import { computed, onMounted, reactive, ref } from 'vue'
import userApi from "../api/user";
const props = defineProps({
//
modelValue: {
type: String,
default: ''
},
// serverUrl: {
// type: String,
// default: ''
// },
// id
id: {
type: String,
default: 'common_editor'
}
})
const emits = defineEmits(['update:modelValue'])
const content = computed({
get() {
return props.modelValue || ''
},
set(value) {
emits('update:modelValue', value)
return value
}
})
// const getConfig=()=>{
// userApi.getEditorConfig({
// action:'config'
// }).then((res) => {
// let result = res.data;
// if (result.code == 200) {
// }
// })
// }
const editorConfig =reactive({
serverUrl: '/admin/api/admin/system/editor',
serverHeaders: {
'Authorization': 'Bearer '+localStorage.getItem('token')
},
loadConfigFromServer: true,
UEDITOR_HOME_URL:import.meta.env.MODE=="development"?'/static/UEditorPlus/':'/admin/web/static/UEditorPlus/',
UEDITOR_CORS_URL: import.meta.env.MODE=="development"?'/static/UEditorPlus/':'/admin/web/static/UEditorPlus/',
initialFrameHeight: 400, //
initialFrameWidth: '100%',
autoHeightEnabled: false,
catchRemoteImageEnable:false,
toolbars:[
[
//"fullscreen", //
"source", //
"|",
"undo", //
"redo", //
"|",
"bold", //
"italic", //
"underline", // 线
"fontborder", //
"strikethrough",// 线
"superscript", //
"subscript", //
"removeformat", //
"formatmatch", //
"autotypeset", //
"blockquote", //
"pasteplain", //
"|",
"forecolor", //
"backcolor", //
"insertorderedlist", //
"insertunorderedlist", //
"selectall", //
"cleardoc", //
"|",
"rowspacingtop",//
"rowspacingbottom", //
"lineheight", //
"|",
"customstyle", //
"paragraph", //
"fontfamily", //
"fontsize", //
"|",
"directionalityltr", //
"directionalityrtl", //
"indent", //
"|",
"justifyleft", //
"justifycenter", //
"justifyright",
"justifyjustify", //
"|",
"touppercase", //
"tolowercase", //
"|",
"link", //
"unlink", //
"anchor", //
"|",
"imagenone", //
"imageleft", //
"imageright", //
"imagecenter", //
"|",
"simpleupload", //
"insertimage", //
"emotion", //
"scrawl", //
// "insertvideo", //
// "attachment", //
"insertframe", // Iframe
"insertcode", //
"pagebreak", //
"template", //
"background", //
"formula", //
"|",
"horizontal", // 线
"date", //
"time", //
"spechars", //
"wordimage", // Word
"|",
"inserttable", //
"deletetable", //
"insertparagraphbeforetable", //
"insertrow", //
"deleterow", //
"insertcol", //
"deletecol", //
"mergecells", //
"mergeright", //
"mergedown", //
"splittocells", //
"splittorows", //
"splittocols", //
"contentimport", // WordMarkdown
"|",
"print", //
"preview", //
"searchreplace", //
"help", //
]
]
})
</script>
<style scoped>
.uebox {
width: 100%;
}
</style>

View File

@ -13,7 +13,7 @@
<div class="box-item desc">
<div class="welcome">
<p>欢迎登录 肝胆相照临床病例库</p>
<p class="sub-welcome">高质量代码简洁高效安全的开发平台</p>
<!-- <p class="sub-welcome">高质量代码简洁高效安全的开发平台</p>-->
</div>
<img class="welcome-img" :src="loginGif" />
</div>