修改了编辑框1114444133
This commit is contained in:
parent
d8651570a3
commit
5005bf94c3
@ -1,5 +1,5 @@
|
|||||||
(function () {
|
(function () {
|
||||||
var URL = window.UEDITOR_HOME_URL || getUEBasePath(document.currentScript || document.scripts[document.scripts.length - 1]));
|
var URL = window.UEDITOR_HOME_URL || getUEBasePath(document.currentScript || document.scripts[document.scripts.length - 1]);
|
||||||
|
|
||||||
window.UEDITOR_CONFIG = {
|
window.UEDITOR_CONFIG = {
|
||||||
UEDITOR_HOME_URL: URL,
|
UEDITOR_HOME_URL: URL,
|
||||||
|
|||||||
@ -99,11 +99,22 @@
|
|||||||
const editorReady = ref(false)
|
const editorReady = ref(false)
|
||||||
|
|
||||||
// UEditor依赖文件配置
|
// UEditor依赖文件配置
|
||||||
const editorDependencies = [
|
const editorDependencies = computed(() => {
|
||||||
|
if (isProduction.value) {
|
||||||
|
// 线上环境:使用完整路径
|
||||||
|
return [
|
||||||
|
'/admin/web/UEditorPlus/ueditor.config.js',
|
||||||
|
'/admin/web/UEditorPlus/ueditor.all.js',
|
||||||
|
'/admin/web/UEditorPlus/lang/zh-cn/zh-cn.js'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
// 本地环境:使用相对路径
|
||||||
|
return [
|
||||||
'ueditor.config.js',
|
'ueditor.config.js',
|
||||||
'ueditor.all.js',
|
'ueditor.all.js',
|
||||||
'lang/zh-cn/zh-cn.js'
|
'lang/zh-cn/zh-cn.js'
|
||||||
]
|
]
|
||||||
|
})
|
||||||
|
|
||||||
const editorConfig = reactive({
|
const editorConfig = reactive({
|
||||||
// 基础路径配置 - 必须正确设置,避免路径拼接问题
|
// 基础路径配置 - 必须正确设置,避免路径拼接问题
|
||||||
@ -489,7 +500,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 检查依赖文件是否存在
|
// 检查依赖文件是否存在
|
||||||
editorDependencies.forEach(dep => {
|
editorDependencies.value.forEach(dep => {
|
||||||
fetch(dep)
|
fetch(dep)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user