提交 ce4d20b8 authored 作者: junjie's avatar junjie

fix:代码规范

上级 09aaaede
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<div> <div>
<template v-for="item in propValue"> <template v-for="item in propValue">
<component <component
class="component"
:is="item.component" :is="item.component"
:style="item.groupStyle"
:propValue="item.propValue"
:key="item.id"
:id="'component' + item.id" :id="'component' + item.id"
:key="item.id"
class="component"
:style="item.groupStyle"
:prop-value="item.propValue"
:element="item" :element="item"
/> />
</template> </template>
...@@ -23,11 +23,11 @@ export default { ...@@ -23,11 +23,11 @@ export default {
props: { props: {
propValue: { propValue: {
type: Array, type: Array,
default: () => [], default: () => []
}, },
element: { element: {
type: Object, type: Object
}, }
}, },
created() { created() {
const parentStyle = this.element.style const parentStyle = this.element.style
...@@ -47,8 +47,8 @@ export default { ...@@ -47,8 +47,8 @@ export default {
methods: { methods: {
toPercent(val) { toPercent(val) {
return val * 100 + '%' return val * 100 + '%'
}, }
}, }
} }
</script> </script>
......
...@@ -6,14 +6,14 @@ import { deepCopy } from '@/components/canvas/utils/utils' ...@@ -6,14 +6,14 @@ import { deepCopy } from '@/components/canvas/utils/utils'
export default { export default {
state: { state: {
copyData: null, // 复制粘贴剪切 copyData: null, // 复制粘贴剪切
isCut: false, isCut: false
}, },
mutations: { mutations: {
copy(state) { copy(state) {
if (!state.curComponent) return if (!state.curComponent) return
state.copyData = { state.copyData = {
data: deepCopy(state.curComponent), data: deepCopy(state.curComponent),
index: state.curComponentIndex, index: state.curComponentIndex
} }
state.isCut = false state.isCut = false
...@@ -62,6 +62,6 @@ export default { ...@@ -62,6 +62,6 @@ export default {
store.commit('copy') store.commit('copy')
store.commit('deleteComponent') store.commit('deleteComponent')
state.isCut = true state.isCut = true
}, }
}, }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论