Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
33468cf3
提交
33468cf3
authored
4月 01, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:增加画布鼠标悬停虚线边框
上级
eaa4cf9a
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
35 行增加
和
7 行删除
+35
-7
Shape.vue
frontend/src/components/canvas/components/Editor/Shape.vue
+35
-7
没有找到文件。
frontend/src/components/canvas/components/Editor/Shape.vue
浏览文件 @
33468cf3
<
template
>
<
template
>
<div
class=
"shape"
:class=
"
{ active }
" @click="selectCurComponent" @mousedown="handleMouseDownOnShape">
<div
class=
"shape"
:class=
"
classInfo"
@
mouseenter=
"enter"
@
mouseleave=
"leave
"
@
click=
"selectCurComponent"
@
mousedown=
"handleMouseDownOnShape"
>
<span
v-show=
"isActive()"
class=
"iconfont icon-xiangyouxuanzhuan"
@
mousedown=
"handleRotate"
/>
<span
v-show=
"isActive()"
class=
"iconfont icon-xiangyouxuanzhuan"
@
mousedown=
"handleRotate"
/>
<span
v-show=
"element.isLock"
class=
"iconfont icon-suo"
/>
<span
v-show=
"element.isLock"
class=
"iconfont icon-suo"
/>
<div
<div
...
@@ -26,6 +26,10 @@ export default {
...
@@ -26,6 +26,10 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
mouseon
:
{
type
:
Boolean
,
default
:
false
},
element
:
{
element
:
{
require
:
true
,
require
:
true
,
type
:
Object
type
:
Object
...
@@ -65,10 +69,22 @@ export default {
...
@@ -65,10 +69,22 @@ export default {
cursors
:
{}
cursors
:
{}
}
}
},
},
computed
:
mapState
([
'curComponent'
,
computed
:
{
'editor'
classInfo
()
{
]),
if
(
this
.
active
)
{
return
'active'
}
else
if
(
this
.
mouseon
)
{
return
'mouseon'
}
else
{
return
''
}
},
...
mapState
([
'curComponent'
,
'editor'
])
},
mounted
()
{
mounted
()
{
// 用于 Group 组件
// 用于 Group 组件
if
(
this
.
curComponent
)
{
if
(
this
.
curComponent
)
{
...
@@ -76,16 +92,23 @@ export default {
...
@@ -76,16 +92,23 @@ export default {
}
}
eventBus
.
$on
(
'runAnimation'
,
()
=>
{
eventBus
.
$on
(
'runAnimation'
,
()
=>
{
if
(
this
.
element
==
this
.
curComponent
)
{
if
(
this
.
element
==
=
this
.
curComponent
)
{
runAnimation
(
this
.
$el
,
this
.
curComponent
.
animations
)
runAnimation
(
this
.
$el
,
this
.
curComponent
.
animations
)
}
}
})
})
},
},
methods
:
{
methods
:
{
// 鼠标移入事件
enter
()
{
this
.
mouseon
=
true
},
// 鼠标移出事件
leave
()
{
this
.
mouseon
=
false
},
isActive
()
{
isActive
()
{
return
this
.
active
&&
!
this
.
element
.
isLock
return
this
.
active
&&
!
this
.
element
.
isLock
},
},
// 处理旋转
// 处理旋转
handleRotate
(
e
)
{
handleRotate
(
e
)
{
this
.
$store
.
commit
(
'setClickComponentStatus'
,
true
)
this
.
$store
.
commit
(
'setClickComponentStatus'
,
true
)
...
@@ -355,6 +378,11 @@ export default {
...
@@ -355,6 +378,11 @@ export default {
outline
:
1px
solid
#70c0ff
;
outline
:
1px
solid
#70c0ff
;
user-select
:
none
;
user-select
:
none
;
}
}
.mouseon
{
outline
:
1px
dashed
#70c0ff
;
user-select
:
none
;
}
.shape-point
{
.shape-point
{
position
:
absolute
;
position
:
absolute
;
background
:
#fff
;
background
:
#fff
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论