Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
01eb4abc
提交
01eb4abc
authored
5月 06, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:增加预览背景设置 解决改变窗口大小 echart 有滚动条的问题
上级
9ba7aeae
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
50 行增加
和
13 行删除
+50
-13
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+23
-3
PreviewEject.vue
.../src/components/canvas/components/Editor/PreviewEject.vue
+25
-8
PreviewFullScreen.vue
...components/canvas/components/Editor/PreviewFullScreen.vue
+1
-1
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+1
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
01eb4abc
<
template
>
<
template
>
<div
id=
"canvasInfo"
class=
"bg"
>
<div
id=
"canvasInfo"
:style=
"customStyle"
class=
"bg"
>
<ComponentWrapper
<ComponentWrapper
v-for=
"(item, index) in componentDataInfo"
v-for=
"(item, index) in componentDataInfo"
:key=
"index"
:key=
"index"
...
@@ -51,6 +51,25 @@ export default {
...
@@ -51,6 +51,25 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
customStyle
()
{
let
style
=
{}
if
(
this
.
canvasStyleData
.
openCommonStyle
)
{
if
(
this
.
canvasStyleData
.
panel
.
backgroundType
===
'image'
)
{
style
=
{
width
:
'100%'
,
height
:
'100%'
,
background
:
`url(
${
this
.
canvasStyleData
.
panel
.
imageUrl
}
) no-repeat`
}
}
else
{
style
=
{
width
:
'100%'
,
height
:
'100%'
,
background
:
this
.
canvasStyleData
.
panel
.
color
}
}
}
return
style
},
// 此处单独计算componentData的值 不放入全局mapState中
// 此处单独计算componentData的值 不放入全局mapState中
componentDataInfo
()
{
componentDataInfo
()
{
return
this
.
componentDataShow
return
this
.
componentDataShow
...
@@ -81,7 +100,7 @@ export default {
...
@@ -81,7 +100,7 @@ export default {
this
.
handleScaleChange
()
this
.
handleScaleChange
()
},
},
resetID
(
data
)
{
resetID
(
data
)
{
if
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
()
item
.
id
=
uuid
.
v1
()
})
})
...
@@ -104,7 +123,7 @@ export default {
...
@@ -104,7 +123,7 @@ export default {
})
})
})
})
this
.
componentDataShow
=
componentData
this
.
componentDataShow
=
componentData
eventBus
.
$emit
(
'resizing'
,
''
)
this
.
$nextTick
(()
=>
(
eventBus
.
$emit
(
'resizing'
,
''
))
)
}
}
}
}
}
}
...
@@ -117,6 +136,7 @@ export default {
...
@@ -117,6 +136,7 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
border
:
1px
solid
#E6E6E6
;
border
:
1px
solid
#E6E6E6
;
background-size
:
100%
!
important
;
.canvas-container
{
.canvas-container
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
...
frontend/src/components/canvas/components/Editor/PreviewEject.vue
浏览文件 @
01eb4abc
<
template
>
<
template
>
<div
id=
"canvasInfo"
class=
"bg"
>
<div
id=
"canvasInfo"
:style=
"customStyle"
class=
"bg"
>
<ComponentWrapper
<ComponentWrapper
v-for=
"(item, index) in componentDataInfo"
v-for=
"(item, index) in componentDataInfo"
:key=
"index"
:key=
"index"
...
@@ -47,13 +47,32 @@ export default {
...
@@ -47,13 +47,32 @@ export default {
scaleWidth
:
'100'
,
scaleWidth
:
'100'
,
scaleHeight
:
'100'
,
scaleHeight
:
'100'
,
timer
:
null
,
timer
:
null
,
componentDataSource
:
{}
,
componentDataSource
:
[]
,
componentData
:
{}
,
componentData
:
[]
,
canvasStyleData
:
{}
canvasStyleData
:
{}
}
}
},
},
computed
:
{
computed
:
{
customStyle
()
{
let
style
=
{}
if
(
this
.
canvasStyleData
.
openCommonStyle
)
{
if
(
this
.
canvasStyleData
.
panel
.
backgroundType
===
'image'
)
{
style
=
{
width
:
'100%'
,
height
:
'100%'
,
background
:
`url(
${
this
.
canvasStyleData
.
panel
.
imageUrl
}
) no-repeat`
}
}
else
{
style
=
{
width
:
'100%'
,
height
:
'100%'
,
background
:
this
.
canvasStyleData
.
panel
.
color
}
}
}
return
style
},
componentDataInfo
()
{
componentDataInfo
()
{
return
this
.
componentData
return
this
.
componentData
}
}
...
@@ -70,9 +89,6 @@ export default {
...
@@ -70,9 +89,6 @@ export default {
_this
.
resize
()
_this
.
resize
()
})
})
})
})
window
.
onresize
=
()
=>
{
this
.
resize
()
}
// this.resize()
// this.resize()
},
},
methods
:
{
methods
:
{
...
@@ -96,7 +112,7 @@ export default {
...
@@ -96,7 +112,7 @@ export default {
})
})
},
},
resetID
(
data
)
{
resetID
(
data
)
{
if
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
()
item
.
id
=
uuid
.
v1
()
})
})
...
@@ -120,7 +136,7 @@ export default {
...
@@ -120,7 +136,7 @@ export default {
})
})
})
})
this
.
componentData
=
componentData
this
.
componentData
=
componentData
eventBus
.
$emit
(
'resizing'
,
''
)
this
.
$nextTick
(()
=>
(
eventBus
.
$emit
(
'resizing'
,
''
))
)
}
}
}
}
}
}
...
@@ -132,6 +148,7 @@ export default {
...
@@ -132,6 +148,7 @@ export default {
min-height
:
600px
;
min-height
:
600px
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background-size
:
100%
!
important
;
overflow
:
auto
;
overflow
:
auto
;
position
:
relative
;
position
:
relative
;
margin
:
0
;
margin
:
0
;
...
...
frontend/src/components/canvas/components/Editor/PreviewFullScreen.vue
浏览文件 @
01eb4abc
<
template
>
<
template
>
<div
style=
"width: 100%;height: 100%;
background-color: #f7f8fa
"
>
<div
style=
"width: 100%;height: 100%;"
>
<span
style=
"line-height: 35px; position: absolute; top:10px;right: 20px;z-index:100000"
>
<span
style=
"line-height: 35px; position: absolute; top:10px;right: 20px;z-index:100000"
>
<el-button
size=
"mini"
@
click=
"toDir"
>
<el-button
size=
"mini"
@
click=
"toDir"
>
关闭
关闭
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
01eb4abc
...
@@ -121,7 +121,7 @@ export default {
...
@@ -121,7 +121,7 @@ export default {
...
this
.
canvasStyleData
,
...
this
.
canvasStyleData
,
scale
:
this
.
scale
scale
:
this
.
scale
})
})
eventBus
.
$emit
(
'resizing'
,
''
)
this
.
$nextTick
(()
=>
(
eventBus
.
$emit
(
'resizing'
,
''
))
)
},
1000
)
},
1000
)
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论