新增首页轮播图(推荐菜品)

pull/15/head
Suk1No 2 months ago
parent 6c74c30e6e
commit dd7bb97b4b

@ -1,49 +1,56 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
<u-button type="success">成功按钮</u-button>
</view>
<u-swiper border-radius='1' :duration='duration' :interval='interval' :height="height" :list="swiperList"></u-swiper>
<u-divider margin-top='20' margin-bottom='20' color="#F3AF28">热门推荐</u-divider>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
}
},
onLoad() {},
methods: {},
}
<script setup>
import {
ref
} from 'vue';
//
const height = ref('400')
//
const indicatorDots = ref(true)
//
const autoplay = ref(true)
//
const interval = ref(2000)
//
const duration = ref(500)
//
const swiperList = ref([{
image: '/static/swiper_1.png'
}, {
image: '/static/swiper_2.png'
}, {
image: '/static/swiper_3.png'
}])
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Loading…
Cancel
Save