wepy 編譯警告去除辦法

若是你用過wepy打包小程序的話,那麼你必定碰到了不少坑,(什麼也不用說,抱一下吧)
下面記錄的是本人遇到的一個小坑,小程序

編譯的時候出現了黃色警告

若是你出現了上圖這樣的話,相信你必定也知道什麼意思,就是你的xml出現了標籤不閉合的狀態,我這邊提供幾個思路
固然我也是從網上搜了一下滴 嘿嘿segmentfault

  • 場景1
// 報錯
<top><first id="123.456"></first><top>
// 閉合,就是在組件的右括號前加上/
<top><first id="123.456"></first></top>
  • 場景2
// 報錯
<input type="text" class="weui-input" placeholder="請輸入號碼">
// 閉合,就是在input的右括號前加上/
<input type="text" class="weui-input" placeholder="請輸入號碼" />
  • 場景3
// 報錯
 <image src="" mode="aspectFill">
 // 或者
<image src="" mode="aspectFill"></image>

原文地址:https://segmentfault.com/a/1190000014943477ui

相關文章
相關標籤/搜索