I have this clickable div in a component which fires a todo function when the div is clicked:
<div @click="todo()"></div>
Also, I have a global variable in the component which is called price.
I need to make the div above clickable, or the todo function firable only if the price value is greater than 100.
How can I achieve this behavior in Vue?
todo()function have access to the global variableprice? maybe try<div @click=`${price > 100 ? 'todo()' : ''}`></div>I have no experience with vue by the way....