@skeleton-elements/vue
Version:
Skeleton elements (aka UI Skeletons, Skeleton Screens, Ghost Elements) are representations of UI that will be available (loaded) soon. They are designed to improve perceived performance.
26 lines (25 loc) • 571 B
JavaScript
import { h } from 'vue';
export default {
name: 'skeleton-block',
props: {
tag: {
type: String,
"default": 'div'
},
width: [String, Number],
height: [String, Number],
effect: String
},
render: function render() {
var _class;
return h(this.tag, {
"class": (_class = {
'skeleton-block': true
}, _class["skeleton-effect-" + this.effect] = this.effect, _class),
style: {
width: this.width,
height: this.height
}
}, this.$slots["default"] && this.$slots["default"]());
}
};