Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
a3767831
提交
a3767831
authored
5月 20, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 丰富富文本插件
上级
9f01bc4e
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
57 行增加
和
21 行删除
+57
-21
content.css
frontend/public/tinymce/skins/content/default/content.css
+0
-1
DeRichText.vue
...end/src/components/canvas/custom-component/DeRichText.vue
+49
-11
component-list.js
.../src/components/canvas/custom-component/component-list.js
+1
-8
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+7
-1
没有找到文件。
frontend/public/tinymce/skins/content/default/content.css
浏览文件 @
a3767831
...
...
@@ -5,7 +5,6 @@
* For commercial licenses see https://www.tiny.cloud/
*/
table
{
border-collapse
:
collapse
;
}
...
...
frontend/src/components/canvas/custom-component/DeRichText.vue
浏览文件 @
a3767831
<
template
>
<div
v-if=
"editStatus"
class=
"rich-main-class
"
>
<div
class=
"rich-main-class"
@
dblclick=
"setEdit
"
>
<Editor
v-
show=
"canEdit
"
v-
if=
"editShow
"
:id=
"tinymceId"
v-model=
"myValue"
style=
"width: 100%;height: 100%"
:init=
"init"
:disabled=
"
disabled
"
:disabled=
"
!canEdit
"
@
onClick=
"onClick"
/>
<div
v-show=
"!canEdit"
style=
"width: 100%;height: 100%"
@
dblclick=
"setEdit"
v-html=
"myValue"
/>
</div>
<div
v-else
class=
"rich-main-class"
>
<div
v-html=
"myValue"
/>
<!--
<div
v-show=
"!canEdit"
style=
"width: 100%;height: 100%"
@
dblclick=
"setEdit"
v-html=
"myValue"
/>
-->
</div>
<!--
<div
v-else
class=
"rich-main-class"
>
-->
<!--
<Editor
:id=
"tinymceId"
/>
-->
<!--
<div
v-html=
"myValue"
/>
-->
<!--
</div>
-->
</
template
>
...
...
@@ -32,6 +33,10 @@ import 'tinymce/plugins/charmap' // 特殊字符
import
'tinymce/plugins/media'
// 插入编辑媒体
import
'tinymce/plugins/wordcount'
// 字数统计
import
'tinymce/plugins/table'
// 表格
import
'tinymce/plugins/contextmenu'
// contextmenu
import
'tinymce/plugins/directionality'
import
'tinymce/plugins/nonbreaking'
import
'tinymce/plugins/pagebreak'
import
{
mapState
}
from
'vuex'
// const fonts = [
...
...
@@ -93,6 +98,7 @@ export default {
},
data
()
{
return
{
editShow
:
true
,
canEdit
:
false
,
// 初始化配置
tinymceId
:
'tinymce'
,
...
...
@@ -104,9 +110,13 @@ export default {
language
:
'zh_CN'
,
skin_url
:
'/tinymce/skins/ui/oxide'
,
// 皮肤
content_css
:
'/tinymce/skins/content/default/content.css'
,
plugins
:
'advlist autolink link image lists charmap media wordcount table'
,
// 插件
plugins
:
'advlist autolink link image lists charmap media wordcount table
contextmenu directionality pagebreak
'
,
// 插件
// 工具栏
toolbar
:
'undo redo | fontsizeselect | bold italic forecolor backcolor| alignleft aligncenter alignright | lists image media table link'
,
// toolbar: 'undo redo | fontsizeselect fontselect | bold italic forecolor backcolor underline strikethrough | alignleft aligncenter alignright | lists image media table link | bullist numlist ',
toolbar
:
'undo redo |fontsizeselect forecolor backcolor bold italic underline strikethrough link | '
+
'alignleft aligncenter alignright | bullist numlist |'
+
' blockquote subscript superscript removeformat | table image media | fullscreen '
+
'| bdmap indent2em lineheight formatpainter axupimgs'
,
toolbar_location
:
'/'
,
fontsize_formats
:
'12px 14px 16px 18px 20px 22px 24px 28px 32px 36px 48px 56px 72px'
,
// 字体大小
menubar
:
false
,
...
...
@@ -128,7 +138,11 @@ export default {
// 监听内容变化
active
(
val
)
{
if
(
!
val
)
{
this
.
editShow
=
false
this
.
canEdit
=
false
this
.
$nextTick
(()
=>
{
this
.
editShow
=
true
})
}
},
// 监听内容变化
...
...
@@ -148,8 +162,10 @@ export default {
this
.
$emit
(
'onClick'
,
e
,
tinymce
)
},
setEdit
()
{
this
.
canEdit
=
true
this
.
element
.
editing
=
true
if
(
this
.
editStatus
)
{
this
.
canEdit
=
true
this
.
element
.
editing
=
true
}
}
}
}
...
...
@@ -165,5 +181,27 @@ export default {
width
:
0px
!
important
;
height
:
0px
!
important
;
}
::v-deep
ol
{
display
:
block
!
important
;
list-style-type
:
decimal
;
margin-block-start
:
1em
!
important
;
margin-block-end
:
1em
!
important
;
margin-inline-start
:
0px
!
important
;
margin-inline-end
:
0px
!
important
;
padding-inline-start
:
40px
!
important
;
}
::v-deep
ul
{
display
:
block
!
important
;
list-style-type
:
disc
;
margin-block-start
:
1em
!
important
;
margin-block-end
:
1em
!
important
;
margin-inline-start
:
0px
!
important
;
margin-inline-end
:
0px
!
important
;
padding-inline-start
:
40px
!
important
;
}
::v-deep
li
{
display
:
list-item
!
important
;
text-align
:
-
webkit-match-parent
!
important
;
}
</
style
>
frontend/src/components/canvas/custom-component/component-list.js
浏览文件 @
a3767831
...
...
@@ -266,14 +266,7 @@ const list = [
hyperlinks
:
HYPERLINKS
,
style
:
{
width
:
400
,
height
:
100
,
fontSize
:
22
,
fontWeight
:
400
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
'center'
,
color
:
'#000000'
,
verticalAlign
:
'middle'
height
:
100
},
x
:
1
,
y
:
1
,
...
...
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
a3767831
...
...
@@ -690,7 +690,13 @@ export default {
this
.
$store
.
commit
(
'refreshSnapshot'
)
this
.
$store
.
commit
(
'setComponentData'
,
[])
this
.
$store
.
commit
(
'setCanvasStyle'
,
DEFAULT_COMMON_CANVAS_STYLE_STRING
)
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
data
)
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
{
id
:
data
.
id
,
name
:
data
.
name
,
privileges
:
data
.
privileges
,
sourcePanelName
:
data
.
sourcePanelName
,
status
:
data
.
status
})
bus
.
$emit
(
'PanelSwitchComponent'
,
{
name
:
'PanelEdit'
})
},
link
(
data
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论