Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
5e1a3779
提交
5e1a3779
authored
9月 22, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor:优化图片拖拽进仪表版的展示方式,设置为固定高宽
上级
1b211527
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
11 行删除
+17
-11
index.vue
frontend/src/views/panel/AssistComponent/index.vue
+4
-1
index.vue
frontend/src/views/panel/edit/index.vue
+13
-9
index.vue
frontend/src/views/panel/filter/index.vue
+0
-1
没有找到文件。
frontend/src/views/panel/AssistComponent/index.vue
浏览文件 @
5e1a3779
<
template
>
<div
class=
"filter-container"
@
dragstart=
"handleDragStart"
>
<div
class=
"filter-container"
@
dragstart=
"handleDragStart"
@
dragend=
"handleDragEnd()"
>
<div
class=
"widget-subject"
>
<div
class=
"filter-header"
>
...
...
@@ -134,6 +134,9 @@ export default {
}
})
return
component
},
handleDragEnd
(
ev
)
{
this
.
$store
.
commit
(
'clearDragComponentInfo'
)
}
}
}
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
5e1a3779
...
...
@@ -275,7 +275,8 @@ export default {
adviceGroupId
:
null
,
scrollLeft
:
0
,
scrollTop
:
0
,
timeMachine
:
null
timeMachine
:
null
,
dropComponentInfo
:
null
}
},
...
...
@@ -440,6 +441,8 @@ export default {
return
data
},
handleDrop
(
e
)
{
// 记录拖拽信息
this
.
dropComponentInfo
=
deepCopy
(
this
.
dragComponentInfo
)
this
.
currentDropElement
=
e
e
.
preventDefault
()
e
.
stopPropagation
()
...
...
@@ -491,10 +494,10 @@ export default {
// position = absolution 或导致有偏移 这里中和一下偏移量
// component.style.top = this.getPositionY(e.layerY)
// component.style.left = this.getPositionX(e.layerX)
component
.
style
.
top
=
this
.
dr
ag
ComponentInfo
.
shadowStyle
.
y
component
.
style
.
left
=
this
.
dr
ag
ComponentInfo
.
shadowStyle
.
x
component
.
style
.
width
=
this
.
dr
ag
ComponentInfo
.
shadowStyle
.
width
component
.
style
.
height
=
this
.
dr
ag
ComponentInfo
.
shadowStyle
.
height
component
.
style
.
top
=
this
.
dr
op
ComponentInfo
.
shadowStyle
.
y
component
.
style
.
left
=
this
.
dr
op
ComponentInfo
.
shadowStyle
.
x
component
.
style
.
width
=
this
.
dr
op
ComponentInfo
.
shadowStyle
.
width
component
.
style
.
height
=
this
.
dr
op
ComponentInfo
.
shadowStyle
.
height
component
.
id
=
newComponentId
this
.
$store
.
commit
(
'addComponent'
,
{
component
})
...
...
@@ -594,6 +597,7 @@ export default {
this
.
$refs
.
files
.
click
()
},
handleFileChange
(
e
)
{
const
_this
=
this
const
file
=
e
.
target
.
files
[
0
]
if
(
!
file
.
type
.
includes
(
'image'
))
{
toast
(
'只能插入图片'
)
...
...
@@ -618,10 +622,10 @@ export default {
propValue
:
fileResult
,
style
:
{
...
commonStyle
,
top
:
this
.
drag
ComponentInfo
.
shadowStyle
.
y
,
left
:
this
.
drag
ComponentInfo
.
shadowStyle
.
x
,
width
:
this
.
drag
ComponentInfo
.
shadowStyle
.
width
,
height
:
this
.
drag
ComponentInfo
.
shadowStyle
.
height
top
:
_this
.
drop
ComponentInfo
.
shadowStyle
.
y
,
left
:
_this
.
drop
ComponentInfo
.
shadowStyle
.
x
,
width
:
_this
.
drop
ComponentInfo
.
shadowStyle
.
width
,
height
:
_this
.
drop
ComponentInfo
.
shadowStyle
.
height
}
}
})
...
...
frontend/src/views/panel/filter/index.vue
浏览文件 @
5e1a3779
...
...
@@ -91,7 +91,6 @@ export default {
ev
.
dataTransfer
.
setData
(
'componentInfo'
,
JSON
.
stringify
(
dataTrans
))
},
handleDragEnd
(
ev
)
{
console
.
log
(
'handleDragEnd==>'
)
this
.
$store
.
commit
(
'clearDragComponentInfo'
)
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论