Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
88f5e25e
提交
88f5e25e
authored
7月 07, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:矩形组件和文本组件在非自适应画布区域的模式下对应悬浮组件定位问题
上级
eaa730ee
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
52 行增加
和
12 行删除
+52
-12
RectangleAttr.vue
frontend/src/components/canvas/components/RectangleAttr.vue
+13
-3
RectangleAttr.vue
frontend/src/views/Tinymce/RectangleAttr.vue
+13
-3
TextAttr.vue
frontend/src/views/Tinymce/TextAttr.vue
+13
-3
index.vue
frontend/src/views/panel/edit/index.vue
+13
-3
没有找到文件。
frontend/src/components/canvas/components/RectangleAttr.vue
浏览文件 @
88f5e25e
...
@@ -58,6 +58,16 @@
...
@@ -58,6 +58,16 @@
<
script
>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
props
:
{
scrollLeft
:
{
type
:
Number
,
default
:
0
},
scrollTop
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
data
()
{
return
{
return
{
lineStyle
:
[{
lineStyle
:
[{
...
@@ -113,8 +123,8 @@ export default {
...
@@ -113,8 +123,8 @@ export default {
mainStyle
()
{
mainStyle
()
{
const
style
=
{
const
style
=
{
left
:
this
.
getPositionX
(
this
.
curComponent
.
style
.
left
)
+
'px'
,
left
:
this
.
getPositionX
(
this
.
curComponent
.
style
.
left
-
this
.
scrollLeft
)
+
'px'
,
top
:
(
this
.
getPositionY
(
this
.
curComponent
.
style
.
top
)
-
3
)
+
'px'
top
:
(
this
.
getPositionY
(
this
.
curComponent
.
style
.
top
)
-
this
.
scrollTop
-
3
)
+
'px'
}
}
return
style
return
style
},
},
...
@@ -139,7 +149,7 @@ export default {
...
@@ -139,7 +149,7 @@ export default {
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
}
else
{
}
else
{
return
x
+
19
0
return
x
+
6
0
}
}
},
},
getPositionY
(
y
)
{
getPositionY
(
y
)
{
...
...
frontend/src/views/Tinymce/RectangleAttr.vue
浏览文件 @
88f5e25e
...
@@ -58,6 +58,16 @@
...
@@ -58,6 +58,16 @@
<
script
>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
props
:
{
scrollLeft
:
{
type
:
Number
,
default
:
0
},
scrollTop
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
data
()
{
return
{
return
{
lineStyle
:
[{
lineStyle
:
[{
...
@@ -113,8 +123,8 @@ export default {
...
@@ -113,8 +123,8 @@ export default {
mainStyle
()
{
mainStyle
()
{
const
style
=
{
const
style
=
{
left
:
this
.
getPositionX
(
this
.
curComponent
.
style
.
left
)
+
'px'
,
left
:
this
.
getPositionX
(
this
.
curComponent
.
style
.
left
-
this
.
scrollLeft
)
+
'px'
,
top
:
(
this
.
getPositionY
(
this
.
curComponent
.
style
.
top
)
-
3
)
+
'px'
top
:
(
this
.
getPositionY
(
this
.
curComponent
.
style
.
top
)
-
this
.
scrollTop
-
3
)
+
'px'
}
}
return
style
return
style
},
},
...
@@ -139,7 +149,7 @@ export default {
...
@@ -139,7 +149,7 @@ export default {
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
}
else
{
}
else
{
return
x
+
19
0
return
x
+
6
0
}
}
},
},
getPositionY
(
y
)
{
getPositionY
(
y
)
{
...
...
frontend/src/views/Tinymce/TextAttr.vue
浏览文件 @
88f5e25e
...
@@ -67,6 +67,16 @@
...
@@ -67,6 +67,16 @@
<
script
>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
props
:
{
scrollLeft
:
{
type
:
Number
,
default
:
0
},
scrollTop
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
data
()
{
return
{
return
{
textAlignOptions
:
[
textAlignOptions
:
[
...
@@ -106,8 +116,8 @@ export default {
...
@@ -106,8 +116,8 @@ export default {
mainStyle
()
{
mainStyle
()
{
const
style
=
{
const
style
=
{
left
:
this
.
getPositionX
(
this
.
curComponent
.
style
.
l
eft
)
+
'px'
,
left
:
(
this
.
getPositionX
(
this
.
curComponent
.
style
.
left
)
-
this
.
scrollL
eft
)
+
'px'
,
top
:
(
this
.
getPositionY
(
this
.
curComponent
.
style
.
top
)
-
3
)
+
'px'
top
:
(
this
.
getPositionY
(
this
.
curComponent
.
style
.
top
)
-
this
.
scrollTop
-
3
)
+
'px'
}
}
return
style
return
style
},
},
...
@@ -132,7 +142,7 @@ export default {
...
@@ -132,7 +142,7 @@ export default {
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
}
else
{
}
else
{
return
x
+
19
0
return
x
+
6
0
}
}
},
},
getPositionY
(
y
)
{
getPositionY
(
y
)
{
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
88f5e25e
...
@@ -101,6 +101,7 @@
...
@@ -101,6 +101,7 @@
@
dragover=
"handleDragOver"
@
dragover=
"handleDragOver"
@
mousedown=
"handleMouseDown"
@
mousedown=
"handleMouseDown"
@
mouseup=
"deselectCurComponent"
@
mouseup=
"deselectCurComponent"
@
scroll=
"canvasScroll"
>
>
<Editor
v-if=
"!previewVisible"
:out-style=
"outStyle"
/>
<Editor
v-if=
"!previewVisible"
:out-style=
"outStyle"
/>
</div>
</div>
...
@@ -158,8 +159,8 @@
...
@@ -158,8 +159,8 @@
<input
id=
"input"
ref=
"files"
type=
"file"
accept=
"image/*"
hidden
@
change=
"handleFileChange"
>
<input
id=
"input"
ref=
"files"
type=
"file"
accept=
"image/*"
hidden
@
change=
"handleFileChange"
>
<!--矩形样式组件-->
<!--矩形样式组件-->
<RectangleAttr
v-if=
"curComponent&&curComponent.type==='rect-shape'"
/>
<RectangleAttr
v-if=
"curComponent&&curComponent.type==='rect-shape'"
:scroll-left=
"scrollLeft"
:scroll-top=
"scrollTop"
/>
<TextAttr
v-if=
"curComponent&&curComponent.type==='v-text'"
/>
<TextAttr
v-if=
"curComponent&&curComponent.type==='v-text'"
:scroll-left=
"scrollLeft"
:scroll-top=
"scrollTop"
/>
<!--复用ChartGroup组件 不做显示-->
<!--复用ChartGroup组件 不做显示-->
<ChartGroup
<ChartGroup
...
@@ -269,7 +270,9 @@ export default {
...
@@ -269,7 +270,9 @@ export default {
beforeDialogValue
:
[],
beforeDialogValue
:
[],
styleDialogVisible
:
false
,
styleDialogVisible
:
false
,
currentDropElement
:
null
,
currentDropElement
:
null
,
adviceGroupId
:
null
adviceGroupId
:
null
,
scrollLeft
:
0
,
scrollTop
:
0
}
}
},
},
...
@@ -307,6 +310,8 @@ export default {
...
@@ -307,6 +310,8 @@ export default {
// this.restore()
// this.restore()
// 全局监听按键事件
// 全局监听按键事件
listenGlobalKeyDown
()
listenGlobalKeyDown
()
this
.
$store
.
commit
(
'setCurComponent'
,
{
component
:
null
,
index
:
null
})
},
},
mounted
()
{
mounted
()
{
// this.insertToBody()
// this.insertToBody()
...
@@ -662,6 +667,11 @@ export default {
...
@@ -662,6 +667,11 @@ export default {
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
,
'optType'
:
'edit'
}})
bus
.
$emit
(
'PanelSwitchComponent'
,
{
name
:
'ChartEdit'
,
param
:
{
'id'
:
this
.
curComponent
.
propValue
.
viewId
,
'optType'
:
'edit'
}})
}
}
},
canvasScroll
(
event
)
{
debugger
this
.
scrollLeft
=
event
.
target
.
scrollLeft
this
.
scrollTop
=
event
.
target
.
scrollTop
}
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论