更新:课程首页增加骨架屏
This commit is contained in:
33
components/Skeleton/templates/Menu.vue
Normal file
33
components/Skeleton/templates/Menu.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<view class="menu-box">
|
||||
<wd-skeleton :row-col="grid" animation="gradient" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps<{
|
||||
size?: any[],
|
||||
count: number
|
||||
}>()
|
||||
const list = Array.from({ length: props.count }, (_, index) => (props.size || []))
|
||||
|
||||
const grid = [
|
||||
[
|
||||
{ width: '96rpx', height: '96rpx' },
|
||||
{ width: '96rpx', height: '96rpx' },
|
||||
{ width: '96rpx', height: '96rpx' },
|
||||
{ width: '96rpx', height: '96rpx' }
|
||||
]
|
||||
]
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.menu-box {
|
||||
padding: 40rpx 80rpx;
|
||||
background-color: #f5f5f5;
|
||||
|
||||
:deep(.wd-skeleton) {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user