zsmjhtn opened a new issue #3136: [Android] Unexpected behavior in <richtext> 
Style where weex version is 0.28
URL: https://github.com/apache/incubator-weex/issues/3136
 
 
   phenomenon: 
   The code is work:
   ```javascript
    <richtext>
           <span style="font-size:42;color:#FF5400;">TAOBAO</span>
    </richtext>
   ```
   But the code is in vain:
   ```javascript
    <richtext>
           <span :style="{'font-size':42, color:'#FF5400'}">TAOBAO</span>
    </richtext>
   ```
   If I change to this, it works as well:
   ```javascript
    <richtext>
           <span :style="{'fontSize':42, color:'#FF5400'}">TAOBAO</span>
    </richtext>
   ```
   
   Have found the reason, the **BasicComponentData** of <richtext> is very 
different to <text>:
   ```javascript
    <richtext>:
          BasicComponentData--
                        -WXAttr:  value : ["span":xxxxx, 
style:['font-size':42,xxxx...]xxxxxx ....
                        -WXStyle:null
   <text>:
          BasicComponentData--
                        -WXAttr: null 
                        -WXStyle: fontSize:42, xxxxxxx
   
   ```
   In the end of logic, the code compareWith "fontSize".
   the  way of  Style-Format "font-size" in <richtext> compared failure. Only 
"fontSize" can works.
   And two ways of Style-Format in other Components are all right.
   But I have not get good idea to fix it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to