0👍
Try passing the value as a prop: https://v3.vuejs.org/guide/component-props.html#passing-static-or-dynamic-props
If you need the prop to be reactive: https://v3.vuejs.org/guide/data-methods.html#data-properties
And please do not use var, use const (for variables that should not change reference) or let (for variables that may change references).
Source:stackexchange.com