Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
01cab077
提交
01cab077
authored
8月 25, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor:仪表板编辑时,文字组件、矩形组件、过滤组件样式设置面板强制在画布区域内
上级
f6b99f81
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
56 行增加
和
8 行删除
+56
-8
FilterTextAttr.vue
frontend/src/components/canvas/components/FilterTextAttr.vue
+18
-2
RectangleAttr.vue
frontend/src/components/canvas/components/RectangleAttr.vue
+18
-2
TextAttr.vue
frontend/src/components/canvas/components/TextAttr.vue
+18
-2
index.vue
frontend/src/views/panel/edit/index.vue
+2
-2
没有找到文件。
frontend/src/
views/Tinymce
/FilterTextAttr.vue
→
frontend/src/
components/canvas/components
/FilterTextAttr.vue
浏览文件 @
01cab077
...
...
@@ -109,6 +109,13 @@ export default {
styleInfo
()
{
return
this
.
$store
.
state
.
curComponent
.
style
},
canvasWidth
()
{
let
scaleWidth
=
1
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
scaleWidth
=
this
.
curCanvasScale
.
scaleWidth
/
100
}
return
this
.
canvasStyleData
.
width
*
scaleWidth
},
...
mapState
([
'curComponent'
,
'curCanvasScale'
,
...
...
@@ -124,10 +131,19 @@ export default {
this
.
$refs
.
backgroundColorPicker
.
handleTrigger
()
},
getPositionX
(
x
)
{
let
ps
=
0
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
ps
=
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
}
else
{
ps
=
x
+
60
}
// 防止toolbar超出边界
const
xGap
=
ps
+
295
-
this
.
canvasWidth
// console.log('canvasWidth:' + this.canvasWidth + ';xGap:' + xGap)
if
(
xGap
>
0
)
{
return
ps
-
xGap
}
else
{
return
x
+
60
return
ps
}
},
getPositionY
(
y
)
{
...
...
frontend/src/components/canvas/components/RectangleAttr.vue
浏览文件 @
01cab077
...
...
@@ -161,6 +161,13 @@ export default {
styleInfo
()
{
return
this
.
$store
.
state
.
curComponent
.
style
},
canvasWidth
()
{
let
scaleWidth
=
1
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
scaleWidth
=
this
.
curCanvasScale
.
scaleWidth
/
100
}
return
this
.
canvasStyleData
.
width
*
scaleWidth
},
...
mapState
([
'curComponent'
,
'curCanvasScale'
,
...
...
@@ -176,10 +183,19 @@ export default {
this
.
$refs
.
backgroundColorPicker
.
handleTrigger
()
},
getPositionX
(
x
)
{
let
ps
=
0
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
ps
=
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
}
else
{
ps
=
x
+
60
}
// 防止toolbar超出边界
const
xGap
=
ps
+
345
-
this
.
canvasWidth
// console.log('canvasWidth:' + this.canvasWidth + ';xGap:' + xGap)
if
(
xGap
>
0
)
{
return
ps
-
xGap
}
else
{
return
x
+
60
return
ps
}
},
getPositionY
(
y
)
{
...
...
frontend/src/
views/Tinymce
/TextAttr.vue
→
frontend/src/
components/canvas/components
/TextAttr.vue
浏览文件 @
01cab077
...
...
@@ -124,6 +124,13 @@ export default {
styleInfo
()
{
return
this
.
$store
.
state
.
curComponent
.
style
},
canvasWidth
()
{
let
scaleWidth
=
1
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
scaleWidth
=
this
.
curCanvasScale
.
scaleWidth
/
100
}
return
this
.
canvasStyleData
.
width
*
scaleWidth
},
...
mapState
([
'curComponent'
,
'curCanvasScale'
,
...
...
@@ -139,10 +146,19 @@ export default {
this
.
$refs
.
backgroundColorPicker
.
handleTrigger
()
},
getPositionX
(
x
)
{
let
ps
=
0
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
return
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
ps
=
(
x
*
this
.
curCanvasScale
.
scaleWidth
/
100
)
+
60
}
else
{
ps
=
x
+
60
}
// 防止toolbar超出边界
const
xGap
=
ps
+
395
-
this
.
canvasWidth
// console.log('canvasWidth:' + this.canvasWidth + ';xGap:' + xGap)
if
(
xGap
>
0
)
{
return
ps
-
xGap
}
else
{
return
x
+
60
return
ps
}
},
getPositionY
(
y
)
{
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
01cab077
...
...
@@ -214,8 +214,8 @@ import toast from '@/components/canvas/utils/toast'
import
{
commonStyle
,
commonAttr
}
from
'@/components/canvas/custom-component/component-list'
import
generateID
from
'@/components/canvas/utils/generateID'
import
RectangleAttr
from
'@/components/canvas/components/RectangleAttr'
import
TextAttr
from
'@/
views/Tinymce
/TextAttr'
import
FilterTextAttr
from
'@/
views/Tinymce
/FilterTextAttr'
import
TextAttr
from
'@/
components/canvas/components
/TextAttr'
import
FilterTextAttr
from
'@/
components/canvas/components
/FilterTextAttr'
export
default
{
name
:
'PanelEdit'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论