climblee / uv-ui

uv-ui 破釜沉舟之兼容vue3+2、app、h5、小程序等多端基于uni-app和uView2.x的生态框架,支持单独导入,开箱即用,利剑出击。
MIT License
726 stars 34 forks source link

customClass 不起作用 #39

Closed seepine closed 9 months ago

seepine commented 9 months ago

例如以按钮为例

<uv-button custom-class="m-4">按钮</uv-button>

按钮源码中

<view
    class="uv-button-wrapper"
    :class="customClass"   // 加上此行才能生效
    :style="[btnWrapperStyle]"
    >

  ....
climblee commented 9 months ago

uvui不支持customClass属性哈,只支持customStyle属性

seepine commented 9 months ago

哦哦这样吗,我看源码公共mixin以为也支持 image

不支持这个是有什么考量吗,感觉这个也支持就非常通用好用了,否则经常就需要写<view class> xxx </view>这种多余嵌套

AKclown commented 3 months ago

意思就是不支持,在uv组件上声明class吗? 感觉这个需求挺实用的。想知道不支持customClass设计的考量是什么