Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simon-he95/skeleton
https://github.com/simon-he95/skeleton
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/simon-he95/skeleton
- Owner: Simon-He95
- Created: 2020-04-07T12:34:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:41:18.000Z (11 months ago)
- Last Synced: 2023-12-15T15:54:14.933Z (11 months ago)
- Language: JavaScript
- Size: 278 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# skeleton-
//首页骨架屏效果 --解决白屏现象
1.安装骨架屏
指令:npm install vue-skeleton-webpack-plugin -D2.新建一个Skeleton.vue,放骨架屏的图片
3.在src下新建一个entry-skeleton.js,引入Skeleton模板
import Vue from 'vue'
import Skeleton from './Skeleton'
export default new Vue({
components:{
Skeleton
},
template:''
})4.在build下得环境引入插件 dev.conf.js
const SkeletonWebpackPlugin = require('vue-skeleton-webpack-plugin');
function resolve (dir) {
return path.join(__dirname, '..', dir)
}在plugins下增加插件内容
new SkeletonWebpackPlugin({
webpackConfig:{
entry:{
app:resolve('./src/entry-skeleton.js')
}
}
})5.通过npm run dev即可看到骨架屏效果