Моя функция никогда не останавливается после работы
Я пытался попробовать перехватить, если (), но я не
Это мой код Vue:
<template v-for="(event,index) in eventsMap[date]">
<v-menu :key="index" full-width offset-x>
<template v-slot:activator="{ on }">
Этомой код JavaScript:
<v-flex>
<template v-for="(event,index) in eventsMap[date]">
<v-menu :key="index" full-width offset-x>
<template v-slot:activator="{ on }">
<div v-ripple v-bind:style="Styles3" v-on="on">{{ findID(event.UserNo) }}</div>
</template>
<template v-for="(event,index) in eventsMap[date]">
<v-menu :key="index" full-width offset-x>
<template v-slot:activator="{ on }">
function findID(val) {
try {
var params = {
UserID: val
}
this.$http.post(auth.API_URL + 'api/Problems/User', params, {
headers: {
'Authorization': 'Bearer ' + auth.getAuthHeader()
}
}).then((response) => {
this.userList = response.body
}, (response) => {
if (response.Status === true) {
this.text1 = response.body.ResponseMessage
this.snackbar = true
} else {
this.text1 = response.statusText
this.snackbar = true
}
})
return this.userList
} catch (e) {
alert(e);
}
}
Спасибо за помощь
У меня нет сообщений об ошибках, но эта функция никогда не останавливается.