vue.js - android环境下在vue中引入vux.js 报错。

查看:823
本文介绍了vue.js - android环境下在vue中引入vux.js 报错。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

代码如下:

<template>
    <div>
        <group title="禁用内置验证及显示成功或者错误样式">
            <x-input title="禁用验证" placeholder="I'm placeholder"  placeholder-align="right"></x-input>
        </group>
    </div>
</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:null
03-24 19:31:56.204 10055-10134/com.example.weex.hackernews D/weex: callJS >>>> instanceId:1function:createInstance
03-24 19:31:56.632 10055-10134/com.example.weex.hackernews E/jsengine:  ReportException :undefined:3949: ReferenceError: window is not defined
03-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**

求解答,谢谢!

解决方案

目前 vux 并不支持在 weex 中使用。

这篇关于vue.js - android环境下在vue中引入vux.js 报错。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆