Function inside template will fire whenever a data is changed? #11850
-
Some context:
<script>
export default {
...,
data(){
return { name: "" )
}
}
</script>
<template>
<h1>{{ Translate("Hello") }}</h1>
<input v-model="name"></input>
</template>
const Translate = (str) => {...} So I found out that |
Beta Was this translation helpful? Give feedback.
Answered by
tetezi
Sep 29, 2024
Replies: 1 comment
-
use computed |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
donaldzou
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use computed