4***@qq.com
4***@qq.com
  • 发布:2019-06-29 18:07
  • 更新:2019-08-06 18:10
  • 阅读:1719

#插件讨论# 【 骨架屏组件 - 324834500@qq.com 】示例程序骨架屏不消失,有没有详细点的文档,请指教大佬

分类:uni-app

这个示例程序的顺序还是错了吗?开始是页面数据,再加载骨架屏,骨架屏怎么不会消失呢?大牛具体怎么用呢?

2019-06-29 18:07 负责人:无 分享
已邀请:
3***@qq.com

3***@qq.com - 智周万物,祥云瑞气

抱歉,漏了一句

在组件里面需要加一个

v-show="show"

<template>  
<view v-show="show" :style="{width: systemInfo.width + 'px', height: systemInfo.height + 'px', backgroundColor: bgcolor, position: 'absolute', left: 0, top: 0, zIndex: 9998, overflow: 'hidden'}">  
    <view v-for="(item,rect_idx) in skeletonRectLists" :key="rect_idx + 'rect'" :class="[loading == 'chiaroscuro' ? 'chiaroscuro' : '']" :style="{width: item.width + 'px', height: item.height + 'px', backgroundColor: 'rgb(194, 207, 214)', position: 'absolute', left: item.left + 'px', top: item.top + 'px'}"></view>  
    <view v-for="(item,circle_idx) in skeletonCircleLists" :key="circle_idx + 'circle'" :class="loading == 'chiaroscuro' ? 'chiaroscuro' : ''" :style="{width: item.width + 'px', height: item.height + 'px', backgroundColor: 'rgb(194, 207, 214)', borderRadius: item.width + 'px', position: 'absolute', left: item.left + 'px', top: item.top + 'px'}"></view>  

    <view class="spinbox" v-if="loading == 'spin'">  
        <view class="spin"></view>  
    </view>  
</view>  
</template>
  • 4***@qq.com (作者)

    谢谢哦,实现方式值得学习哈

    2019-07-03 16:04

  • 4***@qq.com (作者)

    可以更新下插件市场

    2019-07-03 16:06

St23eh1i

St23eh1i - 前端工程师

加了,骨架却不显示了

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