<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
const Counter = {
data() {
return {
it: "",
items: ["привет", "Найдено", "Границы поля", "Игра"]
}
},
methods: {
reverseMessage() {
let i = 0;
let fg = this.items;
if(fg[i]){
this.it += this.items[i];
console.log(i);
i++;
}
setTimeout( this.reverseMessage, 1000);
},
reverseDfs() {
setTimeout( this.reverseMessage, 1000);
}
}
}
Vue.createApp(Counter).mount('#spn');
const Counter = {
data() {
return {
item :"",
items: ["привет", "Найдено", "Границы поля", "Игра"],
i : 0
}
},
methods: {
reverseMessage() {
let words = this.items;
let j;
if( words[j]) {
j++;
this.item +=words[this.j];
console.log(j);
}
setTimeout( this.reverseMessage, 1000);
},
dsg() {
setTimeout( this.reverseMessage, 1000);
}
}
}
Vue.createApp(Counter).mount('#spn')