sassi-skeleton
v1.0.1
Published
vue自定义指令实现的h5骨架屏
Downloads
5
Readme
sassi-skeleton
基于 vue 自定义指令实现的 h5 骨架屏
使用方法
引入 npm 包
npm install sassi-skeleton
全局使用
// main.js
import sassiSkeleton from 'sassi-skeleton'
Vue.directive('sassi-skeleton', sassiSkeleton)
局部使用
// vue
import sassiSkeleton from 'sassi-skeleton'
export default (){
directive: {
'sassi-skeleton': sassiSkeleton
}
}
<template>
<!-- 可设置默认宽高,不设置的话继承父元素宽高 -->
<div v-sassi-skeleton data-height="50" data-width="50"></div>
</template>