tvfe/txv-miniprogram-plugin

关于设置宽度报错的问题

Closed this issue · 1 comments

这样设置为什么会报错?

<txv-video 
      wx:if="{{video.vid}}" 
      width="{{100%}}"
      height="{{'auto'}}"
      vid="{{video.vid}}" 
      playerid="{{video.vid}}" 
      autoplay="{{true}}">
 </txv-video>

[ WXML 文件编译错误] ./pages/videodetail/index.wxml
Bad attr width with message
24 | <txv-video
25 | wx:if="{{video.vid}}"

26 | width="{{100%}}"
| ^
27 | height="{{'auto'}}"
28 | vid="{{video.vid}}"
29 | playerid="{{video.vid}}"
at files://miniprogram/pages/videodetail/index.wxml#26(env: macOS,mp,1.05.2105242; lib: 2.14.1)

bitbw commented

width="100%" 试试