[英]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.