写不完
写不完
  • 发布:2019-10-23 11:51
  • 更新:2021-05-07 10:09
  • 阅读:3000

uniapp获取.$refs后面的东西

分类:uni-app

请问 我在onload中打印出uniapp的一个插件console.log(that.$refs)是可以的,但是再往下的东西就是 未定义 了,怎么获取再往下的?.luPopupWrapper不行, 跪求大佬
onLoad() {
console.log("123");
// this.bottom()
this.test();
},
methods: {
test(){
var that =this;
console.log(that.$refs) //可以打印出来,但是下面有个luPopupWrapper打印就是未定义
},
//弹窗插件方法
bottom: function() {
this.width ="80%";
this.height ="60%";
this.transition = "slider";
this.type = this.type;
this.show();
},
show: function() {
this.$refs.luPopupWrapper.show();
},
close: function() {
this.$refs.luPopupWrapper.close();
},
closeCallback:function() {
console.log("关闭后回调");
},
}

2019-10-23 11:51 负责人:无 分享
已邀请:
我头没秃

我头没秃 - 1111

我在编译称字节跳动小程序得时候也是获取的到this.$refs后面的就获取不到了,请问你这个问题解决了么?

2***@qq.com

2***@qq.com - 路人家

有没有人解决此现象,我也出现过

风灯

风灯 - 有团队,接外包中。h5+,php,erlang,cocos,小程序、小游戏、付费解决uniapp,h5+问题。

this.$refs.luPopupWrapper[0]试试

5***@qq.com

5***@qq.com

同样出现过

该问题目前已经被锁定, 无法添加新回复