Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
a7b67c5c
提交
a7b67c5c
authored
6月 21, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 修改文字组件样式
上级
8aaf2aa0
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
162 行增加
和
56 行删除
+162
-56
AttrList.vue
frontend/src/components/canvas/components/AttrList.vue
+1
-1
AttrListExtend.vue
frontend/src/components/canvas/components/AttrListExtend.vue
+54
-4
ContextMenu.vue
...d/src/components/canvas/components/Editor/ContextMenu.vue
+17
-6
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+1
-0
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+7
-7
RectShape.vue
...tend/src/components/canvas/custom-component/RectShape.vue
+9
-10
component-list.js
.../src/components/canvas/custom-component/component-list.js
+7
-14
en.js
frontend/src/lang/en.js
+2
-1
tw.js
frontend/src/lang/tw.js
+2
-1
zh.js
frontend/src/lang/zh.js
+2
-1
index.scss
frontend/src/styles/index.scss
+18
-0
index.vue
frontend/src/views/panel/edit/index.vue
+42
-11
没有找到文件。
frontend/src/components/canvas/components/AttrList.vue
浏览文件 @
a7b67c5c
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
excludes
:
[
'Picture'
,
'Group'
,
'
user-
view'
],
// 这些组件不显示内容
excludes
:
[
'Picture'
,
'Group'
,
'view'
],
// 这些组件不显示内容
textAlignOptions
:
[
textAlignOptions
:
[
{
{
label
:
this
.
$t
(
'panel.text_align_left'
),
label
:
this
.
$t
(
'panel.text_align_left'
),
...
...
frontend/src/components/canvas/components/AttrListExtend.vue
浏览文件 @
a7b67c5c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<
template
>
<
template
>
<div
class=
"attr-list"
>
<div
class=
"attr-list"
>
<el-form
label-width=
"80px"
size=
"mini"
>
<el-form
label-width=
"80px"
size=
"mini"
>
<el-form-item
v-for=
"(key, index) in styleKeys.filter(item =>
item != 'rotate'
)"
:key=
"index"
:label=
"map[key]+':'"
>
<el-form-item
v-for=
"(key, index) in styleKeys.filter(item =>
styleFilter.includes(item)
)"
:key=
"index"
:label=
"map[key]+':'"
>
<el-color-picker
v-if=
"key == 'borderColor'"
v-model=
"curComponent.style[key]"
/>
<el-color-picker
v-if=
"key == 'borderColor'"
v-model=
"curComponent.style[key]"
/>
<el-color-picker
v-else-if=
"key == 'color'"
v-model=
"curComponent.style[key]"
/>
<el-color-picker
v-else-if=
"key == 'color'"
v-model=
"curComponent.style[key]"
/>
<el-color-picker
v-else-if=
"key == 'backgroundColor'"
v-model=
"curComponent.style[key]"
/>
<el-color-picker
v-else-if=
"key == 'backgroundColor'"
v-model=
"curComponent.style[key]"
/>
...
@@ -34,18 +34,39 @@
...
@@ -34,18 +34,39 @@
</el-select>
</el-select>
<el-input
v-else
v-model=
"curComponent.style[key]"
type=
"number"
/>
<el-input
v-else
v-model=
"curComponent.style[key]"
type=
"number"
/>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"curComponent && !excludes.includes(curComponent.component)"
:label=
"$t('panel.content')+':'"
>
<el-form-item
:label=
"$t('panel.content_style')+':'"
>
<el-input
v-model=
"curComponent.propValue"
type=
"textarea"
/>
<div
v-if=
"curComponent.type==='v-text'"
style=
"width: 100%;max-height: 400px;overflow: auto"
>
<VText
style=
"border: 1px solid #dcdfe6;border-radius:4px;background-color: #f7f8fa;"
:prop-value=
"curComponent.propValue"
:element=
"curComponent"
:edit-mode=
"'edit'"
:style=
"getComponentStyleDefault(curComponent.style)"
/>
</div>
<rect-shape
v-if=
"curComponent.type==='rect-shape'"
style=
"width: 200px!important;height: 100px!important;"
:prop-value=
"curComponent.propValue"
:element=
"curComponent"
:style=
"getComponentStyleDefault(curComponent.style)"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
VText
from
'@/components/canvas/custom-component/VText'
import
RectShape
from
'@/components/canvas/custom-component/RectShape'
import
{
getStyle
}
from
'@/components/canvas/utils/style'
export
default
{
export
default
{
components
:
{
VText
,
RectShape
},
data
()
{
data
()
{
return
{
return
{
excludes
:
[
'Picture'
,
'Group'
,
'
user-
view'
],
// 这些组件不显示内容
excludes
:
[
'Picture'
,
'Group'
,
'view'
],
// 这些组件不显示内容
textAlignOptions
:
[
textAlignOptions
:
[
{
{
label
:
this
.
$t
(
'panel.text_align_left'
),
label
:
this
.
$t
(
'panel.text_align_left'
),
...
@@ -113,6 +134,35 @@ export default {
...
@@ -113,6 +134,35 @@ export default {
},
},
curComponent
()
{
curComponent
()
{
return
this
.
$store
.
state
.
curComponent
return
this
.
$store
.
state
.
curComponent
},
styleFilter
()
{
const
filter
=
[
'fontSize'
,
'fontWeight'
,
'lineHeight'
,
'letterSpacing'
,
'textAlign'
,
'color'
,
'borderColor'
,
'borderWidth'
,
'backgroundColor'
,
'borderStyle'
,
'verticalAlign'
]
if
(
this
.
$store
.
state
.
curComponent
.
type
===
'v-text'
)
{
filter
.
push
(
'width'
,
'height'
)
}
return
filter
}
},
methods
:
{
getComponentStyleDefault
(
style
)
{
if
(
this
.
$store
.
state
.
curComponent
.
type
===
'v-text'
)
{
return
getStyle
(
style
,
[
'top'
,
'left'
,
'rotate'
])
}
else
{
return
getStyle
(
style
,
[
'top'
,
'left'
,
'rotate'
,
'height'
,
'width'
])
}
// return style
}
}
}
}
}
}
...
...
frontend/src/components/canvas/components/Editor/ContextMenu.vue
浏览文件 @
a7b67c5c
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<ul
@
mouseup=
"handleMouseUp"
>
<ul
@
mouseup=
"handleMouseUp"
>
<template
v-if=
"curComponent"
>
<template
v-if=
"curComponent"
>
<template
v-if=
"!curComponent.isLock"
>
<template
v-if=
"!curComponent.isLock"
>
<li
@
click=
"edit"
>
{{
$t
(
'panel.edit'
)
}}
</li>
<li
v-if=
"editFilter.includes(curComponent.type)"
@
click=
"edit"
>
{{
$t
(
'panel.edit'
)
}}
</li>
<!--
<li
@
click=
"copy"
>
{{
$t
(
'panel.copy'
)
}}
</li>
-->
<!--
<li
@
click=
"copy"
>
{{
$t
(
'panel.copy'
)
}}
</li>
-->
<li
@
click=
"paste"
>
{{
$t
(
'panel.paste'
)
}}
</li>
<li
@
click=
"paste"
>
{{
$t
(
'panel.paste'
)
}}
</li>
<li
@
click=
"cut"
>
{{
$t
(
'panel.cut'
)
}}
</li>
<li
@
click=
"cut"
>
{{
$t
(
'panel.cut'
)
}}
</li>
<li
@
click=
"deleteComponent"
>
{{
$t
(
'panel.delete'
)
}}
</li>
<li
@
click=
"deleteComponent"
>
{{
$t
(
'panel.delete'
)
}}
</li>
<!--
<li
@
click=
"lock"
>
{{
$t
(
'panel.lock'
)
}}
</li>
-->
<!--
<li
@
click=
"lock"
>
{{
$t
(
'panel.lock'
)
}}
</li>
-->
<li
@
click=
"topComponent"
>
{{
$t
(
'panel.topComponent'
)
}}
</li>
<li
@
click=
"topComponent"
>
{{
$t
(
'panel.topComponent'
)
}}
</li>
<li
@
click=
"bottomComponent"
>
{{
$t
(
'panel.bottomComponent'
)
}}
</li>
<li
@
click=
"bottomComponent"
>
{{
$t
(
'panel.bottomComponent'
)
}}
</li>
<li
@
click=
"upComponent"
>
{{
$t
(
'panel.upComponent'
)
}}
</li>
<li
@
click=
"upComponent"
>
{{
$t
(
'panel.upComponent'
)
}}
</li>
...
@@ -28,7 +28,13 @@ import bus from '@/utils/bus'
...
@@ -28,7 +28,13 @@ import bus from '@/utils/bus'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
copyData
:
null
copyData
:
null
,
editFilter
:
[
'view'
,
'v-text'
,
'rect-shape'
,
'custom'
]
}
}
},
},
computed
:
mapState
([
computed
:
mapState
([
...
@@ -44,7 +50,7 @@ export default {
...
@@ -44,7 +50,7 @@ export default {
// 编辑时临时保存 当前修改的画布
// 编辑时临时保存 当前修改的画布
this
.
$store
.
dispatch
(
'panel/setComponentDataTemp'
,
JSON
.
stringify
(
this
.
componentData
))
this
.
$store
.
dispatch
(
'panel/setComponentDataTemp'
,
JSON
.
stringify
(
this
.
componentData
))
this
.
$store
.
dispatch
(
'panel/setCanvasStyleDataTemp'
,
JSON
.
stringify
(
this
.
canvasStyleData
))
this
.
$store
.
dispatch
(
'panel/setCanvasStyleDataTemp'
,
JSON
.
stringify
(
this
.
canvasStyleData
))
if
(
this
.
curComponent
.
component
===
'user-
view'
)
{
if
(
this
.
curComponent
.
type
===
'
view'
)
{
this
.
$store
.
dispatch
(
'chart/setViewId'
,
null
)
this
.
$store
.
dispatch
(
'chart/setViewId'
,
null
)
this
.
$store
.
dispatch
(
'chart/setViewId'
,
this
.
curComponent
.
propValue
.
viewId
)
this
.
$store
.
dispatch
(
'chart/setViewId'
,
this
.
curComponent
.
propValue
.
viewId
)
bus
.
$emit
(
'PanelSwitchComponent'
,
{
name
:
'ChartEdit'
,
param
:
{
'id'
:
this
.
curComponent
.
propValue
.
viewId
}})
bus
.
$emit
(
'PanelSwitchComponent'
,
{
name
:
'ChartEdit'
,
param
:
{
'id'
:
this
.
curComponent
.
propValue
.
viewId
}})
...
@@ -52,7 +58,12 @@ export default {
...
@@ -52,7 +58,12 @@ export default {
if
(
this
.
curComponent
.
type
===
'custom'
)
{
if
(
this
.
curComponent
.
type
===
'custom'
)
{
bus
.
$emit
(
'component-dialog-edit'
)
bus
.
$emit
(
'component-dialog-edit'
)
}
}
// 编辑组件
//编辑样式组件
if
(
this
.
curComponent
.
type
===
'v-text'
||
this
.
curComponent
.
type
===
'rect-shape'
)
{
bus
.
$emit
(
'component-dialog-style'
)
}
},
},
lock
()
{
lock
()
{
this
.
$store
.
commit
(
'lock'
)
this
.
$store
.
commit
(
'lock'
)
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
a7b67c5c
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
:class=
"
{'gap_class':canvasStyleData.panel.gap==='yes'}"
:class=
"
{'gap_class':canvasStyleData.panel.gap==='yes'}"
:snap="true"
:snap="true"
:snap-tolerance="1"
:snap-tolerance="1"
:change-style="customStyleHistory"
@refLineParams="getRefLineParams"
@refLineParams="getRefLineParams"
>
>
<component
<component
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
a7b67c5c
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<span>
自适应画布区域
</span>
<span>
自适应画布区域
</span>
</div>
</div>
<div
class=
"canvas-config"
style=
"margin-right:
40
px"
>
<div
class=
"canvas-config"
style=
"margin-right:
55
px"
>
<span>
{{
$t
(
'panel.canvas_size'
)
}}
</span>
<span>
{{
$t
(
'panel.canvas_size'
)
}}
</span>
<input
v-model=
"canvasStyleData.width"
:disabled=
"canvasStyleData.selfAdaption"
>
<input
v-model=
"canvasStyleData.width"
:disabled=
"canvasStyleData.selfAdaption"
>
<span>
*
</span>
<span>
*
</span>
...
@@ -27,13 +27,13 @@
...
@@ -27,13 +27,13 @@
<el-button
:class=
"styleButtonActive?'button-show':'button-closed'"
class=
"el-icon-magic-stick"
size=
"mini"
circle
@
click=
"showPanel"
/>
<el-button
:class=
"styleButtonActive?'button-show':'button-closed'"
class=
"el-icon-magic-stick"
size=
"mini"
circle
@
click=
"showPanel"
/>
</el-tooltip>
</el-tooltip>
<
el-tooltip
v-if=
"!aidedButtonActive"
:content=
"$t('panel.open_aided_design') "
>
<
!--
<el-tooltip
v-if=
"!aidedButtonActive"
:content=
"$t('panel.open_aided_design') "
>
--
>
<el-button
class=
"el-icon-help button-closed"
size=
"mini"
circle
@
click=
"changeAidedDesign"
/
>
<!--
<el-button
class=
"el-icon-help button-closed"
size=
"mini"
circle
@
click=
"changeAidedDesign"
/>
--
>
<
/el-tooltip
>
<
!--
</el-tooltip>
--
>
<
el-tooltip
v-if=
"aidedButtonActive"
:content=
"$t('panel.close_aided_design') "
>
<
!--
<el-tooltip
v-if=
"aidedButtonActive"
:content=
"$t('panel.close_aided_design') "
>
--
>
<el-button
class=
"el-icon-help button-show"
size=
"mini"
circle
@
click=
"changeAidedDesign"
/
>
<!--
<el-button
class=
"el-icon-help button-show"
size=
"mini"
circle
@
click=
"changeAidedDesign"
/>
--
>
<
/el-tooltip
>
<
!--
</el-tooltip>
--
>
<el-tooltip
:content=
"$t('panel.undo') "
>
<el-tooltip
:content=
"$t('panel.undo') "
>
<el-button
class=
"el-icon-refresh-right"
size=
"mini"
circle
@
click=
"undo"
/>
<el-button
class=
"el-icon-refresh-right"
size=
"mini"
circle
@
click=
"undo"
/>
...
...
frontend/src/components/canvas/custom-component/RectShape.vue
浏览文件 @
a7b67c5c
<
template
>
<
template
>
<div
class=
"rect-shape"
>
<div
class=
"rect-shape"
>
<v-text
:propV
alue=
"element.propValue"
:element=
"element"
/>
<v-text
:prop-v
alue=
"element.propValue"
:element=
"element"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
element
:
{
element
:
{
type
:
Object
,
type
:
Object
},
}
},
}
}
}
</
script
>
</
script
>
...
@@ -20,4 +20,4 @@ export default {
...
@@ -20,4 +20,4 @@ export default {
height
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow
:
auto
;
}
}
</
style
>
</
style
>
\ No newline at end of file
frontend/src/components/canvas/custom-component/component-list.js
浏览文件 @
a7b67c5c
...
@@ -47,18 +47,18 @@ const list = [
...
@@ -47,18 +47,18 @@ const list = [
id
:
'10001'
,
id
:
'10001'
,
component
:
'v-text'
,
component
:
'v-text'
,
label
:
'文字'
,
label
:
'文字'
,
propValue
:
'双击
编辑
文字'
,
propValue
:
'双击
输入
文字'
,
icon
:
'wenben'
,
icon
:
'wenben'
,
type
:
'v-text'
,
type
:
'v-text'
,
style
:
{
style
:
{
width
:
2
00
,
width
:
3
00
,
height
:
22
,
height
:
100
,
fontSize
:
1
4
,
fontSize
:
1
8
,
fontWeight
:
500
,
fontWeight
:
500
,
lineHeight
:
''
,
lineHeight
:
''
,
letterSpacing
:
0
,
letterSpacing
:
0
,
textAlign
:
''
,
textAlign
:
''
,
color
:
''
color
:
'
#000000
'
}
}
},
},
{
{
...
@@ -119,22 +119,15 @@ const list = [
...
@@ -119,22 +119,15 @@ const list = [
style
:
{
style
:
{
width
:
200
,
width
:
200
,
height
:
200
,
height
:
200
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
'center'
,
color
:
''
,
borderColor
:
'#000'
,
borderColor
:
'#000'
,
borderWidth
:
1
,
borderWidth
:
1
,
backgroundColor
:
''
,
backgroundColor
:
''
,
borderStyle
:
'solid'
,
borderStyle
:
'solid'
verticalAlign
:
'middle'
}
}
},
},
{
{
id
:
'10005'
,
id
:
'10005'
,
component
:
'
user-
view'
,
component
:
'view'
,
label
:
'用户视图'
,
label
:
'用户视图'
,
propValue
:
''
,
propValue
:
''
,
icon
:
'juxing'
,
icon
:
'juxing'
,
...
...
frontend/src/lang/en.js
浏览文件 @
a7b67c5c
...
@@ -996,7 +996,8 @@ export default {
...
@@ -996,7 +996,8 @@ export default {
other_module
:
'Other'
,
other_module
:
'Other'
,
content
:
'Content'
,
content
:
'Content'
,
default_panel_name
:
'Default Dashboard Name'
,
default_panel_name
:
'Default Dashboard Name'
,
source_panel_name
:
'Source Dashboard Name'
source_panel_name
:
'Source Dashboard Name'
,
content_style
:
'Content Style'
,
},
},
plugin
:
{
plugin
:
{
local_install
:
'Local installation'
,
local_install
:
'Local installation'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
a7b67c5c
...
@@ -996,7 +996,8 @@ export default {
...
@@ -996,7 +996,8 @@ export default {
other_module
:
'其他'
,
other_module
:
'其他'
,
content
:
'内容'
,
content
:
'内容'
,
default_panel_name
:
'默认仪表板名称'
,
default_panel_name
:
'默认仪表板名称'
,
source_panel_name
:
'原仪表板名称'
source_panel_name
:
'原仪表板名称'
,
content_style
:
'内容样式'
},
},
plugin
:
{
plugin
:
{
local_install
:
'本地安裝'
,
local_install
:
'本地安裝'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
a7b67c5c
...
@@ -996,7 +996,8 @@ export default {
...
@@ -996,7 +996,8 @@ export default {
other_module
:
'其他'
,
other_module
:
'其他'
,
content
:
'内容'
,
content
:
'内容'
,
default_panel_name
:
'默认仪表板名称'
,
default_panel_name
:
'默认仪表板名称'
,
source_panel_name
:
'原仪表板名称'
source_panel_name
:
'原仪表板名称'
,
content_style
:
'内容样式'
},
},
plugin
:
{
plugin
:
{
local_install
:
'本地安装'
,
local_install
:
'本地安装'
,
...
...
frontend/src/styles/index.scss
浏览文件 @
a7b67c5c
...
@@ -103,6 +103,24 @@ div:focus {
...
@@ -103,6 +103,24 @@ div:focus {
}
}
}
}
.de-style-dialog
{
min-width
:
500px
!
important
;
width
:
300px
!
important
;
.el-dialog__header
{
// background-color: #f4f4f5;
padding
:
10px
20px
!
important
;
.el-dialog__headerbtn
{
top
:
15px
!
important
;
}
}
.el-dialog__body
{
padding
:
1px
15px
!
important
;
}
}
.preview-dialog
{
.preview-dialog
{
padding
:
0px
!
important
;
padding
:
0px
!
important
;
.el-dialog--center
{
.el-dialog--center
{
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
a7b67c5c
...
@@ -104,10 +104,10 @@
...
@@ -104,10 +104,10 @@
<Editor
v-if=
"!previewVisible"
:out-style=
"outStyle"
/>
<Editor
v-if=
"!previewVisible"
:out-style=
"outStyle"
/>
</div>
</div>
</de-main-container>
</de-main-container>
<
de-aside-container
v-if=
"aidedButtonActive"
:class=
"aidedButtonActive ? 'show' : 'hidden'"
class=
"style-aside"
>
<
!--
<de-aside-container
v-if=
"aidedButtonActive"
:class=
"aidedButtonActive ? 'show' : 'hidden'"
class=
"style-aside"
>
--
>
<AttrListExtend
v-if=
"curComponent"
/
>
<!--
<AttrListExtend
v-if=
"curComponent"
/>
--
>
<p
v-else
class=
"placeholder"
>
{{
$t
(
'panel.select_component'
)
}}
</p
>
<!--
<p
v-else
class=
"placeholder"
>
{{
$t
(
'panel.select_component'
)
}}
</p>
--
>
<
/de-aside-container
>
<
!--
</de-aside-container>
--
>
</de-container>
</de-container>
...
@@ -135,6 +135,21 @@
...
@@ -135,6 +135,21 @@
</div>
</div>
</el-dialog>
</el-dialog>
<!--文字组件对话框-->
<el-dialog
v-if=
"styleDialogVisible"
:title=
"$t('panel.style')"
:visible
.
sync=
"styleDialogVisible"
custom-class=
"de-style-dialog"
>
<AttrListExtend
v-if=
"curComponent"
/>
<div
style=
"text-align: center"
>
<span
slot=
"footer"
>
<el-button
size=
"mini"
@
click=
"closeStyleDialog"
>
{{
$t
(
'commons.confirm'
)
}}
</el-button>
</span>
</div>
</el-dialog>
<fullscreen
style=
"height: 100%;background: #f7f8fa;overflow-y: auto"
:fullscreen
.
sync=
"previewVisible"
>
<fullscreen
style=
"height: 100%;background: #f7f8fa;overflow-y: auto"
:fullscreen
.
sync=
"previewVisible"
>
<Preview
v-if=
"previewVisible"
:show-type=
"canvasStyleData.selfAdaption?'full':'width'"
/>
<Preview
v-if=
"previewVisible"
:show-type=
"canvasStyleData.selfAdaption?'full':'width'"
/>
</fullscreen>
</fullscreen>
...
@@ -222,7 +237,8 @@ export default {
...
@@ -222,7 +237,8 @@ export default {
width
:
null
,
width
:
null
,
height
:
null
height
:
null
},
},
beforeDialogValue
:
[]
beforeDialogValue
:
[],
styleDialogVisible
:
false
}
}
},
},
...
@@ -234,7 +250,8 @@ export default {
...
@@ -234,7 +250,8 @@ export default {
'curComponent'
,
'curComponent'
,
'isClickComponent'
,
'isClickComponent'
,
'canvasStyleData'
,
'canvasStyleData'
,
'curComponentIndex'
'curComponentIndex'
,
'componentData'
])
])
},
},
...
@@ -266,7 +283,10 @@ export default {
...
@@ -266,7 +283,10 @@ export default {
})
})
bus
.
$on
(
'component-dialog-edit'
,
()
=>
{
bus
.
$on
(
'component-dialog-edit'
,
()
=>
{
this
.
eidtDialog
()
this
.
editDialog
()
})
bus
.
$on
(
'component-dialog-style'
,
()
=>
{
this
.
styleDialogVisible
=
true
})
})
bus
.
$on
(
'previewFullScreenClose'
,
()
=>
{
bus
.
$on
(
'previewFullScreenClose'
,
()
=>
{
...
@@ -400,7 +420,7 @@ export default {
...
@@ -400,7 +420,7 @@ export default {
this
.
currentFilterCom
.
id
=
newComponentId
this
.
currentFilterCom
.
id
=
newComponentId
if
(
this
.
currentWidget
.
filterDialog
)
{
if
(
this
.
currentWidget
.
filterDialog
)
{
this
.
show
=
false
this
.
show
=
false
this
.
openFilterDi
o
log
()
this
.
openFilterDi
a
log
()
return
return
}
}
component
=
deepCopy
(
this
.
currentFilterCom
)
component
=
deepCopy
(
this
.
currentFilterCom
)
...
@@ -413,6 +433,14 @@ export default {
...
@@ -413,6 +433,14 @@ export default {
this
.
$store
.
commit
(
'addComponent'
,
{
component
})
this
.
$store
.
commit
(
'addComponent'
,
{
component
})
this
.
$store
.
commit
(
'recordSnapshot'
)
this
.
$store
.
commit
(
'recordSnapshot'
)
this
.
clearCurrentInfo
()
this
.
clearCurrentInfo
()
debugger
// 文字组件
if
(
component
.
type
===
'v-text'
||
component
.
type
===
'rect-shape'
)
{
this
.
$store
.
commit
(
'setCurComponent'
,
{
component
:
component
,
index
:
this
.
componentData
.
length
})
this
.
styleDialogVisible
=
true
this
.
show
=
false
}
},
},
clearCurrentInfo
()
{
clearCurrentInfo
()
{
this
.
currentWidget
=
null
this
.
currentWidget
=
null
...
@@ -440,7 +468,7 @@ export default {
...
@@ -440,7 +468,7 @@ export default {
this
.
$store
.
commit
(
'hideContextMenu'
)
this
.
$store
.
commit
(
'hideContextMenu'
)
}
}
},
},
openFilterDi
o
log
()
{
openFilterDi
a
log
()
{
this
.
beforeDialogValue
=
[]
this
.
beforeDialogValue
=
[]
this
.
filterVisible
=
true
this
.
filterVisible
=
true
},
},
...
@@ -463,11 +491,11 @@ export default {
...
@@ -463,11 +491,11 @@ export default {
this
.
currentFilterCom
=
component
this
.
currentFilterCom
=
component
this
.
$forceUpdate
()
this
.
$forceUpdate
()
},
},
e
id
tDialog
()
{
e
di
tDialog
()
{
const
serviceName
=
this
.
curComponent
.
serviceName
const
serviceName
=
this
.
curComponent
.
serviceName
this
.
currentWidget
=
ApplicationContext
.
getService
(
serviceName
)
this
.
currentWidget
=
ApplicationContext
.
getService
(
serviceName
)
this
.
currentFilterCom
=
this
.
curComponent
this
.
currentFilterCom
=
this
.
curComponent
this
.
openFilterDi
o
log
()
this
.
openFilterDi
a
log
()
},
},
closeLeftPanel
()
{
closeLeftPanel
()
{
this
.
show
=
false
this
.
show
=
false
...
@@ -494,6 +522,9 @@ export default {
...
@@ -494,6 +522,9 @@ export default {
// console.log(canvasHeight + '--' + canvasWidth)
// console.log(canvasHeight + '--' + canvasWidth)
})
})
}
}
},
closeStyleDialog
()
{
this
.
styleDialogVisible
=
false
}
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论