We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MPX 样式类名对象增强语法
简单来说就是类似这样的语法
<!-- 正常使用 --> <view wx:class="{{ {'text-red-500': true} }}"></view> <!-- 无法使用 --> <view wx:class="{{ {'text-[#c0ffee]': true} }}"></view>
如果开发者在 MPX 项目中使用以上 MPX 增强语法来实现动态切换 class name,目前插件不支持对存在特殊字符的类名进行兼容性处理,不过对使用常规字符的 class name 不存在影响。
由于 MPX 对于对象语法是采用 wxs 脚本实现的,我暂未想到合适的方法让插件对该场景下的特殊字符进行处理,目前建议通过其他方式绕过该问题,比如使用小程序原生语法来实现 class name 切换:
<!-- 正常使用 --> <view class="{{ true ? 'text-[#c0ffee]' : '' }}"></view>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
简单来说就是类似这样的语法
如果开发者在 MPX 项目中使用以上 MPX 增强语法来实现动态切换 class name,目前插件不支持对存在特殊字符的类名进行兼容性处理,不过对使用常规字符的 class name 不存在影响。
由于 MPX 对于对象语法是采用 wxs 脚本实现的,我暂未想到合适的方法让插件对该场景下的特殊字符进行处理,目前建议通过其他方式绕过该问题,比如使用小程序原生语法来实现 class name 切换:
The text was updated successfully, but these errors were encountered: