Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
26e21104
提交
26e21104
authored
9月 17, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor:仪表板矩形,文字组件,间隙等默认样
上级
24589b12
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
84 行增加
和
3 行删除
+84
-3
MoveInShadow.vue
frontend/src/components/DeDrag/MoveInShadow.vue
+69
-0
shadow.vue
frontend/src/components/DeDrag/shadow.vue
+1
-1
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+1
-1
index.js
frontend/src/store/index.js
+9
-1
index.vue
frontend/src/views/panel/ViewSelect/index.vue
+2
-0
index.vue
frontend/src/views/panel/edit/index.vue
+2
-0
没有找到文件。
frontend/src/components/DeDrag/MoveInShadow.vue
0 → 100644
浏览文件 @
26e21104
<
template
>
<div
style=
"z-index:-1"
:style=
"style"
/>
</
template
>
<
script
>
import
{
mapState
}
from
'vuex'
export
default
{
replace
:
true
,
name
:
'MoveInShadow'
,
props
:
{
w
:
{
type
:
Number
,
required
:
true
},
h
:
{
type
:
Number
,
required
:
true
},
x
:
{
type
:
Number
,
required
:
true
},
y
:
{
type
:
Number
,
required
:
true
},
z
:
{
type
:
Number
,
required
:
true
}
},
computed
:
{
style
()
{
// 当前默认为自适应
let
left
=
this
.
x
let
top
=
this
.
y
let
width
=
this
.
w
let
height
=
this
.
h
if
(
this
.
canvasStyleData
.
auxiliaryMatrix
)
{
left
=
Math
.
round
(
left
/
this
.
curCanvasScale
.
matrixStyleWidth
)
*
this
.
curCanvasScale
.
matrixStyleWidth
width
=
Math
.
round
(
width
/
this
.
curCanvasScale
.
matrixStyleWidth
)
*
this
.
curCanvasScale
.
matrixStyleWidth
top
=
Math
.
round
(
top
/
this
.
curCanvasScale
.
matrixStyleHeight
)
*
this
.
curCanvasScale
.
matrixStyleHeight
height
=
Math
.
round
(
height
/
this
.
curCanvasScale
.
matrixStyleHeight
)
*
this
.
curCanvasScale
.
matrixStyleHeight
}
const
style
=
{
transform
:
`translate(
${
left
}
px,
${
top
}
px) rotate(0deg)`
,
width
:
width
+
'px'
,
height
:
height
+
'px'
,
opacity
:
0.4
,
background
:
'gray'
,
position
:
'absolute'
}
// console.log('style=>' + JSON.stringify(style))
return
style
},
...
mapState
([
'curComponent'
,
'editor'
,
'curCanvasScale'
,
'canvasStyleData'
,
'linkageSettingStatus'
])
}
}
</
script
>
<
style
scoped
>
</
style
>
frontend/src/components/DeDrag/shadow.vue
浏览文件 @
26e21104
<
template
>
<
template
>
<div
style=
"z-index:
-
1"
:style=
"style"
/>
<div
style=
"z-index:1"
:style=
"style"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
26e21104
...
@@ -670,7 +670,7 @@ export default {
...
@@ -670,7 +670,7 @@ export default {
}
}
.gap_class
{
.gap_class
{
padding
:
5
px
;
padding
:
3
px
;
}
}
// 拖拽组件样式
// 拖拽组件样式
...
...
frontend/src/store/index.js
浏览文件 @
26e21104
...
@@ -58,7 +58,9 @@ const data = {
...
@@ -58,7 +58,9 @@ const data = {
// 和当前组件联动的目标组件
// 和当前组件联动的目标组件
targetLinkageInfo
:
[],
targetLinkageInfo
:
[],
// 当前仪表板联动 下钻 上卷等信息
// 当前仪表板联动 下钻 上卷等信息
nowPanelTrackInfo
:
{}
nowPanelTrackInfo
:
{},
// 拖拽的组件信息
dragComponentInfo
:
null
},
},
mutations
:
{
mutations
:
{
...
animation
.
mutations
,
...
animation
.
mutations
,
...
@@ -254,6 +256,12 @@ const data = {
...
@@ -254,6 +256,12 @@ const data = {
}
}
})
})
// state.styleChangeTimes++
// state.styleChangeTimes++
},
setDragComponentInfo
(
state
,
dragComponentInfo
)
{
state
.
dragComponentInfo
=
dragComponentInfo
},
clearDragComponentInfo
(
state
)
{
state
.
dragComponentInfo
=
null
}
}
},
},
modules
:
{
modules
:
{
...
...
frontend/src/views/panel/ViewSelect/index.vue
浏览文件 @
26e21104
...
@@ -105,11 +105,13 @@ export default {
...
@@ -105,11 +105,13 @@ export default {
})
})
},
},
handleDragStart
(
node
,
ev
)
{
handleDragStart
(
node
,
ev
)
{
this
.
$store
.
commit
(
'setDragComponentInfo'
,
node
)
ev
.
dataTransfer
.
effectAllowed
=
'copy'
ev
.
dataTransfer
.
effectAllowed
=
'copy'
const
dataTrans
=
{
const
dataTrans
=
{
type
:
'view'
,
type
:
'view'
,
id
:
node
.
data
.
id
id
:
node
.
data
.
id
}
}
ev
.
dataTransfer
.
setData
(
'componentInfo'
,
JSON
.
stringify
(
dataTrans
))
ev
.
dataTransfer
.
setData
(
'componentInfo'
,
JSON
.
stringify
(
dataTrans
))
},
},
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
26e21104
...
@@ -440,6 +440,7 @@ export default {
...
@@ -440,6 +440,7 @@ export default {
return
data
return
data
},
},
handleDrop
(
e
)
{
handleDrop
(
e
)
{
this
.
$store
.
commit
(
'clearDragComponentInfo'
)
this
.
currentDropElement
=
e
this
.
currentDropElement
=
e
e
.
preventDefault
()
e
.
preventDefault
()
e
.
stopPropagation
()
e
.
stopPropagation
()
...
@@ -509,6 +510,7 @@ export default {
...
@@ -509,6 +510,7 @@ export default {
},
},
handleDragOver
(
e
)
{
handleDragOver
(
e
)
{
console
.
log
(
'handleDragOver=>x:'
+
this
.
getPositionX
(
e
.
layerX
)
+
';y='
+
this
.
getPositionY
(
e
.
layerY
)
+
e
.
dataTransfer
.
getData
(
'componentInfo'
))
e
.
preventDefault
()
e
.
preventDefault
()
e
.
dataTransfer
.
dropEffect
=
'copy'
e
.
dataTransfer
.
dropEffect
=
'copy'
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论