vue-images-preload
v1.0.5
Published
A Vue.js project
Downloads
7
Readme
为什么使用 vue-images-preload
解决图片预加载问题!提供 加载中回调方法 与 全部加载方法方法; 方便vue调用;
安装
npm install vue-images-preload --save-dev
全局引用 (在main.js中)
import ImagesPreload from "./ImagesPreload";
Vue.component('ImagesPreload', ImagesPreload)
局部引用
import ImagesPreload from "./ImagesPreload";
export default {
name: 'app',
components: {
ImagesPreload
}
}
//template
<ImagesPreload
v-if="images.length"
:images="images"
@call_center="call_center"
@call_ready="call_ready"
></ImagesPreload>
# 安装依赖
npm install
# 本地开发热更新
npm run dev
# 构建测试页
npm run build