Files
aurora-admin/site/sources/skeletonpro/vue2.txt
T
aurora-admin c65a69c34e
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s
feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
2026-09-12 14:18:41 +08:00

31 lines
918 B
Plaintext

<template>
<div class="aa-skeleton" :class="{ 'is-active': active }">
<div v-if="avatar" class="aa-skeleton-row">
<div class="aa-skeleton-avatar"></div>
<div class="aa-skeleton-lines">
<div class="aa-skeleton-line" style="width:40%"></div>
<div class="aa-skeleton-line" style="width:80%"></div>
</div>
</div>
<div v-if="block" class="aa-skeleton-block"></div>
<div v-for="i in rows" :key="i" class="aa-skeleton-line" :style="{ width: lineWidth(i) }"></div>
</div>
</template>
<script>
export default {
name: 'AaSkeletonPro',
props: {
rows: { type: Number, default: 3 },
avatar: { type: Boolean, default: false },
block: { type: Boolean, default: false },
active: { type: Boolean, default: true }
},
methods: {
lineWidth: function (i) { return (i % 2 === 0 ? 100 : 70) + '%'; }
}
};
</script>
<style src="./SkeletonPro.css"></style>