A Vue component for defining temporary variables in the template with type inference.
npm install vue-temp-varA Vue component for defining temporary variables in the template with type inference.
> Checkout the discussion of https://github.com/vuejs/rfcs/discussions/505
> Vue 3.3.0+ is required.
``bash`
npm install vue-temp-var
vue
v-for="i in 10"
:key="
random-${i}"
>
v-slot="{ randomNum }"
:define="{ randomNum: getRandomNumber() }"
>
"{{ randomNum }}"
is larger than 0.5
is smaller than 0.5