uniapp中: <text :class="style(item)">文字</text> 解决方案:给方法加上中括号 [ ] <text :class="[style(item)]">文字</text>