vue.js - android環境下在vue中引入vux.js 報錯。
問題描述
代碼如下:
<template> <p><group> <x-input placeholder='I’m placeholder' placeholder-align='right'></x-input></group> </p></template><style>@import ’~vux/dist/vux.css’;</style><script> import { XInput, Group, XButton, Cell } from ’vux/dist/vux.js’ export default { components: { XInput, Group, XButton, Cell } }</script>
編譯過后在IE顯示正常,但是在android環境下報錯如下:
**03-24 19:31:56.204 10055-10134/com.example.weex.hackernews D/weex: createInstance >>>> instanceId:1, options:{}, data:null03-24 19:31:56.204 10055-10134/com.example.weex.hackernews D/weex: callJS >>>> instanceId:1function:createInstance03-24 19:31:56.632 10055-10134/com.example.weex.hackernews E/jsengine: ReportException :undefined:3949: ReferenceError: window is not defined03-24 19:31:56.652 10055-10134/com.example.weex.hackernews E/jsengine: ReportException : ReferenceError: window is not defined at t.default.requestAnimationFrame (eval at callFunction ((weex):8676:16), <anonymous>:3949:27806) at Object.e.__esModule.default (eval at callFunction ((weex):8676:16), <anonymous>:3949:27900) at t (eval at callFunction ((weex):8676:16), <anonymous>:3943:272) at Object.t.isNumber (eval at callFunction ((weex):8676:16), <anonymous>:3948:19699) at t (eval at callFunction ((weex):8676:16), <anonymous>:3943:272) at Object.e.__esModule.default (eval at callFunction ((weex):8676:16), <anonymous>:3951:12900) at t (eval at callFunction ((weex):8676:16), <anonymous>:3943:272) at Object.eval (eval at callFunction ((weex):8676:16), <anonymous>:3949:36) at t (eval at callFunction ((weex):8676:16), <anonymous>:3943:272) at Object.eval (eval at callFunction ((weex):8676:16), <anonymous>:3943:756)03-24 19:31:56.652 10055-10134/com.example.weex.hackernews E/weex: reportJSException >>>> instanceId:1, exception function:createInstance, exception:ReferenceError: window is not defined**
求解答,謝謝!
問題解答
回答1:目前 vux 并不支持在 weex 中使用。
相關文章:
1. 使用text-shadow可以給圖片加陰影嗎?2. angular.js - angularjs如何傳遞id給另一個視圖 根據id獲取json數據?3. 數據庫無法進入4. java - HashSet<int> 為何有錯誤?5. java - StringBuffer轉成String,可以不同過tostring,而是通過+“”的方式轉換嗎?6. mysql - 記得以前在哪里看過一個估算時間的網站7. docker images顯示的鏡像過多,狗眼被亮瞎了,怎么辦?8. 請問一下各位老鳥 我一直在學習獨孤九賤 現在是在tp5 今天發現 這個系列視頻沒有實戰9. select - mysql怎么搜索一個字符串指定位置之后兩位10. python - linux怎么在每天的凌晨2點執行一次這個log.py文件
