问题已经解决
改为使用 :class="['message-box']"
数组形式即可
谢谢 @Distance 的提醒,但是他的方法也是不起作用,因为我的 className 写在<style>
中,不是 style 对象
问题描述
使用 weex 最新版,前端框架使用 vue
<template>
中的一部分代码:
<div :class="`message-box`">
<text class="message"> text</text>
</div>
发现上面绑定的 message-box
在 web 下没问题,但是在 native 环境,比如我使用 IOS 的 playground APP 扫描之后发现失效。
但是如果代码中不进行动态绑定:
<div class="message-box">
<text class="message"> text</text>
</div>
这个在 IOS playground 上也是可用的
在线 dotwe.org 示例:
weex 在 native 环境不支持这种形式的 class 的绑定吗?
我在文档中没有看到相关的说明,比如:https://weex.apache.org/guide...
文档哪部分有这个说明?
把message-box中划线去掉,或者改成驼峰命名。