range chaine #4
@ -92,11 +92,18 @@ export default {
|
||||
}
|
||||
this.$store.state.arrayresultchaines = [];
|
||||
const arraychaine = [...new Set(this.chaine.split(" "))];
|
||||
|
||||
const re = new RegExp("^[0-9]*-[0-9]*$");
|
||||
arraychaine.forEach(element => {
|
||||
if (element != "") {
|
||||
if(re.test(element)){
|
||||
var range=element.split("-")
|
||||
for (var i = range[0]; i <= range[1]; i++) {
|
||||
this.$store.dispatch('getchaine',{num:i});
|
||||
}
|
||||
}else{
|
||||
this.$store.dispatch('getchaine',{num:element});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
parsechaine() {
|
||||
|
Loading…
Reference in New Issue
Block a user