feat: 调整首页组件目录结构
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<swiper
|
||||
class="swiper"
|
||||
circular
|
||||
:indicator-dots="activityList.length > 1"
|
||||
indicator-color="#FFFFFF"
|
||||
indicator-active-color="#00A6FF"
|
||||
:autoplay="autoplay"
|
||||
:interval="interval"
|
||||
:duration="duration"
|
||||
>
|
||||
<swiper-item v-for="item in activityList" :key="item.id">
|
||||
<view class="swiper-item" @click="handleClick(item)">
|
||||
<image :src="item.activityCover" mode="aspectFill"></image>
|
||||
<view class="corner-btn">快速预定</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { SEND_COMMAND_TEXT } from "@/constant/constant";
|
||||
|
||||
const autoplay = ref(true);
|
||||
const interval = ref(3000);
|
||||
const duration = ref(500);
|
||||
|
||||
const props = defineProps({
|
||||
activityList: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
});
|
||||
|
||||
const handleClick = (item) => {
|
||||
uni.$emit(SEND_COMMAND_TEXT, "快速预定");
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
Reference in New Issue
Block a user