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. MySQL中无法修改字段名的疑问2. angular.js - angularjs的自定义过滤器如何给文字加颜色?3. docker镜像push报错4. angular.js - angular内容过长展开收起效果5. javascript - 如何让移动端网页的输入框固定在底部?6. 请教各位大佬,浏览器点 提交实例为什么没有反应7. python的前景到底有大?如果不考虑数据挖掘,机器学习这块?8. python - flask表单 如何把提交多行数据在服务端读取出来?9. 大家好,请问在python脚本中怎么用virtualenv激活指定的环境?10. 网页爬虫 - 用Python3的requests库模拟登陆Bilibili总是提示验证码错误怎么办?
