You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.5 KiB
63 lines
1.5 KiB
|
6 years ago
|
<template>
|
||
|
|
<div>
|
||
|
|
<div class="tip-row">
|
||
|
|
<a href="https://quasar.dev/vue-components/skeleton" target="_blank">骨架屏,详情请见quasar</a>
|
||
|
|
</div>
|
||
|
|
<div class="tip-row">
|
||
|
|
<p>类型</p>
|
||
|
|
<q-skeleton v-for="type in skeletonTypes" :key="type" :type="type"/>
|
||
|
|
</div>
|
||
|
|
<div class="tip-row">
|
||
|
|
<p>动画</p>
|
||
|
|
<q-skeleton v-for="animation in skeletonAnimations" key="animation" :animation="animation"/>
|
||
|
|
</div>
|
||
|
|
<div class="tip-row">
|
||
|
|
<p>自定义颜色</p>
|
||
|
|
<q-skeleton class-name="bg-primary" type="circle"/>
|
||
|
|
<q-skeleton class-name="bg-info"/>
|
||
|
|
<q-skeleton class-name="bg-warning" animation="pulse-y"/>
|
||
|
|
<q-skeleton class-name="bg-error"/>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
6 years ago
|
import QSkeleton from '@/component/Skeleton'
|
||
|
|
import {skeletonAnimations, skeletonTypes} from '@/component/Skeleton/constant'
|
||
|
6 years ago
|
|
||
|
|
export default {
|
||
|
|
name: "skeletonExample",
|
||
|
|
components: {QSkeleton},
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
skeletonTypes,
|
||
|
|
skeletonAnimations
|
||
|
6 years ago
|
}
|
||
|
|
}
|
||
|
6 years ago
|
}
|
||
|
6 years ago
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
6 years ago
|
@import "~@/asset/style/variables.scss";
|
||
|
6 years ago
|
|
||
|
6 years ago
|
.q-skeleton + .q-skeleton {
|
||
|
|
margin-top: 20px;
|
||
|
|
}
|
||
|
6 years ago
|
|
||
|
6 years ago
|
.bg-primary {
|
||
|
|
background: $--color-primary;
|
||
|
|
}
|
||
|
6 years ago
|
|
||
|
6 years ago
|
.bg-info {
|
||
|
|
background-color: $--color-teal;
|
||
|
|
}
|
||
|
6 years ago
|
|
||
|
6 years ago
|
.bg-warning {
|
||
|
|
background-color: $--color-warning;
|
||
|
|
}
|
||
|
6 years ago
|
|
||
|
6 years ago
|
.bg-error {
|
||
|
|
background-color: $--color-danger;
|
||
|
|
}
|
||
|
6 years ago
|
</style>
|