File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 44 {{ displayText }}
55 </button >
66 <transition-group name =" diff-once" class =" pos-absolute" tag =" div" @after-enter =" removeDiff()" >
7- <button v-for =" ( diff, index) in diffs" :key =" index "
7+ <button v-for =" diff in diffs" :key =" diff.id "
88 class =" btn btn-sm active fa diff-once" :class =" `btn-${buttonStyle} fa-${faValue}`" style =" cursor :default " >
9- {{diff}}
9+ {{diff.value }}
1010 </button >
1111 </transition-group >
1212 </div >
@@ -63,6 +63,7 @@ export default {
6363
6464 return {
6565 diffs: [],
66+ diffId: 0 ,
6667 buttonStyle: style .buttonStyle ,
6768 faValue: style .fa ,
6869 title: style .title
@@ -85,7 +86,8 @@ export default {
8586 value : function (newValue , oldValue ) {
8687 console .log (typeof newValue);
8788 let diff = newValue - oldValue;
88- this .diffs .push (diff);
89+ this .diffs .push ({value: diff, id: this .diffId });
90+ this .diffId ++ ;
8991 }
9092 }
9193}
You can’t perform that action at this time.
0 commit comments