Closed weicheng2138 closed 2 years ago
In vue3 dynamic class, I cannot use :class="`max-h-[${variable}px]`". Tailwind did tell you not to do this. However, if I do this below
:class="`max-h-[${variable}px]`"
const getTailwindClassString = ( tailwindClassHead: string, variable: string | number ): string => { console.log(`${tailwindClassHead}-[${variable}px]`) return `${tailwindClassHead}-[${variable}px]` }
And return the value to :class="`getTailwindClassString()`". The result still cannot work.
:class="`getTailwindClassString()`"
It's not a bug due to the mechanism of tailwindcss.
In vue3 dynamic class, I cannot use
:class="`max-h-[${variable}px]`"
. Tailwind did tell you not to do this. However, if I do this belowAnd return the value to
:class="`getTailwindClassString()`"
. The result still cannot work.