`@apply` 不能与 `.text-md` 一起使用
`@apply` cannot be used with `.text-md`
我正在使用 tailwind 实用程序和 tailwind 指令提取辅助组件,但是当我尝试将 @apply text-md 应用于组件时,出现此错误:
@apply
cannot be used with .text-md
because .text-md
either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc
.
错误情况下的代码图片
没有 .text-md 实用程序的结果错误情况下的代码图像
现在,我应该怎么做才能解决?
那是因为默认没有class .text-md
.
我正在使用 tailwind 实用程序和 tailwind 指令提取辅助组件,但是当我尝试将 @apply text-md 应用于组件时,出现此错误:
@apply
cannot be used with.text-md
because.text-md
either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc .
错误情况下的代码图片
没有 .text-md 实用程序的结果错误情况下的代码图像
现在,我应该怎么做才能解决?
那是因为默认没有class .text-md
.