Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-book
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-book
Commits
30891662
提交
30891662
authored
6月 18, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
a53b9ece
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
75 行增加
和
41 行删除
+75
-41
index.less
src/common/wangeditor-customer/components/index.less
+3
-1
onlineImageList.jsx
...common/wangeditor-customer/components/onlineImageList.jsx
+28
-15
GalleryOnline.js
src/common/wangeditor-customer/customer/GalleryOnline.js
+21
-16
ImageOnline.js
src/common/wangeditor-customer/customer/ImageOnline.js
+23
-9
没有找到文件。
src/common/wangeditor-customer/components/index.less
浏览文件 @
30891662
...
...
@@ -137,11 +137,13 @@
padding: 10px;
gap: 10px;
flex-wrap: wrap;
align-items: center;
justify-content: center;
max-height: 220px;
overflow-y: auto;
overflow-x: hidden;
.online-image-list-item {
width: 2
0
0px;
width: 2
2
0px;
height: 100px;
border-radius: 10px;
overflow: hidden;
...
...
src/common/wangeditor-customer/components/onlineImageList.jsx
浏览文件 @
30891662
import
{
getChuangKitDesigns
}
from
'@/api/chuangkit'
import
{
useState
,
useEffect
}
from
'react'
import
{
useSelector
}
from
'react-redux'
import
{
Spin
,
Empty
}
from
'antd'
export
default
function
OnlineImageList
({
imgUrl
,
onChange
})
{
const
[
isLoading
,
setLoading
]
=
useState
(
false
)
const
[
list
,
setList
]
=
useState
([])
const
{
userInfo
}
=
useSelector
((
state
)
=>
state
.
user
)
useEffect
(()
=>
{
getChuangKitDesigns
({
params
:
{
time_order
:
1
,
user_flag
:
userInfo
.
id
,
page_no
:
1
,
page_size
:
1000
}
}).
then
((
res
)
=>
{
setList
(
res
.
data
.
list
)
})
setLoading
(
true
)
getChuangKitDesigns
({
params
:
{
time_order
:
1
,
user_flag
:
userInfo
.
id
,
page_no
:
1
,
page_size
:
1000
}
})
.
then
((
res
)
=>
{
setList
(
res
.
data
.
list
)
})
.
finally
(()
=>
{
setLoading
(
false
)
})
},
[
userInfo
])
return
(
<
div
className=
"online-image-list"
>
{
list
.
map
((
item
)
=>
{
return
(
<
div
className=
{
'online-image-list-item '
+
(
imgUrl
===
item
.
thumbUrl
?
'is-active'
:
''
)
}
key=
{
item
.
designId
}
onClick=
{
()
=>
onChange
(
item
.
thumbUrl
)
}
>
<
img
src=
{
item
.
thumbUrl
}
/>
</
div
>
)
})
}
</
div
>
<
Spin
spinning=
{
isLoading
}
>
<
div
className=
"online-image-list"
>
{
list
.
length
?
(
list
.
map
((
item
)
=>
{
return
(
<
div
className=
{
'online-image-list-item '
+
(
imgUrl
===
item
.
thumbUrl
?
'is-active'
:
''
)
}
key=
{
item
.
designId
}
onClick=
{
()
=>
onChange
(
item
.
thumbUrl
)
}
>
<
img
src=
{
item
.
thumbUrl
}
/>
</
div
>
)
})
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
</
div
>
</
Spin
>
)
}
src/common/wangeditor-customer/customer/GalleryOnline.js
浏览文件 @
30891662
...
...
@@ -3,22 +3,27 @@ import { DomEditor, SlateRange } from '@wangeditor/editor'
class
GalleryAutoOnline
{
constructor
()
{
this
.
title
=
'在线画廊'
this
.
iconSvg
=
`<svg width="24px" height="19px" viewBox="0 0 24 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>图标</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-677.000000, -1030.000000)">
<g id="右侧章节目录" transform="translate(551.000000, 592.000000)">
<rect id="边框" stroke="#CCCCCC" fill="#EEEEEE" opacity="0.302679084" x="0.5" y="50.5" width="259" height="666"></rect>
<g id="媒体资源" transform="translate(11.000000, 400.000000)" fill="#666666" fill-rule="nonzero">
<g id="视频播放" transform="translate(115.000000, 38.000000)">
<path d="M9.64798915,14 C9.76728423,14 9.87844555,13.9618138 9.97605061,13.8949881 L14.6312698,10.7128083 C14.8481699,10.5982498 15,10.3341289 15,10.0286396 C15,9.7486078 14.8698599,9.50039777 14.677361,9.3699284 L10.1278807,6.25775656 C10.0112969,6.09864757 9.83777677,6 9.64798915,6 C9.29281518,6 9.00813376,6.34049324 9.00813376,6.75735879 L9.00813376,6.79872713 L9,6.80509149 L9.01084501,13.1630867 C9.00813376,13.1885442 9.00813376,13.2140016 9.00813376,13.2426412 C9.00813376,13.6626889 9.29552643,14 9.64798915,14 L9.64798915,14 Z" id="路径"></path>
<path d="M2.27373675e-13,11 C2.27373675e-13,11.3572656 0.190598914,11.6873926 0.5,11.8660254 C0.809401074,12.0446582 1.19059893,12.0446582 1.5,11.8660254 C1.80940109,11.6873926 2,11.3572656 2,11 C2,10.6427344 1.80940109,10.3126074 1.5,10.1339746 C1.19059893,9.9553418 0.809401074,9.9553418 0.5,10.1339746 C0.190598914,10.3126074 2.27373675e-13,10.6427344 2.27373675e-13,11 L2.27373675e-13,11 Z" id="路径"></path>
<path d="M23.9946417,6.45843399 C23.9973208,6.41523376 24,6.37203354 24,6.32883331 C24,5.38382834 23.2364367,4.61972431 22.2960482,4.61972431 C21.9825854,4.61972431 21.6878768,4.70612477 21.4333557,4.85462555 L21.4199598,4.84652551 L20.5760214,5.33792809 L20.5760214,3.5910189 C20.5733423,1.61730851 18.9711989,0 17.0100469,0 L3.56329538,0 C1.60482251,0 2.27373675e-13,1.6146085 2.27373675e-13,3.5910189 L2.27373675e-13,8.06764246 L0.00535833892,8.06764246 C0.00535833892,8.54554498 0.391158741,8.93434702 0.868050904,8.93434702 C1.34494307,8.93434702 1.73074347,8.54554498 1.73074347,8.06764246 L1.73610181,8.06764246 L1.73610181,3.45331818 C1.73610181,2.50291317 2.50770261,1.72530908 3.45077026,1.72530908 L17.1198928,1.72530908 C18.0629605,1.72530908 18.8345613,2.50291317 18.8345613,3.45331818 L18.8345613,15.573682 C18.8345613,16.524087 18.0629605,17.3016911 17.1198928,17.3016911 L3.45344943,17.3016911 C2.51038178,17.3016911 1.73878098,16.524087 1.73878098,15.573682 L1.73878098,14.9958789 C1.73878098,14.5179764 1.35298058,14.1291744 0.876088413,14.1291744 C0.399196249,14.1291744 0.0133958473,14.5179764 0.0133958473,14.9958789 L0.00267916946,14.9958789 L0.00267916946,15.4089811 C0.00267916946,17.3853915 1.60750167,19 3.56597455,19 L17.0127261,19 C18.9738781,19 20.5760214,17.3853915 20.5760214,15.4089811 L20.5760214,13.678272 L21.4628265,14.1939747 L21.4655057,14.1912747 C21.7119893,14.3289754 21.9959812,14.4072758 22.2960482,14.4072758 C23.2364367,14.4072758 24,13.6404718 24,12.6981668 C24,12.6549666 23.9973208,12.6117664 23.9946417,12.5685662 L23.9946417,6.45843399 Z M22.2906899,11.9961631 C22.2826524,12.2067642 22.1058272,12.3768651 21.8888145,12.3768651 C21.8164769,12.3768651 21.7468185,12.357965 21.6878768,12.3228649 L20.5760214,11.6829615 L20.5760214,7.31703851 L21.6718017,6.69063521 C21.7334226,6.650135 21.8084394,6.62853489 21.8888145,6.62853489 C22.1111855,6.62853489 22.2906899,6.80673582 22.2906899,7.02273696 L22.2906899,11.9961631 L22.2906899,11.9961631 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
this
.
iconSvg
=
`<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
<style type="text/css">
.st0{fill:#AF1C40;}
</style>
<path class="st0" d="M179.7,56.1c-4.9-2.9-10.9-2.9-15.8,0l-5.5,3.2v-5.4c0-12.1-9.9-22-22-22h-99c-12.2,0-22,9.8-22.1,22V143
c0,12.2,9.9,22,22.1,22.1h99c12.2,0,22-9.9,22-22.1v-5.4l5.5,3.2c7.6,4.4,17.2,1.8,21.6-5.8c1.4-2.4,2.1-5.1,2.1-7.9V69.8
C187.6,64.1,184.6,58.9,179.7,56.1z M146.4,143c0,5.5-4.5,10-10,10.1h-99c-5.6,0-10.1-4.5-10.1-10.1V53.9c0-5.5,4.5-10,10-10h99
c5.5,0,10,4.5,10,10L146.4,143L146.4,143z M175.6,127.1c0,2.1-1.7,3.8-3.8,3.8c-0.7,0-1.3-0.2-1.9-0.5l-11.5-6.6V73.1l11.5-6.6
c1.8-1,4.2-0.4,5.2,1.4c0.3,0.6,0.5,1.2,0.5,1.9V127.1z"/>
<g>
<path class="st0" d="M110.6,104.9c0,0.5-0.1,1-0.4,1.5c-0.1,0.2-0.3,0.4-0.4,0.6l-5.4,5.4c-0.5,0.5-1.2,0.8-1.9,0.8c0,0,0,0,0,0
c-0.7,0-1.4-0.3-1.9-0.7c-0.9-0.8-1.8-1.5-2.8-2.1c-3.2-2-7-3.1-10.8-3.1c-5.2,0-10.2,2-14.1,5.5c-0.4,0.3-0.9,0.5-1.5,0.5
c-0.6,0-1.2-0.3-1.7-0.7L64,107c-0.5-0.5-0.8-1.3-0.8-2c0-0.8,0.3-1.5,0.9-2c2.7-2.5,5.7-4.4,9-5.9c4.3-2,9-3,13.8-3
c8.5,0,16.6,3.1,22.8,8.9c0.2,0.2,0.4,0.4,0.5,0.6C110.4,104,110.5,104.4,110.6,104.9z"/>
<path class="st0" d="M86.9,127.8c-3.6,0-6.6-3-6.6-6.6s3-6.6,6.6-6.6s6.6,3,6.6,6.6S90.5,127.8,86.9,127.8z"/>
<path class="st0" d="M126,89.4c0,0.8-0.3,1.5-0.8,2l-5.4,5.4c-0.5,0.5-1.2,0.8-2,0.8c-0.7,0-1.4-0.3-1.9-0.8
c-1.8-1.7-3.7-3.2-5.8-4.6c-6.9-4.5-15-7-23.3-7c-11,0-21.3,4.2-29.3,11.7c0,0,0,0,0,0c-0.4,0.4-1,0.6-1.7,0.6
c-0.5,0-1.1-0.1-1.8-0.6c-0.1-0.1-0.3-0.2-0.4-0.3l-5.2-5.2c-0.5-0.5-0.8-1.3-0.8-2c0-0.8,0.3-1.5,0.9-2c1.1-1,2.2-2,3.3-2.9
c9.9-8,22.1-12.3,35-12.3c14.3,0,28,5.4,38.3,15.3C125.7,88,126,88.7,126,89.4z"/>
</g>
</svg>`
this
.
tag
=
'button'
}
...
...
src/common/wangeditor-customer/customer/ImageOnline.js
浏览文件 @
30891662
...
...
@@ -4,15 +4,29 @@ import { DomEditor, SlateTransforms as Transforms, SlateRange } from '@wangedito
class
ImageAutoOnline
{
constructor
()
{
this
.
title
=
'在线图片'
this
.
iconSvg
=
`<svg width="23px" height="21px" viewBox="0 0 23 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编辑器图片样式</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-500.000000, -387.000000)" fill="#BCBCBC" fill-rule="nonzero">
<g id="图片-(1)" transform="translate(500.000000, 387.000000)">
<path d="M23,0 L23,21 L0,21 L0,0 L23,0 Z M17.9968611,10.9295455 L11.5159722,16.3017273 L7.30633333,12.9939091 L1.91666667,17.3351818 L1.91666667,19.0909091 L21.0833333,19.0909091 L21.0833333,13.4794546 L17.9968611,10.9295455 Z M21.0833333,1.90909091 L1.91666667,1.90909091 L1.91666667,14.8800909 L7.29163888,10.5509091 L11.4833889,13.8447273 L17.9955833,8.44836363 L21.0833333,10.9989091 L21.0833333,1.90909091 Z M7.98611109,3.18181819 C9.57392975,3.18181819 10.8611111,4.46391186 10.8611111,6.04545456 C10.8611111,7.62699725 9.57392975,8.90909092 7.98611109,8.90909092 C6.39829244,8.90909092 5.11111109,7.62699725 5.11111109,6.04545456 C5.11111109,4.46391186 6.39829244,3.18181819 7.98611109,3.18181819 Z M7.98611109,5.0909091 C7.45683821,5.0909091 7.02777776,5.51827366 7.02777776,6.04545456 C7.02777776,6.57263545 7.45683821,7.00000001 7.98611109,7.00000001 C8.51538398,7.00000001 8.94444442,6.57263545 8.94444442,6.04545456 C8.94444442,5.51827366 8.51538398,5.0909091 7.98611109,5.0909091 Z" id="形状"></path>
</g>
</g>
</g>
this
.
iconSvg
=
`<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
<style type="text/css">
.st0{fill:#AF1C40;}
</style>
<path class="st0" d="M79.2,52.1c-10.4,0-18.8,8.4-18.8,18.8c0,10.4,8.4,18.8,18.8,18.8c10.4,0,18.8-8.4,18.8-18.8
C97.9,60.5,89.5,52.1,79.2,52.1z M79.2,77.1c-3.5,0-6.2-2.8-6.2-6.2c0-3.5,2.8-6.2,6.2-6.2c3.5,0,6.2,2.8,6.2,6.2
C85.4,74.3,82.6,77.1,79.2,77.1z"/>
<path class="st0" d="M176.6,59.3l-5.4,5.4c-0.5,0.5-1.2,0.8-1.9,0.8c0,0,0,0,0,0c-0.7,0-1.4-0.3-1.9-0.7c-0.9-0.8-1.8-1.5-2.8-2.1
v40.6l-20.1-16.7L102,121.9l-27.3-21.6l-35.1,28.3V43.7h75.8c-0.1-0.1-0.3-0.2-0.4-0.3l-5.2-5.2c-0.5-0.5-0.8-1.3-0.8-2
c0-0.8,0.3-1.5,0.9-2c1.1-1,2.2-2,3.3-2.9h-86v137.5h150v-110C177,58.9,176.8,59.1,176.6,59.3z M164.6,156.2h-125v-11.5l35.1-28.4
l27.5,21.7l42.3-35.2l20.1,16.7V156.2z"/>
<g>
<path class="st0" d="M177.5,51.6c0,0.5-0.1,1-0.4,1.5c-0.1,0.2-0.3,0.4-0.4,0.6l-5.4,5.4c-0.5,0.5-1.2,0.8-1.9,0.8c0,0,0,0,0,0
c-0.7,0-1.4-0.3-1.9-0.7c-0.9-0.8-1.8-1.5-2.8-2.1c-3.2-2-7-3.1-10.8-3.1c-5.2,0-10.2,2-14.1,5.5c-0.4,0.3-0.9,0.5-1.5,0.5
c-0.6,0-1.2-0.3-1.7-0.7l-5.6-5.6c-0.5-0.5-0.8-1.3-0.8-2c0-0.8,0.3-1.5,0.9-2c2.7-2.5,5.7-4.4,9-5.9c4.3-2,9-3,13.8-3
c8.5,0,16.6,3.1,22.8,8.9c0.2,0.2,0.4,0.4,0.5,0.6C177.3,50.7,177.4,51.1,177.5,51.6z"/>
<path class="st0" d="M153.7,74.5c-3.6,0-6.6-3-6.6-6.6s3-6.6,6.6-6.6s6.6,3,6.6,6.6S157.4,74.5,153.7,74.5z"/>
<path class="st0" d="M192.9,36.1c0,0.8-0.3,1.5-0.8,2l-5.4,5.4c-0.5,0.5-1.2,0.8-2,0.8c-0.7,0-1.4-0.3-1.9-0.8
c-1.8-1.7-3.7-3.2-5.8-4.6c-6.9-4.5-15-7-23.3-7c-11,0-21.3,4.2-29.3,11.7c0,0,0,0,0,0c-0.4,0.4-1,0.6-1.7,0.6
c-0.5,0-1.1-0.1-1.8-0.6c-0.1-0.1-0.3-0.2-0.4-0.3l-5.2-5.2c-0.5-0.5-0.8-1.3-0.8-2c0-0.8,0.3-1.5,0.9-2c1.1-1,2.2-2,3.3-2.9
c9.9-8,22.1-12.3,35-12.3c14.3,0,28,5.4,38.3,15.3C192.6,34.7,192.9,35.4,192.9,36.1z"/>
</g>
</svg>`
this
.
tag
=
'button'
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论