Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-book
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-book
Commits
2228ca7b
提交
2228ca7b
authored
7月 22, 2026
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(admin): colocate image and gallery features
上级
afcc4c73
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
18 行增加
和
18 行删除
+18
-18
GalleryDialog.jsx
...on/wangeditor-customer/features/gallery/GalleryDialog.jsx
+4
-4
GalleryItem.jsx
...mmon/wangeditor-customer/features/gallery/GalleryItem.jsx
+1
-1
feature.js
...rc/common/wangeditor-customer/features/gallery/feature.js
+4
-4
inline-node.js
...ommon/wangeditor-customer/features/gallery/inline-node.js
+0
-0
menu.js
...n/src/common/wangeditor-customer/features/gallery/menu.js
+0
-0
node.js
...n/src/common/wangeditor-customer/features/gallery/node.js
+1
-1
online-menu.js
...ommon/wangeditor-customer/features/gallery/online-menu.js
+0
-0
ImageDialog.jsx
...common/wangeditor-customer/features/image/ImageDialog.jsx
+2
-2
edit-menu.js
...rc/common/wangeditor-customer/features/image/edit-menu.js
+0
-0
feature.js
.../src/common/wangeditor-customer/features/image/feature.js
+3
-3
menu.js
...min/src/common/wangeditor-customer/features/image/menu.js
+0
-0
node.jsx
...in/src/common/wangeditor-customer/features/image/node.jsx
+1
-1
online-menu.js
.../common/wangeditor-customer/features/image/online-menu.js
+0
-0
index.jsx
apps/admin/src/common/wangeditor-customer/index.jsx
+2
-2
OnlineImageList.jsx
...ngeditor-customer/shared/online-image/OnlineImageList.jsx
+0
-0
没有找到文件。
apps/admin/src/common/wangeditor-customer/
components/gallery
.jsx
→
apps/admin/src/common/wangeditor-customer/
features/gallery/GalleryDialog
.jsx
浏览文件 @
2228ca7b
import
{
useState
,
useEffect
,
forwardRef
}
from
"react"
;
import
{
useState
,
useEffect
,
forwardRef
}
from
"react"
;
import
{
Divider
,
Input
,
Space
,
Button
,
Form
,
ColorPicker
,
Tabs
,
Select
,
Row
,
Col
}
from
"antd"
;
import
{
Divider
,
Input
,
Space
,
Button
,
Form
,
ColorPicker
,
Tabs
,
Select
,
Row
,
Col
}
from
"antd"
;
import
"./index.less"
;
import
".
./..
/index.less"
;
import
{
addGallery
}
from
"../utils/request"
;
import
{
addGallery
}
from
"../
../
utils/request"
;
import
{
SlateEditor
,
SlateTransforms
,
SlateElement
}
from
"@wangeditor/editor"
;
import
{
SlateEditor
,
SlateTransforms
,
SlateElement
}
from
"@wangeditor/editor"
;
import
{
findNodeWithParent
,
fontSizeList
}
from
"../utils/setting"
;
import
{
findNodeWithParent
,
fontSizeList
}
from
"../
../
utils/setting"
;
import
GalleryFormItem
from
"./
g
alleryItem"
;
import
GalleryFormItem
from
"./
G
alleryItem"
;
const
randomOne
=
Math
.
random
().
toString
(
16
).
substring
(
2
,
10
);
const
randomOne
=
Math
.
random
().
toString
(
16
).
substring
(
2
,
10
);
const
GalleryModal
=
(
props
,
ref
)
=>
{
const
GalleryModal
=
(
props
,
ref
)
=>
{
...
...
apps/admin/src/common/wangeditor-customer/
components/g
alleryItem.jsx
→
apps/admin/src/common/wangeditor-customer/
features/gallery/G
alleryItem.jsx
浏览文件 @
2228ca7b
import
{
useState
,
useEffect
,
useImperativeHandle
,
forwardRef
}
from
"react"
;
import
{
useState
,
useEffect
,
useImperativeHandle
,
forwardRef
}
from
"react"
;
import
{
CloudUploadOutlined
}
from
"@ant-design/icons"
;
import
{
CloudUploadOutlined
}
from
"@ant-design/icons"
;
import
{
Form
,
Input
,
Spin
,
Upload
,
Button
}
from
"antd"
;
import
{
Form
,
Input
,
Spin
,
Upload
,
Button
}
from
"antd"
;
import
OnlineImageList
from
".
/o
nlineImageList"
;
import
OnlineImageList
from
".
./../shared/online-image/O
nlineImageList"
;
import
{
uploadFile
}
from
"@/utils/oss"
;
import
{
uploadFile
}
from
"@/utils/oss"
;
const
fileAccept
=
[
".png"
,
".jpg"
,
".jpeg"
,
".svg"
];
const
fileAccept
=
[
".png"
,
".jpg"
,
".jpeg"
,
".svg"
];
...
...
apps/admin/src/common/wangeditor-customer/features/gallery/feature.js
浏览文件 @
2228ca7b
import
{
defineEditorFeature
}
from
'../../core/define-editor-feature'
import
{
defineEditorFeature
}
from
'../../core/define-editor-feature'
import
menu
from
'.
./../customer/Gallery
'
import
menu
from
'.
/menu
'
import
onlineMenu
from
'.
./../customer/GalleryOnline
'
import
onlineMenu
from
'.
/online-menu
'
import
nodeModule
from
'.
./../node/gallery
'
import
nodeModule
from
'.
/node
'
import
inlineNodeModule
from
'.
./../node/galleryInlin
e'
import
inlineNodeModule
from
'.
/inline-nod
e'
export
default
defineEditorFeature
({
export
default
defineEditorFeature
({
id
:
'gallery'
,
id
:
'gallery'
,
...
...
apps/admin/src/common/wangeditor-customer/
node/galleryInlin
e.js
→
apps/admin/src/common/wangeditor-customer/
features/gallery/inline-nod
e.js
浏览文件 @
2228ca7b
File moved
apps/admin/src/common/wangeditor-customer/
customer/Gallery
.js
→
apps/admin/src/common/wangeditor-customer/
features/gallery/menu
.js
浏览文件 @
2228ca7b
File moved
apps/admin/src/common/wangeditor-customer/
node/gallery
.js
→
apps/admin/src/common/wangeditor-customer/
features/gallery/node
.js
浏览文件 @
2228ca7b
...
@@ -2,7 +2,7 @@ import { DomEditor, SlateTransforms } from "@wangeditor/editor";
...
@@ -2,7 +2,7 @@ import { DomEditor, SlateTransforms } from "@wangeditor/editor";
import
{
h
}
from
"snabbdom"
;
import
{
h
}
from
"snabbdom"
;
import
iconGallery
from
"@/assets/images/editor/icon_gallery_editor.png"
;
import
iconGallery
from
"@/assets/images/editor/icon_gallery_editor.png"
;
import
iconClose
from
"@/assets/images/icon_chapter_close.png"
;
import
iconClose
from
"@/assets/images/icon_chapter_close.png"
;
import
{
findNodeWithParent
}
from
"../utils/setting"
;
import
{
findNodeWithParent
}
from
"../
../
utils/setting"
;
const
withGalleryNode
=
(
editor
)
=>
{
const
withGalleryNode
=
(
editor
)
=>
{
const
{
isVoid
,
normalizeNode
}
=
editor
;
const
{
isVoid
,
normalizeNode
}
=
editor
;
...
...
apps/admin/src/common/wangeditor-customer/
customer/GalleryOnline
.js
→
apps/admin/src/common/wangeditor-customer/
features/gallery/online-menu
.js
浏览文件 @
2228ca7b
File moved
apps/admin/src/common/wangeditor-customer/
components/image
.jsx
→
apps/admin/src/common/wangeditor-customer/
features/image/ImageDialog
.jsx
浏览文件 @
2228ca7b
...
@@ -2,8 +2,8 @@ import { useState, useEffect, forwardRef } from "react";
...
@@ -2,8 +2,8 @@ import { useState, useEffect, forwardRef } from "react";
import
{
Divider
,
Upload
,
Input
,
Space
,
Button
,
Form
,
Spin
,
message
}
from
"antd"
;
import
{
Divider
,
Upload
,
Input
,
Space
,
Button
,
Form
,
Spin
,
message
}
from
"antd"
;
import
{
CloudUploadOutlined
}
from
"@ant-design/icons"
;
import
{
CloudUploadOutlined
}
from
"@ant-design/icons"
;
import
{
SlateTransforms
,
SlateEditor
,
SlateElement
}
from
"@wangeditor/editor"
;
import
{
SlateTransforms
,
SlateEditor
,
SlateElement
}
from
"@wangeditor/editor"
;
import
"./index.less"
;
import
".
./..
/index.less"
;
import
OnlineImageList
from
".
/o
nlineImageList"
;
import
OnlineImageList
from
".
./../shared/online-image/O
nlineImageList"
;
import
{
uploadFile
}
from
"@/utils/oss"
;
import
{
uploadFile
}
from
"@/utils/oss"
;
...
...
apps/admin/src/common/wangeditor-customer/
customer/ImageEditor
.js
→
apps/admin/src/common/wangeditor-customer/
features/image/edit-menu
.js
浏览文件 @
2228ca7b
File moved
apps/admin/src/common/wangeditor-customer/features/image/feature.js
浏览文件 @
2228ca7b
import
{
defineEditorFeature
}
from
'../../core/define-editor-feature'
import
{
defineEditorFeature
}
from
'../../core/define-editor-feature'
import
editMenu
from
'.
./../customer/ImageEditor
'
import
editMenu
from
'.
/edit-menu
'
import
onlineMenu
from
'.
./../customer/ImageOnline
'
import
onlineMenu
from
'.
/online-menu
'
import
nodeModule
from
'.
./../node/imag
e'
import
nodeModule
from
'.
/nod
e'
export
default
defineEditorFeature
({
export
default
defineEditorFeature
({
id
:
'image'
,
id
:
'image'
,
...
...
apps/admin/src/common/wangeditor-customer/
customer/Image
.js
→
apps/admin/src/common/wangeditor-customer/
features/image/menu
.js
浏览文件 @
2228ca7b
File moved
apps/admin/src/common/wangeditor-customer/
node/imag
e.jsx
→
apps/admin/src/common/wangeditor-customer/
features/image/nod
e.jsx
浏览文件 @
2228ca7b
...
@@ -8,7 +8,7 @@ import ImageAutoConf, {
...
@@ -8,7 +8,7 @@ import ImageAutoConf, {
imageWidth100MenuChapterConf
,
imageWidth100MenuChapterConf
,
imageWidth50MenuChapterConf
,
imageWidth50MenuChapterConf
,
imageWidth30MenuChapterConf
,
imageWidth30MenuChapterConf
,
}
from
".
./customer/Image
"
;
}
from
".
/menu
"
;
const
withImageNode
=
(
editor
)
=>
{
const
withImageNode
=
(
editor
)
=>
{
const
{
isInline
,
isVoid
,
normalizeNode
}
=
editor
;
const
{
isInline
,
isVoid
,
normalizeNode
}
=
editor
;
...
...
apps/admin/src/common/wangeditor-customer/
customer/ImageOnline
.js
→
apps/admin/src/common/wangeditor-customer/
features/image/online-menu
.js
浏览文件 @
2228ca7b
File moved
apps/admin/src/common/wangeditor-customer/index.jsx
浏览文件 @
2228ca7b
...
@@ -22,9 +22,9 @@ dayjs.extend(relativeTime);
...
@@ -22,9 +22,9 @@ dayjs.extend(relativeTime);
import
{
storageChange
}
from
"@/utils/storage.js"
;
import
{
storageChange
}
from
"@/utils/storage.js"
;
import
ImageModal
from
"./
components/image
"
;
import
ImageModal
from
"./
features/image/ImageDialog
"
;
import
VideoModal
from
"./features/video/VideoDialog"
;
import
VideoModal
from
"./features/video/VideoDialog"
;
import
GalleryModal
from
"./
components/gallery
"
;
import
GalleryModal
from
"./
features/gallery/GalleryDialog
"
;
import
AudioModal
from
"./features/audio/AudioDialog"
;
import
AudioModal
from
"./features/audio/AudioDialog"
;
import
ChapterTitleModal
from
"./features/chapter-structure/TitleDialog"
;
import
ChapterTitleModal
from
"./features/chapter-structure/TitleDialog"
;
import
ChapterItemModal
from
"./features/chapter-structure/SectionDialog"
;
import
ChapterItemModal
from
"./features/chapter-structure/SectionDialog"
;
...
...
apps/admin/src/common/wangeditor-customer/
components/o
nlineImageList.jsx
→
apps/admin/src/common/wangeditor-customer/
shared/online-image/O
nlineImageList.jsx
浏览文件 @
2228ca7b
File moved
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论