edit: valeur min à 1 pour éviter array vide dans génération du contenu
This commit is contained in:
+3
-3
@@ -187,9 +187,9 @@
|
|||||||
name : 'MainContent',
|
name : 'MainContent',
|
||||||
methods:{
|
methods:{
|
||||||
divideItem(){
|
divideItem(){
|
||||||
const half = Math.floor(this.maxItemCount/2);
|
const half = Math.floor(this.maxItemCount/2)+1;
|
||||||
this.partOne = this.getRandomInt(0,half);
|
this.partOne = this.getRandomInt(1,half);
|
||||||
this.partTwo = this.getRandomInt(0,half);
|
this.partTwo = this.getRandomInt(1,half);
|
||||||
this.partThree = this.maxItemCount-this.partTwo-this.partOne;
|
this.partThree = this.maxItemCount-this.partTwo-this.partOne;
|
||||||
console.log(this.partOne,this.partTwo,this.partThree);
|
console.log(this.partOne,this.partTwo,this.partThree);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user