zoukankan      html  css  js  c++  java
  • $refs拿到实例中的数据竟然是 undefined

    这是 uni-app 中的一个扩展组件 ,可以使用他提供的两个方法,进行打开和关闭,可以在获取 打开或关闭的方法时,竟然获取不到:

    		<uni-popup ref="popup">
    			<view class="brief-modal-content">
    				<view class="uni-h2-title">
    					<text class="brand">品牌</text>
    					<text class="anchor">嘉禾一品(温都水城)</text>
    				</view>
    				<view class="list">
    					<view class="item">
    						<text>3.1</text>
    						<text>评分</text>
    					</view>
    					<view class="item">
    						<text>90单</text>
    						<text>月售</text>
    					</view>
    					<view class="item">
    						<text>硅谷专送</text>
    						<text>约28分钟</text>
    					</view>
    					<view class="item">
    						<text>4元</text>
    						<text>配送费用</text>
    					</view>
    					<view class="item">
    						<text>1000m</text>
    						<text>距离</text>
    					</view>
    				</view>
    				<view class="affiche">
    					公告
    				</view>
    				<view class="shop-texts">
    					是以粥为特色的中式营养快餐,自2004年10月18日创立“嘉和一品”品牌至今,不断优化管理,积极创新,立足于“贴近百姓生活,服务千家万户”
    				</view>
    				<view class="iconfont icon-cheng cheng" @click="closePopup"></view>
    			</view>
    		</uni-popup>
    
    

    我也没有什么解决办法:只能看运气了

    openPopup () {
         this.$refs.popup.open && this.$refs.popup.open()
    },
    closePopup () {
         this.$refs.popup.close && this.$refs.popup.close()
    },
    
    
  • 相关阅读:
    cross apply / outer apply
    查看锁表
    常用的一些占位符
    如何将法向量转换到世界空间
    Essential Mathematics for Games and Interactive Applications
    下一本要看的书
    第五章第五节 四元数
    向量坐标转换、旋转矩阵以及视图转换
    怪诞行为学摘录
    unity3d发布apk资源打包和访问方式
  • 原文地址:https://www.cnblogs.com/ifon/p/13448413.html
Copyright © 2011-2022 走看看