Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
09aaaede
提交
09aaaede
authored
6月 24, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:代码规范
上级
076a66ed
全部展开
显示空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
72 行增加
和
72 行删除
+72
-72
index.vue
frontend/src/components/RightPanel/index.vue
+3
-3
iconfont.js
frontend/src/components/canvas/assets/iconfont/iconfont.js
+0
-0
AnimationList.vue
frontend/src/components/canvas/components/AnimationList.vue
+5
-5
ContextMenu.vue
...d/src/components/canvas/components/Editor/ContextMenu.vue
+1
-1
EventList.vue
frontend/src/components/canvas/components/EventList.vue
+4
-4
Modal.vue
frontend/src/components/canvas/components/Modal.vue
+7
-7
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+0
-0
Picture.vue
frontend/src/components/canvas/custom-component/Picture.vue
+3
-3
VButton.vue
frontend/src/components/canvas/custom-component/VButton.vue
+3
-3
animation.js
frontend/src/components/canvas/store/animation.js
+2
-2
contextmenu.js
frontend/src/components/canvas/store/contextmenu.js
+3
-3
event.js
frontend/src/components/canvas/store/event.js
+2
-2
lock.js
frontend/src/components/canvas/store/lock.js
+2
-2
animationClassData.js
frontend/src/components/canvas/utils/animationClassData.js
+7
-7
decomposeComponent.js
frontend/src/components/canvas/utils/decomposeComponent.js
+1
-1
eventBus.js
frontend/src/components/canvas/utils/eventBus.js
+0
-0
events.js
frontend/src/components/canvas/utils/events.js
+6
-6
generateID.js
frontend/src/components/canvas/utils/generateID.js
+0
-0
runAnimation.js
frontend/src/components/canvas/utils/runAnimation.js
+0
-0
shortcutKey.js
frontend/src/components/canvas/utils/shortcutKey.js
+18
-18
toast.js
frontend/src/components/canvas/utils/toast.js
+1
-1
utils.js
frontend/src/components/canvas/utils/utils.js
+3
-3
demo_index.html
frontend/src/styles/deicon/demo_index.html
+0
-0
iconfont.js
frontend/src/styles/deicon/iconfont.js
+0
-0
SubjectTemplateItemback.vue
...nel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue
+1
-1
没有找到文件。
frontend/src/components/RightPanel/index.vue
浏览文件 @
09aaaede
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<div
ref=
"rightPanel"
:class=
"
{show:show}" class="rightPanel-container">
<div
ref=
"rightPanel"
:class=
"
{show:show}" class="rightPanel-container">
<div
class=
"rightPanel-background"
/>
<div
class=
"rightPanel-background"
/>
<div
class=
"rightPanel"
>
<div
class=
"rightPanel"
>
<!--
<div
class=
"handle-button"
:style=
"
{'top':buttonTop+'px','background-color':theme}" @click="show=!show">-->
<!--
<div
class=
"handle-button"
:style=
"
{'top':buttonTop+'px','background-color':theme}" @click="show=!show">-->
<!--
<i
:class=
"show?'el-icon-close':'el-icon-setting'"
/>
-->
<!--
<i
:class=
"show?'el-icon-close':'el-icon-setting'"
/>
-->
<!--
</div>
-->
<!--
</div>
-->
<div
class=
"rightPanel-items"
>
<div
class=
"rightPanel-items"
>
<slot
/>
<slot
/>
</div>
</div>
...
...
frontend/src/components/canvas/assets/iconfont/iconfont.js
浏览文件 @
09aaaede
差异被折叠。
点击展开。
frontend/src/components/canvas/components/AnimationList.vue
浏览文件 @
09aaaede
...
@@ -21,9 +21,9 @@
...
@@ -21,9 +21,9 @@
<el-tab-pane
v-for=
"item in animationClassData"
:key=
"item.label"
:label=
"item.label"
:name=
"item.label"
>
<el-tab-pane
v-for=
"item in animationClassData"
:key=
"item.label"
:label=
"item.label"
:name=
"item.label"
>
<el-scrollbar
class=
"animate-container"
>
<el-scrollbar
class=
"animate-container"
>
<div
<div
class=
"animate"
v-for=
"(animate, index) in item.children"
v-for=
"(animate, index) in item.children"
:key=
"index"
:key=
"index"
class=
"animate"
@
mouseover=
"hoverPreviewAnimate = animate.value"
@
mouseover=
"hoverPreviewAnimate = animate.value"
@
click=
"addAnimation(animate)"
@
click=
"addAnimation(animate)"
>
>
...
@@ -52,11 +52,11 @@ export default {
...
@@ -52,11 +52,11 @@ export default {
hoverPreviewAnimate
:
''
,
hoverPreviewAnimate
:
''
,
animationActiveName
:
'进入'
,
animationActiveName
:
'进入'
,
animationClassData
,
animationClassData
,
showAnimatePanel
:
false
,
showAnimatePanel
:
false
}
}
},
},
computed
:
mapState
([
computed
:
mapState
([
'curComponent'
,
'curComponent'
]),
]),
methods
:
{
methods
:
{
addAnimation
(
animate
)
{
addAnimation
(
animate
)
{
...
@@ -70,8 +70,8 @@ export default {
...
@@ -70,8 +70,8 @@ export default {
removeAnimation
(
index
)
{
removeAnimation
(
index
)
{
this
.
$store
.
commit
(
'removeAnimation'
,
index
)
this
.
$store
.
commit
(
'removeAnimation'
,
index
)
},
}
},
}
}
}
</
script
>
</
script
>
...
...
frontend/src/components/canvas/components/Editor/ContextMenu.vue
浏览文件 @
09aaaede
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
bus
.
$emit
(
'component-dialog-edit'
)
bus
.
$emit
(
'component-dialog-edit'
)
}
}
//编辑样式组件
//
编辑样式组件
if
(
this
.
curComponent
.
type
===
'v-text'
||
this
.
curComponent
.
type
===
'rect-shape'
)
{
if
(
this
.
curComponent
.
type
===
'v-text'
||
this
.
curComponent
.
type
===
'rect-shape'
)
{
bus
.
$emit
(
'component-dialog-style'
)
bus
.
$emit
(
'component-dialog-style'
)
...
...
frontend/src/components/canvas/components/EventList.vue
浏览文件 @
09aaaede
...
@@ -39,11 +39,11 @@ export default {
...
@@ -39,11 +39,11 @@ export default {
isShowEvent
:
false
,
isShowEvent
:
false
,
eventURL
:
''
,
eventURL
:
''
,
eventActiveName
:
'redirect'
,
eventActiveName
:
'redirect'
,
eventList
,
eventList
}
}
},
},
computed
:
mapState
([
computed
:
mapState
([
'curComponent'
,
'curComponent'
]),
]),
methods
:
{
methods
:
{
addEvent
(
event
,
param
)
{
addEvent
(
event
,
param
)
{
...
@@ -53,8 +53,8 @@ export default {
...
@@ -53,8 +53,8 @@ export default {
removeEvent
(
event
)
{
removeEvent
(
event
)
{
this
.
$store
.
commit
(
'removeEvent'
,
event
)
this
.
$store
.
commit
(
'removeEvent'
,
event
)
},
}
},
}
}
}
</
script
>
</
script
>
...
...
frontend/src/components/canvas/components/Modal.vue
浏览文件 @
09aaaede
<
template
>
<
template
>
<div
class=
"modal-bg"
v-if=
"show
"
@
click=
"hide"
>
<div
v-if=
"show"
class=
"modal-bg
"
@
click=
"hide"
>
<div
class=
"fadeInLeft animated modal"
@
click=
"stopPropagation"
>
<div
class=
"fadeInLeft animated modal"
@
click=
"stopPropagation"
>
<slot></slot
>
<slot
/
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -10,13 +10,13 @@
...
@@ -10,13 +10,13 @@
export
default
{
export
default
{
model
:
{
model
:
{
prop
:
'show'
,
prop
:
'show'
,
event
:
'change'
,
event
:
'change'
},
},
props
:
{
props
:
{
show
:
{
show
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
}
},
},
methods
:
{
methods
:
{
hide
()
{
hide
()
{
...
@@ -25,8 +25,8 @@ export default {
...
@@ -25,8 +25,8 @@ export default {
stopPropagation
(
e
)
{
stopPropagation
(
e
)
{
e
.
stopPropagation
()
e
.
stopPropagation
()
},
}
},
}
}
}
</
script
>
</
script
>
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
09aaaede
frontend/src/components/canvas/custom-component/Picture.vue
浏览文件 @
09aaaede
...
@@ -9,9 +9,9 @@ export default {
...
@@ -9,9 +9,9 @@ export default {
props
:
{
props
:
{
propValue
:
{
propValue
:
{
type
:
String
,
type
:
String
,
require
:
true
,
require
:
true
},
}
},
}
}
}
</
script
>
</
script
>
...
...
frontend/src/components/canvas/custom-component/VButton.vue
浏览文件 @
09aaaede
...
@@ -7,9 +7,9 @@ export default {
...
@@ -7,9 +7,9 @@ export default {
props
:
{
props
:
{
propValue
:
{
propValue
:
{
type
:
String
,
type
:
String
,
default
:
''
,
default
:
''
},
}
},
}
}
}
</
script
>
</
script
>
...
...
frontend/src/components/canvas/store/animation.js
浏览文件 @
09aaaede
...
@@ -6,6 +6,6 @@ export default {
...
@@ -6,6 +6,6 @@ export default {
removeAnimation
({
curComponent
},
index
)
{
removeAnimation
({
curComponent
},
index
)
{
curComponent
.
animations
.
splice
(
index
,
1
)
curComponent
.
animations
.
splice
(
index
,
1
)
},
}
},
}
}
}
frontend/src/components/canvas/store/contextmenu.js
浏览文件 @
09aaaede
...
@@ -2,7 +2,7 @@ export default {
...
@@ -2,7 +2,7 @@ export default {
state
:
{
state
:
{
menuTop
:
0
,
// 右击菜单数据
menuTop
:
0
,
// 右击菜单数据
menuLeft
:
0
,
menuLeft
:
0
,
menuShow
:
false
,
menuShow
:
false
},
},
mutations
:
{
mutations
:
{
showContextMenu
(
state
,
{
top
,
left
})
{
showContextMenu
(
state
,
{
top
,
left
})
{
...
@@ -13,6 +13,6 @@ export default {
...
@@ -13,6 +13,6 @@ export default {
hideContextMenu
(
state
)
{
hideContextMenu
(
state
)
{
state
.
menuShow
=
false
state
.
menuShow
=
false
},
}
},
}
}
}
frontend/src/components/canvas/store/event.js
浏览文件 @
09aaaede
...
@@ -6,6 +6,6 @@ export default {
...
@@ -6,6 +6,6 @@ export default {
removeEvent
({
curComponent
},
event
)
{
removeEvent
({
curComponent
},
event
)
{
delete
curComponent
.
events
[
event
]
delete
curComponent
.
events
[
event
]
},
}
},
}
}
}
frontend/src/components/canvas/store/lock.js
浏览文件 @
09aaaede
...
@@ -6,6 +6,6 @@ export default {
...
@@ -6,6 +6,6 @@ export default {
unlock
({
curComponent
})
{
unlock
({
curComponent
})
{
curComponent
.
isLock
=
false
curComponent
.
isLock
=
false
},
}
},
}
}
}
frontend/src/components/canvas/utils/animationClassData.js
浏览文件 @
09aaaede
...
@@ -37,8 +37,8 @@ export default [
...
@@ -37,8 +37,8 @@ export default [
{
label
:
'向右滑动展开'
,
value
:
'slideInLeft'
},
{
label
:
'向右滑动展开'
,
value
:
'slideInLeft'
},
{
label
:
'向左滑动展开'
,
value
:
'slideInRight'
},
{
label
:
'向左滑动展开'
,
value
:
'slideInRight'
},
{
label
:
'向上滑动展开'
,
value
:
'slideInUp'
},
{
label
:
'向上滑动展开'
,
value
:
'slideInUp'
},
{
label
:
'向下滑动展开'
,
value
:
'slideInDown'
},
{
label
:
'向下滑动展开'
,
value
:
'slideInDown'
}
],
]
},
},
{
{
label
:
'强调'
,
label
:
'强调'
,
...
@@ -52,8 +52,8 @@ export default [
...
@@ -52,8 +52,8 @@ export default [
{
label
:
'放大晃动缩小'
,
value
:
'tada'
},
{
label
:
'放大晃动缩小'
,
value
:
'tada'
},
{
label
:
'扇形摇摆'
,
value
:
'wobble'
},
{
label
:
'扇形摇摆'
,
value
:
'wobble'
},
{
label
:
'左右上下晃动'
,
value
:
'jello'
},
{
label
:
'左右上下晃动'
,
value
:
'jello'
},
{
label
:
'Y轴旋转'
,
value
:
'flip'
},
{
label
:
'Y轴旋转'
,
value
:
'flip'
}
],
]
},
},
{
{
label
:
'退出'
,
label
:
'退出'
,
...
@@ -88,7 +88,7 @@ export default [
...
@@ -88,7 +88,7 @@ export default [
{
label
:
'向左滑动收起'
,
value
:
'slideOutLeft'
},
{
label
:
'向左滑动收起'
,
value
:
'slideOutLeft'
},
{
label
:
'向右滑动收起'
,
value
:
'slideOutRight'
},
{
label
:
'向右滑动收起'
,
value
:
'slideOutRight'
},
{
label
:
'向上滑动收起'
,
value
:
'slideOutUp'
},
{
label
:
'向上滑动收起'
,
value
:
'slideOutUp'
},
{
label
:
'向下滑动收起'
,
value
:
'slideOutDown'
},
{
label
:
'向下滑动收起'
,
value
:
'slideOutDown'
}
],
]
},
}
]
]
frontend/src/components/canvas/utils/decomposeComponent.js
浏览文件 @
09aaaede
...
@@ -7,7 +7,7 @@ export default function decomposeComponent(component, editorRect, parentStyle) {
...
@@ -7,7 +7,7 @@ export default function decomposeComponent(component, editorRect, parentStyle) {
// 获取元素的中心点坐标
// 获取元素的中心点坐标
const
center
=
{
const
center
=
{
x
:
componentRect
.
left
-
editorRect
.
left
+
componentRect
.
width
/
2
,
x
:
componentRect
.
left
-
editorRect
.
left
+
componentRect
.
width
/
2
,
y
:
componentRect
.
top
-
editorRect
.
top
+
componentRect
.
height
/
2
,
y
:
componentRect
.
top
-
editorRect
.
top
+
componentRect
.
height
/
2
}
}
component
.
style
.
rotate
=
mod360
(
component
.
style
.
rotate
+
parentStyle
.
rotate
)
component
.
style
.
rotate
=
mod360
(
component
.
style
.
rotate
+
parentStyle
.
rotate
)
...
...
frontend/src/components/canvas/utils/eventBus.js
浏览文件 @
09aaaede
frontend/src/components/canvas/utils/events.js
浏览文件 @
09aaaede
...
@@ -10,11 +10,11 @@ const events = {
...
@@ -10,11 +10,11 @@ const events = {
if
(
msg
)
{
if
(
msg
)
{
alert
(
msg
)
alert
(
msg
)
}
}
},
}
}
}
const
mixins
=
{
const
mixins
=
{
methods
:
events
,
methods
:
events
}
}
const
eventList
=
[
const
eventList
=
[
...
@@ -22,18 +22,18 @@ const eventList = [
...
@@ -22,18 +22,18 @@ const eventList = [
key
:
'redirect'
,
key
:
'redirect'
,
label
:
'跳转事件'
,
label
:
'跳转事件'
,
event
:
events
.
redirect
,
event
:
events
.
redirect
,
param
:
''
,
param
:
''
},
},
{
{
key
:
'alert'
,
key
:
'alert'
,
label
:
'alert 事件'
,
label
:
'alert 事件'
,
event
:
events
.
alert
,
event
:
events
.
alert
,
param
:
''
,
param
:
''
},
}
]
]
export
{
export
{
mixins
,
mixins
,
events
,
events
,
eventList
,
eventList
}
}
frontend/src/components/canvas/utils/generateID.js
浏览文件 @
09aaaede
frontend/src/components/canvas/utils/runAnimation.js
浏览文件 @
09aaaede
frontend/src/components/canvas/utils/shortcutKey.js
浏览文件 @
09aaaede
import
store
from
'@/store'
import
store
from
'@/store'
import
eventBus
from
'@/components/canvas/utils/eventBus'
import
eventBus
from
'@/components/canvas/utils/eventBus'
const
ctrlKey
=
17
,
const
ctrlKey
=
17
vKey
=
86
,
// 粘贴
const
vKey
=
86
// 粘贴
cKey
=
67
,
// 复制
const
cKey
=
67
// 复制
xKey
=
88
,
// 剪切
const
xKey
=
88
// 剪切
yKey
=
89
,
// 重做
const
yKey
=
89
// 重做
zKey
=
90
,
// 撤销
const
zKey
=
90
// 撤销
gKey
=
71
,
// 组合
const
gKey
=
71
// 组合
bKey
=
66
,
// 拆分
const
bKey
=
66
// 拆分
lKey
=
76
,
// 锁定
const
lKey
=
76
// 锁定
uKey
=
85
,
// 解锁
const
uKey
=
85
// 解锁
sKey
=
83
,
// 保存
const
sKey
=
83
// 保存
pKey
=
80
,
// 预览
const
pKey
=
80
// 预览
dKey
=
68
,
// 删除
const
dKey
=
68
// 删除
deleteKey
=
46
,
// 删除
const
deleteKey
=
46
// 删除
eKey
=
69
// 清空画布
const
eKey
=
69
// 清空画布
export
const
keycodes
=
[
66
,
67
,
68
,
69
,
71
,
76
,
80
,
83
,
85
,
86
,
88
,
89
,
90
]
export
const
keycodes
=
[
66
,
67
,
68
,
69
,
71
,
76
,
80
,
83
,
85
,
86
,
88
,
89
,
90
]
...
@@ -30,13 +30,13 @@ const basemap = {
...
@@ -30,13 +30,13 @@ const basemap = {
[
zKey
]:
undo
,
[
zKey
]:
undo
,
[
sKey
]:
save
,
[
sKey
]:
save
,
[
pKey
]:
preview
,
[
pKey
]:
preview
,
[
eKey
]:
clearCanvas
,
[
eKey
]:
clearCanvas
}
}
// 组件锁定状态下可以执行的操作
// 组件锁定状态下可以执行的操作
const
lockMap
=
{
const
lockMap
=
{
...
basemap
,
...
basemap
,
[
uKey
]:
unlock
,
[
uKey
]:
unlock
}
}
// 组件未锁定状态下可以执行的操作
// 组件未锁定状态下可以执行的操作
...
@@ -48,7 +48,7 @@ const unlockMap = {
...
@@ -48,7 +48,7 @@ const unlockMap = {
[
bKey
]:
decompose
,
[
bKey
]:
decompose
,
[
dKey
]:
deleteComponent
,
[
dKey
]:
deleteComponent
,
[
deleteKey
]:
deleteComponent
,
[
deleteKey
]:
deleteComponent
,
[
lKey
]:
lock
,
[
lKey
]:
lock
}
}
let
isCtrlDown
=
false
let
isCtrlDown
=
false
...
...
frontend/src/components/canvas/utils/toast.js
浏览文件 @
09aaaede
...
@@ -4,6 +4,6 @@ export default function toast(message = '', type = 'error', duration = 1500) {
...
@@ -4,6 +4,6 @@ export default function toast(message = '', type = 'error', duration = 1500) {
Message
({
Message
({
message
,
message
,
type
,
type
,
duration
,
duration
})
})
}
}
frontend/src/components/canvas/utils/utils.js
浏览文件 @
09aaaede
export
function
deepCopy
(
target
)
{
export
function
deepCopy
(
target
)
{
if
(
typeof
target
==
'object'
)
{
if
(
typeof
target
=
==
'object'
)
{
const
result
=
Array
.
isArray
(
target
)
?
[]
:
{}
const
result
=
Array
.
isArray
(
target
)
?
[]
:
{}
for
(
const
key
in
target
)
{
for
(
const
key
in
target
)
{
if
(
typeof
target
[
key
]
==
'object'
)
{
if
(
typeof
target
[
key
]
=
==
'object'
)
{
result
[
key
]
=
deepCopy
(
target
[
key
])
result
[
key
]
=
deepCopy
(
target
[
key
])
}
else
{
}
else
{
result
[
key
]
=
target
[
key
]
result
[
key
]
=
target
[
key
]
...
...
frontend/src/styles/deicon/demo_index.html
浏览文件 @
09aaaede
frontend/src/styles/deicon/iconfont.js
浏览文件 @
09aaaede
差异被折叠。
点击展开。
frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue
浏览文件 @
09aaaede
...
@@ -80,7 +80,7 @@ export default {
...
@@ -80,7 +80,7 @@ export default {
background
:
'0% 0% / cover rgb(239, 241, 244)'
background
:
'0% 0% / cover rgb(239, 241, 244)'
}
}
if
(
this
.
subjectItemDetails
)
{
if
(
this
.
subjectItemDetails
)
{
if
(
this
.
subjectItemDetails
.
panel
.
backgroundType
===
'image'
&&
this
.
subjectItemDetails
.
panel
.
imageUrl
)
{
if
(
this
.
subjectItemDetails
.
panel
.
backgroundType
===
'image'
&&
this
.
subjectItemDetails
.
panel
.
imageUrl
)
{
style
=
{
style
=
{
width
:
'100%'
,
width
:
'100%'
,
height
:
'100%'
,
height
:
'100%'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论