解决 uni-app 自定义组件在支付宝小程序中无法使用 ref 的问题
uniapp自定义组件refs微信小程序没问题,支付宝小程序不能运行
问题描述:
部分代码如下:
父组件:
<template>
<view>
<pop-ui ref="saveRef" direction="center" :is_close="false" :is_mask="true" :width="80" ></pop-ui>
</view>
</template>
import popUi from "@/components/ming-pop/ming-pop.vue"
export default {
components:{
popUi
},
data() {
return {
isLogin:false,
}
},
onLoad:async function() {
//从缓存中获取登录状态
this.isLogin = uni.getStorageSync("isLogin");
//判断是否登录
await this.judgeIsLogin(this.isLogin);
},
methods: {
//判断是否登录
judgeIsLogin(isLogin){
ret