Skip to content

Commit

Permalink
fix: clean up for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Paloma-Sanchez committed Dec 30, 2024
1 parent 89910e1 commit 04f899c
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions src/components/base/BaseSubsection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,17 @@ export default {
emits: ["update"],

computed: {
myVal: {
get() {
if (Object.keys(this.modelValue).length > 0) {
// console.log(
// "hi",
// this.items.map((_, index) => Object.values(this.modelValue)[index])
// );
return this.items.map((_, index) => Object.values(this.modelValue)[index]);
}

return this.items.map(() => "");
},
myVal() {
if (Object.keys(this.modelValue).length > 0) {
return this.items.map((_, index) => Object.values(this.modelValue)[index]);
}

set(nextValue: any[]) {
// console.log('nextValue', nextValue)
const updatedModel = { ...this.modelValue };
nextValue.forEach((value, index) => {
updatedModel[index] = value;
});
},
return this.items.map(() => "");
},

isRestoreDisabled() {
const result = this.items.every((item) => {
// console.log("item", item);
return item.disabled === true;
});

Expand All @@ -150,9 +137,8 @@ export default {
const keys = Object.keys(this.modelValue);

if (element === 0 || element === 1) {
console.log(this.modelValue);
console.log("modelValue", this.modelValue);

// the
const key1 = keys[index];

const key2 = Object.keys(this.modelValue[key1])[element];
Expand Down

0 comments on commit 04f899c

Please sign in to comment.