Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
5145b193
提交
5145b193
authored
11月 02, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor:切换矩阵式与悬浮时建议优化
上级
16c901e6
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
6 行删除
+19
-6
index.vue
frontend/src/components/DeDrag/index.vue
+1
-1
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+12
-3
copy.js
frontend/src/components/canvas/store/copy.js
+5
-1
index.vue
frontend/src/views/panel/edit/index.vue
+1
-1
没有找到文件。
frontend/src/components/DeDrag/index.vue
浏览文件 @
5145b193
...
...
@@ -1603,7 +1603,7 @@ export default {
style
.
height
=
height
style
.
rotate
=
this
.
rotate
// this.hasMove = true
// console.log('recordMatrixCurShadowStyle:t1:' + t1 + ';mw:' + this.curCanvasScale.matrixStyleWidth + ';width:' + width
)
console
.
log
(
'recordMatrixCurShadowStyle:t1:'
+
JSON
.
stringify
(
style
)
)
this
.
$store
.
commit
(
'setShapeStyle'
,
style
)
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
5145b193
...
...
@@ -51,7 +51,7 @@
@onResizing="onResizing"
@elementMouseDown="containerMouseDown"
@amRemoveItem="removeItem(item._dragId)"
@amAddIt
me
="addItemBox(item)"
@amAddIt
em
="addItemBox(item)"
@linkJumpSet="linkJumpSet(item)"
>
<!--
<span
style=
"position:relative;left: 0px;top:0px"
>
-->
...
...
@@ -338,6 +338,7 @@ function recalcCellWidth() {
}
function
init
()
{
console
.
log
(
'init'
)
this
.
cellWidth
=
this
.
baseWidth
+
this
.
baseMarginLeft
this
.
cellHeight
=
this
.
baseHeight
+
this
.
baseMarginTop
this
.
yourList
=
this
.
getList
()
...
...
@@ -357,7 +358,6 @@ function init() {
recalcCellWidth
.
call
(
this
)
resetPositionBox
.
call
(
this
)
let
i
=
0
// console.log('initList:' + JSON.stringify(vm.yourList))
const
timeid
=
setInterval
(
function
()
{
...
...
@@ -376,6 +376,7 @@ function init() {
}
function
resizePlayer
(
item
,
newSize
)
{
// console.log('resizePlayer')
const
vm
=
this
removeItemFromPositionBox
(
item
)
...
...
@@ -424,6 +425,7 @@ function resizePlayer(item, newSize) {
* @param {any} position
*/
function
checkItemPosition
(
item
,
position
)
{
// console.log('checkItemPosition-info' + JSON.stringify(item))
position
=
position
||
{}
position
.
x
=
position
.
x
||
item
.
x
position
.
y
=
position
.
y
||
item
.
y
...
...
@@ -469,6 +471,7 @@ function checkItemPosition(item, position) {
* @param {any} position
*/
function
movePlayer
(
item
,
position
)
{
// console.log('movePlayer')
const
vm
=
this
removeItemFromPositionBox
(
item
)
...
...
@@ -483,7 +486,7 @@ function movePlayer(item, position) {
item
.
x
=
position
.
x
item
.
y
=
position
.
y
// console.log('checkItemPosition3')
checkItemPosition
.
call
(
this
,
item
,
position
)
emptyTargetCell
.
call
(
this
,
item
)
...
...
@@ -520,11 +523,13 @@ function removeItem(index) {
}
function
addItem
(
item
,
index
)
{
// console.log('addItem')
if
(
index
<
0
)
{
index
=
this
.
yourList
.
length
}
item
.
_dragId
=
index
// console.log('checkItemPosition4')
checkItemPosition
.
call
(
this
,
item
,
{
x
:
item
.
x
,
y
:
item
.
y
...
...
@@ -652,6 +657,7 @@ function changeItemCoord(item) {
* @param {any} item
*/
function
emptyTargetCell
(
item
)
{
// console.log('emptyTargetCell')
const
vm
=
this
const
belowItems
=
findBelowItems
(
item
)
...
...
@@ -708,6 +714,7 @@ function moveItemDown(item, size) {
y
:
item
.
y
+
size
}
setPlayerPosition
.
call
(
this
,
item
,
targetPosition
)
// console.log('checkItemPosition1')
checkItemPosition
.
call
(
this
,
item
,
targetPosition
)
addItemToPositionBox
.
call
(
this
,
item
)
...
...
@@ -1458,6 +1465,7 @@ export default {
infoBox
.
oldSizeY
=
item
.
sizey
},
onMouseUp
(
e
)
{
// console.log('onMouseUp')
const
vm
=
this
if
(
_
.
isEmpty
(
vm
.
infoBox
))
return
if
(
vm
.
infoBox
.
cloneItem
)
{
...
...
@@ -1626,6 +1634,7 @@ export default {
},
100
)
},
addItemBox
(
item
)
{
// console.log('addItemBox:' + JSON.stringify(item))
this
.
yourList
.
push
(
item
)
this
.
$nextTick
(
function
()
{
...
...
frontend/src/components/canvas/store/copy.js
浏览文件 @
5145b193
...
...
@@ -3,6 +3,7 @@ import toast from '@/components/canvas/utils/toast'
import
generateID
from
'@/components/canvas/utils/generateID'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
import
{
chartCopy
}
from
'@/api/chart/chart'
import
{
uuid
}
from
'vue-uuid'
export
default
{
state
:
{
...
...
@@ -46,11 +47,14 @@ export default {
if
(
data
.
type
===
'view'
)
{
chartCopy
(
data
.
propValue
.
viewId
).
then
(
res
=>
{
const
newView
=
deepCopy
(
data
)
newView
.
id
=
uuid
.
v1
()
newView
.
propValue
.
viewId
=
res
.
data
store
.
commit
(
'addComponent'
,
{
component
:
newView
})
})
}
else
{
store
.
commit
(
'addComponent'
,
{
component
:
deepCopy
(
data
)
})
const
newCop
=
deepCopy
(
data
)
newCop
.
id
=
uuid
.
v1
()
store
.
commit
(
'addComponent'
,
{
component
:
newCop
})
}
if
(
state
.
isCut
)
{
state
.
copyData
=
null
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
5145b193
...
...
@@ -813,7 +813,7 @@ export default {
}
},
canvasScroll
(
event
)
{
console
.
log
(
'testTop'
+
event
.
target
.
scrollTop
)
//
console.log('testTop' + event.target.scrollTop)
this
.
scrollLeft
=
event
.
target
.
scrollLeft
this
.
scrollTop
=
event
.
target
.
scrollTop
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论