Unverified 提交 b4d018bc authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #909 from dataease/dev

Dev
...@@ -1254,11 +1254,15 @@ export default { ...@@ -1254,11 +1254,15 @@ export default {
// this.recordMatrixCurStyle() // this.recordMatrixCurStyle()
setTimeout(() => { setTimeout(() => {
this.recordMatrixCurShadowStyle() this.recordMatrixCurShadowStyle()
this.hasMove && this.$store.commit('recordSnapshot', 'handleUp')
// 记录snapshot后 移动已记录设置为false
this.hasMove = false
}, 100) }, 100)
}else{
this.hasMove && this.$store.commit('recordSnapshot', 'handleUp')
// 记录snapshot后 移动已记录设置为false
this.hasMove = false
} }
this.hasMove && this.$store.commit('recordSnapshot', 'handleUp')
// 记录snapshot后 移动已记录设置为false
this.hasMove = false
removeEvent(document.documentElement, eventsFor.move, this.move) removeEvent(document.documentElement, eventsFor.move, this.move)
......
...@@ -1024,7 +1024,7 @@ export default { ...@@ -1024,7 +1024,7 @@ export default {
// 镜像索引有变化 刷新一下矩阵(撤销重做等) // 镜像索引有变化 刷新一下矩阵(撤销重做等)
snapshotIndex: { snapshotIndex: {
handler(newVal, oldVla) { handler(newVal, oldVla) {
console.log('snapshotIndexChange:' + newVal) // console.log('snapshotIndexChange:' + newVal)
this.initMatrix() this.initMatrix()
}, },
deep: true deep: true
......
...@@ -53,31 +53,31 @@ const unlockMap = { ...@@ -53,31 +53,31 @@ const unlockMap = {
let isCtrlDown = false let isCtrlDown = false
// 全局监听按键操作并执行相应命令 // 全局监听按键操作并执行相应命令
export function listenGlobalKeyDown() { // export function listenGlobalKeyDown() {
window.onkeydown = (e) => { // window.onkeydown = (e) => {
const { curComponent } = store.state // const { curComponent } = store.state
if (e.keyCode === ctrlKey) { // if (e.keyCode === ctrlKey) {
isCtrlDown = true // isCtrlDown = true
} else if (e.keyCode === deleteKey && curComponent) { // } else if (e.keyCode === deleteKey && curComponent) {
store.commit('deleteComponent') // store.commit('deleteComponent')
store.commit('recordSnapshot') // store.commit('recordSnapshot')
} else if (isCtrlDown) { // } else if (isCtrlDown) {
if (!curComponent || !curComponent.isLock) { // if (!curComponent || !curComponent.isLock) {
e.preventDefault() // e.preventDefault()
unlockMap[e.keyCode] && unlockMap[e.keyCode]() // unlockMap[e.keyCode] && unlockMap[e.keyCode]()
} else if (curComponent && curComponent.isLock) { // } else if (curComponent && curComponent.isLock) {
e.preventDefault() // e.preventDefault()
lockMap[e.keyCode] && lockMap[e.keyCode]() // lockMap[e.keyCode] && lockMap[e.keyCode]()
} // }
} // }
} // }
//
window.onkeyup = (e) => { // window.onkeyup = (e) => {
if (e.keyCode === ctrlKey) { // if (e.keyCode === ctrlKey) {
isCtrlDown = false // isCtrlDown = false
} // }
} // }
} // }
function copy() { function copy() {
store.commit('copy') store.commit('copy')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论