forked from github/dataease
fix: 重做是 刷新CurComponent
This commit is contained in:
parent
4ecb283020
commit
9a8c0d1356
@ -1,7 +1,7 @@
|
||||
<!-- TODO: 这个页面后续将用 JSX 重构 -->
|
||||
<template>
|
||||
<div class="attr-list">
|
||||
<el-form label-width="80px">
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-form-item v-for="(key, index) in styleKeys.filter(item => item != 'rotate')" :key="index" :label="map[key]+':'">
|
||||
<el-color-picker v-if="key == 'borderColor'" v-model="curComponent.style[key]" />
|
||||
<el-color-picker v-else-if="key == 'color'" v-model="curComponent.style[key]" />
|
||||
|
@ -9,6 +9,7 @@ export default {
|
||||
},
|
||||
mutations: {
|
||||
undo(state) {
|
||||
store.commit('setCurComponent', { component: null, index: null })
|
||||
if (state.snapshotIndex > 0) {
|
||||
state.snapshotIndex--
|
||||
store.commit('setComponentData', deepCopy(state.snapshotData[state.snapshotIndex]))
|
||||
@ -17,6 +18,7 @@ export default {
|
||||
},
|
||||
|
||||
redo(state) {
|
||||
store.commit('setCurComponent', { component: null, index: null })
|
||||
if (state.snapshotIndex < state.snapshotData.length - 1) {
|
||||
state.snapshotIndex++
|
||||
store.commit('setComponentData', deepCopy(state.snapshotData[state.snapshotIndex]))
|
||||
|
Loading…
Reference in New Issue
Block a user