@@ -46,4 +46,4 @@ export default {
height: 100%;
}
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue
index 0642b4b894..d4bee9a54b 100644
--- a/frontend/src/components/canvas/components/Toolbar.vue
+++ b/frontend/src/components/canvas/components/Toolbar.vue
@@ -3,12 +3,12 @@
-
+
{{ $t('panel.matrix_design') }}
-
+
{{ $t('panel.canvas_self_adaption') }}
diff --git a/frontend/src/components/canvas/custom-component/Picture.vue b/frontend/src/components/canvas/custom-component/Picture.vue
index bc7cf13107..a30b20d78c 100644
--- a/frontend/src/components/canvas/custom-component/Picture.vue
+++ b/frontend/src/components/canvas/custom-component/Picture.vue
@@ -1,17 +1,17 @@
-
-
![]()
-
+
+
![]()
+
@@ -20,4 +20,4 @@ img {
width: 100%;
height: 100%;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/canvas/custom-component/VButton.vue b/frontend/src/components/canvas/custom-component/VButton.vue
index ef168ceeb8..f1c181725b 100644
--- a/frontend/src/components/canvas/custom-component/VButton.vue
+++ b/frontend/src/components/canvas/custom-component/VButton.vue
@@ -1,15 +1,15 @@
-
+
@@ -44,4 +44,4 @@ export default {
color: #3a8ee6;
}
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/canvas/store/animation.js b/frontend/src/components/canvas/store/animation.js
index 0db25da68a..2132e002a2 100644
--- a/frontend/src/components/canvas/store/animation.js
+++ b/frontend/src/components/canvas/store/animation.js
@@ -1,11 +1,11 @@
export default {
- mutations: {
- addAnimation({ curComponent }, animation) {
- curComponent.animations.push(animation)
- },
-
- removeAnimation({ curComponent }, index) {
- curComponent.animations.splice(index, 1)
- },
+ mutations: {
+ addAnimation({ curComponent }, animation) {
+ curComponent.animations.push(animation)
},
-}
\ No newline at end of file
+
+ removeAnimation({ curComponent }, index) {
+ curComponent.animations.splice(index, 1)
+ }
+ }
+}
diff --git a/frontend/src/components/canvas/store/contextmenu.js b/frontend/src/components/canvas/store/contextmenu.js
index c54729a016..9134e71b7a 100644
--- a/frontend/src/components/canvas/store/contextmenu.js
+++ b/frontend/src/components/canvas/store/contextmenu.js
@@ -1,18 +1,18 @@
export default {
- state: {
- menuTop: 0, // 右击菜单数据
- menuLeft: 0,
- menuShow: false,
+ state: {
+ menuTop: 0, // 右击菜单数据
+ menuLeft: 0,
+ menuShow: false
+ },
+ mutations: {
+ showContextMenu(state, { top, left }) {
+ state.menuShow = true
+ state.menuTop = top
+ state.menuLeft = left
},
- mutations: {
- showContextMenu(state, { top, left }) {
- state.menuShow = true
- state.menuTop = top
- state.menuLeft = left
- },
- hideContextMenu(state) {
- state.menuShow = false
- },
- },
-}
\ No newline at end of file
+ hideContextMenu(state) {
+ state.menuShow = false
+ }
+ }
+}
diff --git a/frontend/src/components/canvas/store/event.js b/frontend/src/components/canvas/store/event.js
index 4b838ac5e9..fc1e63d5e6 100644
--- a/frontend/src/components/canvas/store/event.js
+++ b/frontend/src/components/canvas/store/event.js
@@ -1,11 +1,11 @@
export default {
- mutations: {
- addEvent({ curComponent }, { event, param }) {
- curComponent.events[event] = param
- },
-
- removeEvent({ curComponent }, event) {
- delete curComponent.events[event]
- },
+ mutations: {
+ addEvent({ curComponent }, { event, param }) {
+ curComponent.events[event] = param
},
-}
\ No newline at end of file
+
+ removeEvent({ curComponent }, event) {
+ delete curComponent.events[event]
+ }
+ }
+}
diff --git a/frontend/src/components/canvas/store/lock.js b/frontend/src/components/canvas/store/lock.js
index ed0c17bac2..bfa7d7cbab 100644
--- a/frontend/src/components/canvas/store/lock.js
+++ b/frontend/src/components/canvas/store/lock.js
@@ -1,11 +1,11 @@
export default {
- mutations: {
- lock({ curComponent }) {
- curComponent.isLock = true
- },
-
- unlock({ curComponent }) {
- curComponent.isLock = false
- },
+ mutations: {
+ lock({ curComponent }) {
+ curComponent.isLock = true
},
-}
\ No newline at end of file
+
+ unlock({ curComponent }) {
+ curComponent.isLock = false
+ }
+ }
+}
diff --git a/frontend/src/components/canvas/utils/animationClassData.js b/frontend/src/components/canvas/utils/animationClassData.js
index 531303c546..5ab527b6df 100644
--- a/frontend/src/components/canvas/utils/animationClassData.js
+++ b/frontend/src/components/canvas/utils/animationClassData.js
@@ -1,94 +1,94 @@
export default [
- {
- label: '进入',
- children: [
- { label: '渐显', value: 'fadeIn' },
- { label: '向右进入', value: 'fadeInLeft' },
- { label: '向左进入', value: 'fadeInRight' },
- { label: '向上进入', value: 'fadeInUp' },
- { label: '向下进入', value: 'fadeInDown' },
- { label: '向右长距进入', value: 'fadeInLeftBig' },
- { label: '向左长距进入', value: 'fadeInRightBig' },
- { label: '向上长距进入', value: 'fadeInUpBig' },
- { label: '向下长距进入', value: 'fadeInDownBig' },
- { label: '旋转进入', value: 'rotateIn' },
- { label: '左顺时针旋转', value: 'rotateInDownLeft' },
- { label: '右逆时针旋转', value: 'rotateInDownRight' },
- { label: '左逆时针旋转', value: 'rotateInUpLeft' },
- { label: '右逆时针旋转', value: 'rotateInUpRight' },
- { label: '弹入', value: 'bounceIn' },
- { label: '向右弹入', value: 'bounceInLeft' },
- { label: '向左弹入', value: 'bounceInRight' },
- { label: '向上弹入', value: 'bounceInUp' },
- { label: '向下弹入', value: 'bounceInDown' },
- { label: '光速从右进入', value: 'lightSpeedInRight' },
- { label: '光速从左进入', value: 'lightSpeedInLeft' },
- { label: '光速从右退出', value: 'lightSpeedOutRight' },
- { label: '光速从左退出', value: 'lightSpeedOutLeft' },
- { label: 'Y轴旋转', value: 'flip' },
- { label: '中心X轴旋转', value: 'flipInX' },
- { label: '中心Y轴旋转', value: 'flipInY' },
- { label: '左长半径旋转', value: 'rollIn' },
- { label: '由小变大进入', value: 'zoomIn' },
- { label: '左变大进入', value: 'zoomInLeft' },
- { label: '右变大进入', value: 'zoomInRight' },
- { label: '向上变大进入', value: 'zoomInUp' },
- { label: '向下变大进入', value: 'zoomInDown' },
- { label: '向右滑动展开', value: 'slideInLeft' },
- { label: '向左滑动展开', value: 'slideInRight' },
- { label: '向上滑动展开', value: 'slideInUp' },
- { label: '向下滑动展开', value: 'slideInDown' },
- ],
- },
- {
- label: '强调',
- children: [
- { label: '弹跳', value: 'bounce' },
- { label: '闪烁', value: 'flash' },
- { label: '放大缩小', value: 'pulse' },
- { label: '放大缩小弹簧', value: 'rubberBand' },
- { label: '左右晃动', value: 'headShake' },
- { label: '左右扇形摇摆', value: 'swing' },
- { label: '放大晃动缩小', value: 'tada' },
- { label: '扇形摇摆', value: 'wobble' },
- { label: '左右上下晃动', value: 'jello' },
- { label: 'Y轴旋转', value: 'flip' },
- ],
- },
- {
- label: '退出',
- children: [
- { label: '渐隐', value: 'fadeOut' },
- { label: '向左退出', value: 'fadeOutLeft' },
- { label: '向右退出', value: 'fadeOutRight' },
- { label: '向上退出', value: 'fadeOutUp' },
- { label: '向下退出', value: 'fadeOutDown' },
- { label: '向左长距退出', value: 'fadeOutLeftBig' },
- { label: '向右长距退出', value: 'fadeOutRightBig' },
- { label: '向上长距退出', value: 'fadeOutUpBig' },
- { label: '向下长距退出', value: 'fadeOutDownBig' },
- { label: '旋转退出', value: 'rotateOut' },
- { label: '左顺时针旋转', value: 'rotateOutDownLeft' },
- { label: '右逆时针旋转', value: 'rotateOutDownRight' },
- { label: '左逆时针旋转', value: 'rotateOutUpLeft' },
- { label: '右逆时针旋转', value: 'rotateOutUpRight' },
- { label: '弹出', value: 'bounceOut' },
- { label: '向左弹出', value: 'bounceOutLeft' },
- { label: '向右弹出', value: 'bounceOutRight' },
- { label: '向上弹出', value: 'bounceOutUp' },
- { label: '向下弹出', value: 'bounceOutDown' },
- { label: '中心X轴旋转', value: 'flipOutX' },
- { label: '中心Y轴旋转', value: 'flipOutY' },
- { label: '左长半径旋转', value: 'rollOut' },
- { label: '由小变大退出', value: 'zoomOut' },
- { label: '左变大退出', value: 'zoomOutLeft' },
- { label: '右变大退出', value: 'zoomOutRight' },
- { label: '向上变大退出', value: 'zoomOutUp' },
- { label: '向下变大退出', value: 'zoomOutDown' },
- { label: '向左滑动收起', value: 'slideOutLeft' },
- { label: '向右滑动收起', value: 'slideOutRight' },
- { label: '向上滑动收起', value: 'slideOutUp' },
- { label: '向下滑动收起', value: 'slideOutDown' },
- ],
- },
+ {
+ label: '进入',
+ children: [
+ { label: '渐显', value: 'fadeIn' },
+ { label: '向右进入', value: 'fadeInLeft' },
+ { label: '向左进入', value: 'fadeInRight' },
+ { label: '向上进入', value: 'fadeInUp' },
+ { label: '向下进入', value: 'fadeInDown' },
+ { label: '向右长距进入', value: 'fadeInLeftBig' },
+ { label: '向左长距进入', value: 'fadeInRightBig' },
+ { label: '向上长距进入', value: 'fadeInUpBig' },
+ { label: '向下长距进入', value: 'fadeInDownBig' },
+ { label: '旋转进入', value: 'rotateIn' },
+ { label: '左顺时针旋转', value: 'rotateInDownLeft' },
+ { label: '右逆时针旋转', value: 'rotateInDownRight' },
+ { label: '左逆时针旋转', value: 'rotateInUpLeft' },
+ { label: '右逆时针旋转', value: 'rotateInUpRight' },
+ { label: '弹入', value: 'bounceIn' },
+ { label: '向右弹入', value: 'bounceInLeft' },
+ { label: '向左弹入', value: 'bounceInRight' },
+ { label: '向上弹入', value: 'bounceInUp' },
+ { label: '向下弹入', value: 'bounceInDown' },
+ { label: '光速从右进入', value: 'lightSpeedInRight' },
+ { label: '光速从左进入', value: 'lightSpeedInLeft' },
+ { label: '光速从右退出', value: 'lightSpeedOutRight' },
+ { label: '光速从左退出', value: 'lightSpeedOutLeft' },
+ { label: 'Y轴旋转', value: 'flip' },
+ { label: '中心X轴旋转', value: 'flipInX' },
+ { label: '中心Y轴旋转', value: 'flipInY' },
+ { label: '左长半径旋转', value: 'rollIn' },
+ { label: '由小变大进入', value: 'zoomIn' },
+ { label: '左变大进入', value: 'zoomInLeft' },
+ { label: '右变大进入', value: 'zoomInRight' },
+ { label: '向上变大进入', value: 'zoomInUp' },
+ { label: '向下变大进入', value: 'zoomInDown' },
+ { label: '向右滑动展开', value: 'slideInLeft' },
+ { label: '向左滑动展开', value: 'slideInRight' },
+ { label: '向上滑动展开', value: 'slideInUp' },
+ { label: '向下滑动展开', value: 'slideInDown' }
+ ]
+ },
+ {
+ label: '强调',
+ children: [
+ { label: '弹跳', value: 'bounce' },
+ { label: '闪烁', value: 'flash' },
+ { label: '放大缩小', value: 'pulse' },
+ { label: '放大缩小弹簧', value: 'rubberBand' },
+ { label: '左右晃动', value: 'headShake' },
+ { label: '左右扇形摇摆', value: 'swing' },
+ { label: '放大晃动缩小', value: 'tada' },
+ { label: '扇形摇摆', value: 'wobble' },
+ { label: '左右上下晃动', value: 'jello' },
+ { label: 'Y轴旋转', value: 'flip' }
+ ]
+ },
+ {
+ label: '退出',
+ children: [
+ { label: '渐隐', value: 'fadeOut' },
+ { label: '向左退出', value: 'fadeOutLeft' },
+ { label: '向右退出', value: 'fadeOutRight' },
+ { label: '向上退出', value: 'fadeOutUp' },
+ { label: '向下退出', value: 'fadeOutDown' },
+ { label: '向左长距退出', value: 'fadeOutLeftBig' },
+ { label: '向右长距退出', value: 'fadeOutRightBig' },
+ { label: '向上长距退出', value: 'fadeOutUpBig' },
+ { label: '向下长距退出', value: 'fadeOutDownBig' },
+ { label: '旋转退出', value: 'rotateOut' },
+ { label: '左顺时针旋转', value: 'rotateOutDownLeft' },
+ { label: '右逆时针旋转', value: 'rotateOutDownRight' },
+ { label: '左逆时针旋转', value: 'rotateOutUpLeft' },
+ { label: '右逆时针旋转', value: 'rotateOutUpRight' },
+ { label: '弹出', value: 'bounceOut' },
+ { label: '向左弹出', value: 'bounceOutLeft' },
+ { label: '向右弹出', value: 'bounceOutRight' },
+ { label: '向上弹出', value: 'bounceOutUp' },
+ { label: '向下弹出', value: 'bounceOutDown' },
+ { label: '中心X轴旋转', value: 'flipOutX' },
+ { label: '中心Y轴旋转', value: 'flipOutY' },
+ { label: '左长半径旋转', value: 'rollOut' },
+ { label: '由小变大退出', value: 'zoomOut' },
+ { label: '左变大退出', value: 'zoomOutLeft' },
+ { label: '右变大退出', value: 'zoomOutRight' },
+ { label: '向上变大退出', value: 'zoomOutUp' },
+ { label: '向下变大退出', value: 'zoomOutDown' },
+ { label: '向左滑动收起', value: 'slideOutLeft' },
+ { label: '向右滑动收起', value: 'slideOutRight' },
+ { label: '向上滑动收起', value: 'slideOutUp' },
+ { label: '向下滑动收起', value: 'slideOutDown' }
+ ]
+ }
]
diff --git a/frontend/src/components/canvas/utils/decomposeComponent.js b/frontend/src/components/canvas/utils/decomposeComponent.js
index e3105b14cc..9bc060997e 100644
--- a/frontend/src/components/canvas/utils/decomposeComponent.js
+++ b/frontend/src/components/canvas/utils/decomposeComponent.js
@@ -3,18 +3,18 @@ import { mod360 } from './translate'
// 将组合中的各个子组件拆分出来,并计算它们新的 style
export default function decomposeComponent(component, editorRect, parentStyle) {
- const componentRect = $(`#component${component.id}`).getBoundingClientRect()
- // 获取元素的中心点坐标
- const center = {
- x: componentRect.left - editorRect.left + componentRect.width / 2,
- y: componentRect.top - editorRect.top + componentRect.height / 2,
- }
+ const componentRect = $(`#component${component.id}`).getBoundingClientRect()
+ // 获取元素的中心点坐标
+ const center = {
+ x: componentRect.left - editorRect.left + componentRect.width / 2,
+ y: componentRect.top - editorRect.top + componentRect.height / 2
+ }
- component.style.rotate = mod360(component.style.rotate + parentStyle.rotate)
- component.style.width = parseFloat(component.groupStyle.width) / 100 * parentStyle.width
- component.style.height = parseFloat(component.groupStyle.height) / 100 * parentStyle.height
- // 计算出元素新的 top left 坐标
- component.style.left = center.x - component.style.width / 2
- component.style.top = center.y - component.style.height / 2
- component.groupStyle = {}
-}
\ No newline at end of file
+ component.style.rotate = mod360(component.style.rotate + parentStyle.rotate)
+ component.style.width = parseFloat(component.groupStyle.width) / 100 * parentStyle.width
+ component.style.height = parseFloat(component.groupStyle.height) / 100 * parentStyle.height
+ // 计算出元素新的 top left 坐标
+ component.style.left = center.x - component.style.width / 2
+ component.style.top = center.y - component.style.height / 2
+ component.groupStyle = {}
+}
diff --git a/frontend/src/components/canvas/utils/eventBus.js b/frontend/src/components/canvas/utils/eventBus.js
index 58ac2c9e94..badb6db3fb 100644
--- a/frontend/src/components/canvas/utils/eventBus.js
+++ b/frontend/src/components/canvas/utils/eventBus.js
@@ -1,3 +1,3 @@
import Vue from 'vue'
// 用于监听、触发事件
-export default new Vue()
\ No newline at end of file
+export default new Vue()
diff --git a/frontend/src/components/canvas/utils/events.js b/frontend/src/components/canvas/utils/events.js
index 88cc427323..d5fa56b820 100644
--- a/frontend/src/components/canvas/utils/events.js
+++ b/frontend/src/components/canvas/utils/events.js
@@ -1,39 +1,39 @@
// 编辑器自定义事件
const events = {
- redirect(url) {
- if (url) {
- window.location.href = url
- }
- },
+ redirect(url) {
+ if (url) {
+ window.location.href = url
+ }
+ },
- alert(msg) {
- if (msg) {
- alert(msg)
- }
- },
+ alert(msg) {
+ if (msg) {
+ alert(msg)
+ }
+ }
}
const mixins = {
- methods: events,
+ methods: events
}
const eventList = [
- {
- key: 'redirect',
- label: '跳转事件',
- event: events.redirect,
- param: '',
- },
- {
- key: 'alert',
- label: 'alert 事件',
- event: events.alert,
- param: '',
- },
+ {
+ key: 'redirect',
+ label: '跳转事件',
+ event: events.redirect,
+ param: ''
+ },
+ {
+ key: 'alert',
+ label: 'alert 事件',
+ event: events.alert,
+ param: ''
+ }
]
export {
- mixins,
- events,
- eventList,
-}
\ No newline at end of file
+ mixins,
+ events,
+ eventList
+}
diff --git a/frontend/src/components/canvas/utils/generateID.js b/frontend/src/components/canvas/utils/generateID.js
index 5dce36e3bc..d057f91b16 100644
--- a/frontend/src/components/canvas/utils/generateID.js
+++ b/frontend/src/components/canvas/utils/generateID.js
@@ -1,5 +1,5 @@
let id = 0
// 主要用于 Vue 的 diff 算法,为每个元素创建一个独一无二的 ID
export default function generateID() {
- return id++
-}
\ No newline at end of file
+ return id++
+}
diff --git a/frontend/src/components/canvas/utils/runAnimation.js b/frontend/src/components/canvas/utils/runAnimation.js
index b1e63ecf26..3601bdb53a 100644
--- a/frontend/src/components/canvas/utils/runAnimation.js
+++ b/frontend/src/components/canvas/utils/runAnimation.js
@@ -1,18 +1,18 @@
export default async function runAnimation($el, animations = []) {
- const play = (animation) => new Promise(resolve => {
- $el.classList.add(animation.value, 'animated')
- const removeAnimation = () => {
- $el.removeEventListener('animationend', removeAnimation)
- $el.removeEventListener('animationcancel', removeAnimation)
- $el.classList.remove(animation.value, 'animated')
- resolve()
- }
-
- $el.addEventListener('animationend', removeAnimation)
- $el.addEventListener('animationcancel', removeAnimation)
- })
-
- for (let i = 0, len = animations.length; i < len; i++) {
- await play(animations[i])
+ const play = (animation) => new Promise(resolve => {
+ $el.classList.add(animation.value, 'animated')
+ const removeAnimation = () => {
+ $el.removeEventListener('animationend', removeAnimation)
+ $el.removeEventListener('animationcancel', removeAnimation)
+ $el.classList.remove(animation.value, 'animated')
+ resolve()
}
+
+ $el.addEventListener('animationend', removeAnimation)
+ $el.addEventListener('animationcancel', removeAnimation)
+ })
+
+ for (let i = 0, len = animations.length; i < len; i++) {
+ await play(animations[i])
+ }
}
diff --git a/frontend/src/components/canvas/utils/shortcutKey.js b/frontend/src/components/canvas/utils/shortcutKey.js
index 0e445ccc64..0952a555ff 100644
--- a/frontend/src/components/canvas/utils/shortcutKey.js
+++ b/frontend/src/components/canvas/utils/shortcutKey.js
@@ -1,143 +1,143 @@
import store from '@/store'
import eventBus from '@/components/canvas/utils/eventBus'
-const ctrlKey = 17,
- vKey = 86, // 粘贴
- cKey = 67, // 复制
- xKey = 88, // 剪切
+const ctrlKey = 17
+const vKey = 86 // 粘贴
+const cKey = 67 // 复制
+const xKey = 88 // 剪切
- yKey = 89, // 重做
- zKey = 90, // 撤销
+const yKey = 89 // 重做
+const zKey = 90 // 撤销
- gKey = 71, // 组合
- bKey = 66, // 拆分
+const gKey = 71 // 组合
+const bKey = 66 // 拆分
- lKey = 76, // 锁定
- uKey = 85, // 解锁
+const lKey = 76 // 锁定
+const uKey = 85 // 解锁
- sKey = 83, // 保存
- pKey = 80, // 预览
- dKey = 68, // 删除
- deleteKey = 46, // 删除
- eKey = 69 // 清空画布
+const sKey = 83 // 保存
+const pKey = 80 // 预览
+const dKey = 68 // 删除
+const deleteKey = 46 // 删除
+const eKey = 69 // 清空画布
export const keycodes = [66, 67, 68, 69, 71, 76, 80, 83, 85, 86, 88, 89, 90]
// 与组件状态无关的操作
const basemap = {
- [vKey]: paste,
- [yKey]: redo,
- [zKey]: undo,
- [sKey]: save,
- [pKey]: preview,
- [eKey]: clearCanvas,
+ [vKey]: paste,
+ [yKey]: redo,
+ [zKey]: undo,
+ [sKey]: save,
+ [pKey]: preview,
+ [eKey]: clearCanvas
}
// 组件锁定状态下可以执行的操作
const lockMap = {
- ...basemap,
- [uKey]: unlock,
+ ...basemap,
+ [uKey]: unlock
}
// 组件未锁定状态下可以执行的操作
const unlockMap = {
- ...basemap,
- [cKey]: copy,
- [xKey]: cut,
- [gKey]: compose,
- [bKey]: decompose,
- [dKey]: deleteComponent,
- [deleteKey]: deleteComponent,
- [lKey]: lock,
+ ...basemap,
+ [cKey]: copy,
+ [xKey]: cut,
+ [gKey]: compose,
+ [bKey]: decompose,
+ [dKey]: deleteComponent,
+ [deleteKey]: deleteComponent,
+ [lKey]: lock
}
let isCtrlDown = false
// 全局监听按键操作并执行相应命令
export function listenGlobalKeyDown() {
- window.onkeydown = (e) => {
- const { curComponent } = store.state
- if (e.keyCode == ctrlKey) {
- isCtrlDown = true
- } else if (e.keyCode == deleteKey && curComponent) {
- store.commit('deleteComponent')
- store.commit('recordSnapshot')
- } else if (isCtrlDown) {
- if (!curComponent || !curComponent.isLock) {
- e.preventDefault()
- unlockMap[e.keyCode] && unlockMap[e.keyCode]()
- } else if (curComponent && curComponent.isLock) {
- e.preventDefault()
- lockMap[e.keyCode] && lockMap[e.keyCode]()
- }
- }
+ window.onkeydown = (e) => {
+ const { curComponent } = store.state
+ if (e.keyCode == ctrlKey) {
+ isCtrlDown = true
+ } else if (e.keyCode == deleteKey && curComponent) {
+ store.commit('deleteComponent')
+ store.commit('recordSnapshot')
+ } else if (isCtrlDown) {
+ if (!curComponent || !curComponent.isLock) {
+ e.preventDefault()
+ unlockMap[e.keyCode] && unlockMap[e.keyCode]()
+ } else if (curComponent && curComponent.isLock) {
+ e.preventDefault()
+ lockMap[e.keyCode] && lockMap[e.keyCode]()
+ }
}
+ }
- window.onkeyup = (e) => {
- if (e.keyCode == ctrlKey) {
- isCtrlDown = false
- }
+ window.onkeyup = (e) => {
+ if (e.keyCode == ctrlKey) {
+ isCtrlDown = false
}
+ }
}
function copy() {
- store.commit('copy')
+ store.commit('copy')
}
function paste() {
- store.commit('paste')
- store.commit('recordSnapshot')
+ store.commit('paste')
+ store.commit('recordSnapshot')
}
function cut() {
- store.commit('cut')
+ store.commit('cut')
}
function redo() {
- store.commit('redo')
+ store.commit('redo')
}
function undo() {
- store.commit('undo')
+ store.commit('undo')
}
function compose() {
- if (store.state.areaData.components.length) {
- store.commit('compose')
- store.commit('recordSnapshot')
- }
+ if (store.state.areaData.components.length) {
+ store.commit('compose')
+ store.commit('recordSnapshot')
+ }
}
function decompose() {
- const curComponent = store.state.curComponent
- if (curComponent && !curComponent.isLock && curComponent.component == 'Group') {
- store.commit('decompose')
- store.commit('recordSnapshot')
- }
+ const curComponent = store.state.curComponent
+ if (curComponent && !curComponent.isLock && curComponent.component == 'Group') {
+ store.commit('decompose')
+ store.commit('recordSnapshot')
+ }
}
function save() {
- eventBus.$emit('save')
+ eventBus.$emit('save')
}
function preview() {
- eventBus.$emit('preview')
+ eventBus.$emit('preview')
}
function deleteComponent() {
- if (store.state.curComponent) {
- store.commit('deleteComponent')
- store.commit('recordSnapshot')
- }
+ if (store.state.curComponent) {
+ store.commit('deleteComponent')
+ store.commit('recordSnapshot')
+ }
}
function clearCanvas() {
- eventBus.$emit('clearCanvas')
+ eventBus.$emit('clearCanvas')
}
function lock() {
- store.commit('lock')
+ store.commit('lock')
}
function unlock() {
- store.commit('unlock')
+ store.commit('unlock')
}
diff --git a/frontend/src/components/canvas/utils/toast.js b/frontend/src/components/canvas/utils/toast.js
index fad84177b7..859e53e6f5 100644
--- a/frontend/src/components/canvas/utils/toast.js
+++ b/frontend/src/components/canvas/utils/toast.js
@@ -1,9 +1,9 @@
import { Message } from 'element-ui'
export default function toast(message = '', type = 'error', duration = 1500) {
- Message({
- message,
- type,
- duration,
- })
-}
\ No newline at end of file
+ Message({
+ message,
+ type,
+ duration
+ })
+}
diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js
index 4900a4b28c..cdce9342c3 100644
--- a/frontend/src/components/canvas/utils/utils.js
+++ b/frontend/src/components/canvas/utils/utils.js
@@ -1,26 +1,26 @@
export function deepCopy(target) {
- if (typeof target == 'object') {
- const result = Array.isArray(target)? [] : {}
- for (const key in target) {
- if (typeof target[key] == 'object') {
- result[key] = deepCopy(target[key])
- } else {
- result[key] = target[key]
- }
- }
-
- return result
+ if (typeof target === 'object') {
+ const result = Array.isArray(target) ? [] : {}
+ for (const key in target) {
+ if (typeof target[key] === 'object') {
+ result[key] = deepCopy(target[key])
+ } else {
+ result[key] = target[key]
+ }
}
-
- return target
+
+ return result
+ }
+
+ return target
}
export function swap(arr, i, j) {
- const temp = arr[i]
- arr[i] = arr[j]
- arr[j] = temp
+ const temp = arr[i]
+ arr[i] = arr[j]
+ arr[j] = temp
}
export function $(selector) {
- return document.querySelector(selector)
-}
\ No newline at end of file
+ return document.querySelector(selector)
+}
diff --git a/frontend/src/styles/deicon/demo_index.html b/frontend/src/styles/deicon/demo_index.html
index 0185d772da..229efa567a 100644
--- a/frontend/src/styles/deicon/demo_index.html
+++ b/frontend/src/styles/deicon/demo_index.html
@@ -38,7 +38,7 @@
@@ -46,122 +46,122 @@
- Font class
- Symbol
-
+
查看项目
-
+
-
+
-
矩形

-
+
-
text

-
+
-
picture

-
+
-
输入

-
+
-
树

-
+
-
查询搜索

-
+
-
季度

-
+
-
数字顺序

-
+
-
树列表

-
+
-
日期

-
+
-
左侧-区间

-
+
-
列表

-
+
-
下拉框

-
+
-
下拉树

-
+
-
重置

-
+
-
日

-
+
-
年

-
+
-
月

-
+
Unicode 引用
@@ -207,7 +207,7 @@
-
+
-
@@ -216,7 +216,7 @@
.icon-juxing
-
+
-
@@ -225,7 +225,7 @@
.icon-text
-
+
-
@@ -234,7 +234,7 @@
.icon-picture
-
+
-
@@ -243,7 +243,7 @@
.icon-shuru
-
+
-
@@ -252,7 +252,7 @@
.icon-tree
-
+
-
@@ -261,7 +261,7 @@
.icon-chaxunsousuo
-
+
-
@@ -270,7 +270,7 @@
.icon-jidu
-
+
-
@@ -279,7 +279,7 @@
.icon-shuzishunxu
-
+
-
@@ -288,7 +288,7 @@
.icon-Group-
-
+
-
@@ -297,7 +297,7 @@
.icon-riqi
-
+
-
@@ -306,7 +306,7 @@
.icon-zuoce-qujian
-
+
-
@@ -315,7 +315,7 @@
.icon-liebiao
-
+
-
@@ -324,7 +324,7 @@
.icon-xialakuang
-
+
-
@@ -333,7 +333,7 @@
.icon-xialashu
-
+
-
@@ -342,7 +342,7 @@
.icon-zhongzhi
-
+
-
@@ -351,7 +351,7 @@
.icon-ri
-
+
-
@@ -360,7 +360,7 @@
.icon-nian
-
+
-
@@ -369,7 +369,7 @@
.icon-yue
-
+
font-class 引用
@@ -396,7 +396,7 @@
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
Symbol 引用
diff --git a/frontend/src/styles/deicon/iconfont.js b/frontend/src/styles/deicon/iconfont.js
index c5ccd4d7c0..515bb2ce73 100644
--- a/frontend/src/styles/deicon/iconfont.js
+++ b/frontend/src/styles/deicon/iconfont.js
@@ -1 +1 @@
-!function(c){var h,a,l,v,t,o,i='
',e=(e=document.getElementsByTagName("script"))[e.length-1].getAttribute("data-injectcss");if(e&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function z(){t||(t=!0,l())}h=function(){var c,h,a;(a=document.createElement("div")).innerHTML=i,i=null,(h=a.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",c=h,(a=document.body).firstChild?(h=a.firstChild).parentNode.insertBefore(c,h):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),h()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(l=h,v=c.document,t=!1,(o=function(){try{v.documentElement.doScroll("left")}catch(c){return void setTimeout(o,50)}z()})(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,z())})}(window);
\ No newline at end of file
+!(function(c) { var h; var a; var l; var v; var t; var o; var i = '
'; var e = (e = document.getElementsByTagName('script'))[e.length - 1].getAttribute('data-injectcss'); if (e && !c.__iconfont__svg__cssinject__) { c.__iconfont__svg__cssinject__ = !0; try { document.write('') } catch (c) { console && console.log(c) } } function z() { t || (t = !0, l()) }h = function() { var c, h, a; (a = document.createElement('div')).innerHTML = i, i = null, (h = a.getElementsByTagName('svg')[0]) && (h.setAttribute('aria-hidden', 'true'), h.style.position = 'absolute', h.style.width = 0, h.style.height = 0, h.style.overflow = 'hidden', c = h, (a = document.body).firstChild ? (h = a.firstChild).parentNode.insertBefore(c, h) : a.appendChild(c)) }, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(h, 0) : (a = function() { document.removeEventListener('DOMContentLoaded', a, !1), h() }, document.addEventListener('DOMContentLoaded', a, !1)) : document.attachEvent && (l = h, v = c.document, t = !1, (o = function() { try { v.documentElement.doScroll('left') } catch (c) { return void setTimeout(o, 50) }z() })(), v.onreadystatechange = function() { v.readyState == 'complete' && (v.onreadystatechange = null, z()) }) }(window))
diff --git a/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue b/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue
index eb6d94f9cd..2310a7163c 100644
--- a/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue
+++ b/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue
@@ -80,7 +80,7 @@ export default {
background: '0% 0% / cover rgb(239, 241, 244)'
}
if (this.subjectItemDetails) {
- if (this.subjectItemDetails.panel.backgroundType === 'image'&&this.subjectItemDetails.panel.imageUrl) {
+ if (this.subjectItemDetails.panel.backgroundType === 'image' && this.subjectItemDetails.panel.imageUrl) {
style = {
width: '100%',
height: '100%',