primevue-mirror/components/lib/skeleton/Skeleton.vue

20 lines
568 B
Vue
Raw Normal View History

2022-09-06 12:03:37 +00:00
<template>
2024-02-11 23:48:31 +00:00
<div :class="cx('root')" :style="[sx('root'), containerStyle]" aria-hidden="true" v-bind="ptmi('root')"></div>
2022-09-06 12:03:37 +00:00
</template>
<script>
2023-05-24 10:36:51 +00:00
import BaseSkeleton from './BaseSkeleton.vue';
2023-04-24 09:43:33 +00:00
2022-09-06 12:03:37 +00:00
export default {
name: 'Skeleton',
2023-05-24 10:36:51 +00:00
extends: BaseSkeleton,
2024-02-11 23:48:31 +00:00
inheritAttrs: false,
2022-09-06 12:03:37 +00:00
computed: {
containerStyle() {
2022-09-14 11:26:01 +00:00
if (this.size) return { width: this.size, height: this.size, borderRadius: this.borderRadius };
else return { width: this.width, height: this.height, borderRadius: this.borderRadius };
2022-09-06 12:03:37 +00:00
}
}
2022-09-14 11:26:01 +00:00
};
2022-09-06 12:03:37 +00:00
</script>