bugfix/同名式神无法设置不同御魂

队伍赋值时使用了引用而非拷贝,导致错乱
pull/4/head
rookie4show 3 weeks ago
parent d156c6a18d
commit d50216b97e
  1. 5
      src/components/Yys.vue

@ -137,6 +137,7 @@ import {QuillEditor} from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css' //
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import shikigamiData from '../data/Shikigami.json';
import _ from 'lodash';
const dialogTableVisible = ref(false)
//
@ -218,7 +219,7 @@ const updateShikigami = (shikigami) => {
state.showSelectShikigami = false;
const oldProperties = state.groups[state.groupIndex].groupInfo[state.positionIndex].properties;
state.groups[state.groupIndex].groupInfo[state.positionIndex] = shikigami;
state.groups[state.groupIndex].groupInfo[state.positionIndex] = _.cloneDeep(shikigami);
state.groups[state.groupIndex].groupInfo[state.positionIndex].properties = oldProperties;
};
@ -237,7 +238,7 @@ const closeProperty = () => {
const updateProperty = (property) => {
state.showProperty = false;
state.currentShikigami = {};
state.groups[state.groupIndex].groupInfo[state.positionIndex].properties = property;
state.groups[state.groupIndex].groupInfo[state.positionIndex].properties = _.cloneDeep(property);
};
const removeGroupElement = (groupIndex, positionIndex) => {

Loading…
Cancel
Save