ElemeFE / page-skeleton-webpack-plugin

Webpack plugin to generate the skeleton page automatically
MIT License
2.8k stars 393 forks source link

请问,骨架图生成的元素有什么要求 #115

Open tsoil opened 5 years ago

tsoil commented 5 years ago

Description

请问,骨架图生成的元素有什么要求,因为在首页的aside没有骨架,我的首页:

<main class="main">
      <div class="container">
        <section class="home-section">
          <m-swiper :data="swiperData"></m-swiper>
          <article-list :data="articleData"></article-list>
          <el-pagination
                class="pagination"
                @current-change="handleCurrentChange"
                :current-page.sync="page.pageNO"
                :page-size="page.pageSize"
                :pager-count="page.pagerCount"
                layout="prev, pager, next, jumper"
                :total="page.totalCount">
          </el-pagination>
        </section>
         <aside class="home-aside">
           <dy-audio :data="music"></dy-audio>
           <recommend :data="popular"></recommend>
           <tag-cloud :data="tag" :colors="colors" @tagClick="clickTagItem"></tag-cloud>
           <about-website :data ="about"></about-website>
         </aside>
      </div>
    </main>

这里只有m-swiper、article-list生成骨架

Plugin configration

configureWebpack: { plugins: [ new SkeletonPlugin({ pathname: resolve('shell'), // 用来存储 shell 文件的地址 staticDir: resolve('dist'), // 最好和 output.path 相同 routes: ['/'], // 将需要生成骨架屏的路由添加到数组中 }) ] },

Versions