简体   繁体   English

jQuery 需要一个 window 和 vue native 中的文档

[英]jQuery requires a window with a document in vue native

i ran the npm install jquery --save command to install jquery in my vue native project but i still getting this error jQuery requires a window with a document i ran the npm install jquery --save command to install jquery in my vue native project but i still getting this error jQuery requires a window with a document

in my template:在我的模板中:

   <view >  
        <touchable-opacity class="button" :on-press="test">
          <text class="loginText">login</text>
        </touchable-opacity>
      </view>

in my script:在我的脚本中:

import $ from 'jquery'

Vue.use(Vuex);


export default {
  data:()=>({
     loginObj: {
      memberCode: '',
      password: '',
    }
  }),
  methods: {
    test(){
        $(".button").css("display", "none");
    },

yeah,Vue Native is a wrapper around the React Native APIs.是的,Vue Native 是 React Native API 的包装器。 JQuery heavily relies on HTML DOM where vue-native and react-native have their own DOM-like native view.they are differently.And you can use JQuery in a vue web project,not a vue-native app project. JQuery heavily relies on HTML DOM where vue-native and react-native have their own DOM-like native view.they are differently.And you can use JQuery in a vue web project,not a vue-native app project.

refer to vue-native and link参考vue-native链接

thanks.谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:jQuery 需要一个带有文档的窗口 - Error: jQuery requires a window with a document Browserify with jQuery> = 2产生“jQuery需要一个带文档的窗口” - Browserify with jQuery >= 2 produces “jQuery requires a window with a document” 如何解决“jQuery需要一个带文档的窗口”错误? - How to solve “jQuery requires a window with a document” error? “ jQuery需要带有文档的窗口” Webpack 2错误 - “jQuery requires a window with a document” webpack 2 error 错误:“ jQuery需要带有文档的窗口”以及Mocha和Typescript? - Error: “jQuery requires a window with a document” with mocha and typescript? 操作 jQuery 得到一个错误:“jQuery 需要一个窗口和一个文档” - Manipulating jQuery to get an error: "jQuery requires a window and a document" 带有Jquery集成的Nightwatch失败,并显示以下错误:jQuery需要带有文档的窗口 - Nightwatch with Jquery integration fails with the error jQuery requires a window with a document Webpack添加jQuery插件:错误:jQuery需要带有文档的窗口 - Webpack adding jQuery plugin: Error: jQuery requires a window with a document 错误:jQuery需要一个window带证件。 使用ejs和javascript创建刽子手web app - Error : jQuery requires a window with a document. Using ejs and javascript to create a hangman web app 窗口和文档作为jQuery选择器 - Window and document as jQuery selectors
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM