济南网站建设分销商城,射洪网站建设,陕西专业网站建设哪家好,网络广告项目引入了uview,并将uview所有模块指给uniapp全局变量uni uni.$u$u 在登录页面#xff0c;或者APP.vue打印以下变量#xff1a;
this, uni, $u, vm, uni.$u, this.$u // this,$u,vm,uni#xff0c; this.$u#xff0c; uni.$u全局变量说明console.log(th… 项目引入了uview,并将uview所有模块指给uniapp全局变量uni uni.$u$u 在登录页面或者APP.vue打印以下变量
this, uni, $u, vm, uni.$u, this.$u // this,$u,vm,uni this.$u uni.$u全局变量说明console.log(this, this)console.log(uni, uni)console.log(thisuni, this uni) //falseconsole.log(this.$u , this.$u)console.log(uni.$u , uni.$u)console.log(this.$uuni.u, this.$u uni.$u) //turetry {//$u is not definedconsole.log($u , $u)} catch (e) {console.log(e)}try { //vm is not definedconsole.log(this.vm, this.vm)console.log(vm , vm)} catch (e) {console.log(e)}
运行结果
$u是uview挂载到uni上的方便使用uni来操作uview组件。
.vue页面对应就是当前vue的实例对象。