Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: hover:xxx -> hover-class="xxx" #19

Open
zguolee opened this issue May 2, 2023 · 0 comments
Open

Feature: hover:xxx -> hover-class="xxx" #19

zguolee opened this issue May 2, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@zguolee
Copy link
Member

zguolee commented May 2, 2023

只在小程序生效,增加 transformer-hover,小程序 hover-class 只支持字符串,不支持 {} []

<div class="hover:bg-red hover:text-xl"/> 
⬇
<div hover-class="bg-red text-xl"/> 

<div class="hover:bg-red" hover-class="text-xl"/> 
⬇
<div hover-class="text-xl bg-red"/> 

<div class="hover:bg-red" :hover-class="bool ? 'text-xl' : 'text-sm'"/>
⬇
<div :hover-class="`${bool ? 'text-xl' : 'text-sm'} bg-red`"/>

<div :class="[bool ? 'hover:bg-red' : 'hover:bg-blue']" :hover-class="bool ? 'text-xl' : 'text-sm'"/>
⬇
<div :hover-class="`${bool ? 'bg-red' : 'bg-blue'} ${bool ? 'text-xl' : 'text-sm'}`"/> 
@zguolee zguolee added the enhancement New feature or request label May 2, 2023
@zguolee zguolee changed the title Feature: hover:xxx -> hover-class="" Feature: hover:xxx -> hover-class="xxx" May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant