Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
9f879a88
提交
9f879a88
authored
11月 23, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 优化仪表板展示边界间隙,保持常有间隙
上级
70427efb
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
60 行增加
和
65 行删除
+60
-65
ComponentWrapper.vue
.../components/canvas/components/Editor/ComponentWrapper.vue
+16
-19
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+37
-45
DeOutWidget.vue
frontend/src/components/dataease/DeOutWidget.vue
+7
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/ComponentWrapper.vue
浏览文件 @
9f879a88
...
...
@@ -5,7 +5,7 @@
@
click=
"handleClick"
@
mousedown=
"elementMouseDown"
>
<edit-bar
v-if=
"
curComponent && config === curComponent
"
:element=
"config"
@
showViewDetails=
"showViewDetails"
/>
<edit-bar
v-if=
"
editBarShow
"
:element=
"config"
@
showViewDetails=
"showViewDetails"
/>
<de-out-widget
v-if=
"config.type==='custom'"
:id=
"'component' + config.id"
...
...
@@ -15,7 +15,6 @@
:element=
"config"
:in-screen=
"inScreen"
/>
<component
:is=
"config.component"
v-else
...
...
@@ -65,6 +64,9 @@ export default {
}
},
computed
:
{
editBarShow
()
{
return
this
.
curComponent
&&
this
.
config
===
this
.
curComponent
},
curGap
()
{
return
this
.
canvasStyleData
.
panel
.
gap
===
'yes'
&&
this
.
config
.
auxiliaryMatrix
?
this
.
componentGap
:
0
},
...
...
@@ -79,7 +81,6 @@ export default {
},
methods
:
{
getStyle
,
getShapeStyleIntDeDrag
(
style
,
prop
)
{
if
(
prop
===
'rotate'
)
{
return
style
[
'rotate'
]
...
...
@@ -114,17 +115,11 @@ export default {
result
[
attr
]
=
style
[
attr
]
+
'px'
})
result
[
'rotate'
]
=
style
[
'rotate'
]
// result['opacity'] = style['opacity']
return
result
// return style
},
getComponentStyleDefault
(
style
)
{
return
getStyle
(
style
,
[
'top'
,
'left'
,
'width'
,
'height'
,
'rotate'
])
// console.log('styleInfo', JSON.stringify(styleInfo))
// return styleInfo
// return style
},
handleClick
()
{
...
...
@@ -151,19 +146,21 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.component
{
.component
{
position
:
absolute
;
}
}
.component
:hover
{
box-shadow
:
0px
0px
7px
#0a7be0
;
}
.gap_class
{
padding
:
5px
;
}
.component-custom
{
.component
:hover
{
box-shadow
:
0px
0px
7px
#0a7be0
;
}
.gap_class
{
padding
:
5px
;
}
.component-custom
{
outline
:
none
;
width
:
100%
!
important
;
height
:
100%
;
}
}
</
style
>
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
9f879a88
<
template
>
<div
id=
"canvasInfoMain"
ref=
"canvasInfoMain"
:style=
"customStyle"
class=
"bg"
>
<div
id=
"canvasInfoTemp"
ref=
"canvasInfoTemp"
class=
"main-class"
@
mouseup=
"deselectCurComponent"
@
mousedown=
"handleMouseDown"
>
<div
class=
"bg"
:style=
"customStyle"
>
<div
id=
"canvasInfoMain"
ref=
"canvasInfoMain"
style=
"width: 100%;height: 100%"
>
<div
id=
"canvasInfoTemp"
ref=
"canvasInfoTemp"
class=
"main-class"
@
mouseup=
"deselectCurComponent"
@
mousedown=
"handleMouseDown"
>
<el-row
v-if=
"componentDataShow.length===0"
style=
"height: 100%;"
class=
"custom-position"
>
{{
$t
(
'panel.panelNull'
)
}}
</el-row>
...
...
@@ -30,6 +37,7 @@
</el-dialog>
</div>
</div>
</div>
</
template
>
<
script
>
...
...
@@ -94,9 +102,7 @@ export default {
},
computed
:
{
customStyle
()
{
let
style
=
{
padding
:
this
.
componentGap
+
'px'
}
let
style
=
{}
if
(
this
.
canvasStyleData
.
openCommonStyle
)
{
if
(
this
.
canvasStyleData
.
panel
.
backgroundType
===
'image'
&&
this
.
canvasStyleData
.
panel
.
imageUrl
)
{
style
=
{
...
...
@@ -110,16 +116,6 @@ export default {
}
}
}
// if (this.canvasStyleData.selfAdaption) {
// style = {
// overflow: 'hidden',
// ...style
// }
// }
// style = {
// overflow-x :'hidden',
// ...style
// }
return
style
},
// 此处单独计算componentData的值 不放入全局mapState中
...
...
@@ -152,17 +148,17 @@ export default {
const
_this
=
this
const
erd
=
elementResizeDetectorMaker
()
// 监听div变动事件
const
temp
Dom
=
document
.
getElementById
(
'canvasInfoMain'
)
erd
.
listenTo
(
temp
Dom
,
element
=>
{
const
main
Dom
=
document
.
getElementById
(
'canvasInfoMain'
)
erd
.
listenTo
(
main
Dom
,
element
=>
{
_this
.
$nextTick
(()
=>
{
_this
.
restore
()
// 将mainHeight 修改为px 临时解决html2canvas 截图不全的问题
_this
.
mainHeight
=
temp
Dom
.
scrollHeight
+
'px!important'
_this
.
mainHeight
=
main
Dom
.
scrollHeight
+
'px!important'
})
})
eventBus
.
$on
(
'openChartDetailsDialog'
,
this
.
openChartDetailsDialog
)
this
.
$store
.
commit
(
'clearLinkageSettingInfo'
,
false
)
this
.
canvasStyleDataInit
()
_
this
.
$store
.
commit
(
'clearLinkageSettingInfo'
,
false
)
_
this
.
canvasStyleDataInit
()
},
beforeDestroy
()
{
clearInterval
(
this
.
timer
)
...
...
@@ -235,8 +231,6 @@ export default {
}
},
handleMouseDown
()
{
// console.log('handleMouseDown123')
this
.
$store
.
commit
(
'setClickComponentStatus'
,
false
)
}
}
...
...
@@ -244,28 +238,22 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.bg
{
.bg
{
padding
:
5px
;
min-width
:
600px
;
min-height
:
300px
;
width
:
100%
;
height
:
100%
;
overflow-x
:
hidden
;
/*border: 1px solid #E6E6E6;*/
background-size
:
100%
100%
!
important
;
.canvas-container
{
width
:
100%
;
height
:
100%
;
.canvas
{
position
:
relative
;
margin
:
auto
;
}
}
}
.main-class
{
.main-class
{
width
:
100%
;
height
:
100%
;
}
.custom-position
{
}
.custom-position
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
...
...
@@ -273,18 +261,22 @@ export default {
font-size
:
14px
;
flex-flow
:
row
nowrap
;
color
:
#9ea6b2
;
}
.gap_class
{
padding
:
5px
;
}
.dialog-css
>>>
.el-dialog__title
{
}
.gap_class
{
padding
:
5px
;
}
.dialog-css
>
>
>
.el-dialog__title
{
font-size
:
14px
;
}
.dialog-css
>>>
.el-dialog__header
{
}
.dialog-css
>
>
>
.el-dialog__header
{
padding
:
20px
20px
0
;
}
.dialog-css
>>>
.el-dialog__body
{
}
.dialog-css
>
>
>
.el-dialog__body
{
padding
:
10px
20px
20px
;
}
}
</
style
>
frontend/src/components/dataease/DeOutWidget.vue
浏览文件 @
9f879a88
<
template
>
<div
class=
"outside-container"
>
<div
ref=
"myContainer"
class=
"my-container"
>
<div
ref=
"conditionMain"
class=
"condition-main"
:class=
"mainClass"
>
<div
v-if=
"element.options.attrs.title"
ref=
"deTitleContainer"
class=
"condition-title"
>
...
...
@@ -30,6 +31,7 @@
</div>
</div>
</div>
</div>
</
template
>
<
script
>
...
...
@@ -97,12 +99,16 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.outside-container
{
width
:
100%
;
height
:
100%
;
}
.my-container
{
position
:
absolute
;
overflow
:
auto
;
inset
:
0px
;
}
.c
c
ondition-main
{
.condition-main
{
position
:
absolute
;
overflow
:
auto
;
inset
:
0px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论