feat: add new components and update UI and type declarations
- add AiTabSwitch component with its image assets and styles - add Welcome component for welcome text, weather display and notice messages - update ChatMainList to use new components and add background header layout - replace custom swiper in NoticeMessage with Vant VanSwipe component - add Vant Swipe type definitions to components.d.ts
This commit is contained in:
@@ -1,34 +1,28 @@
|
||||
<template>
|
||||
<div v-if="hasBannerList">
|
||||
<swiper @change="onSwiperChange" class="swiper" circular :autoplay="autoplay" :interval="interval"
|
||||
:duration="duration" :indicator-dots="false">
|
||||
<swiper-item v-for="item in bannerList" :key="item.entityName">
|
||||
<div class="swiper-item flex flex-col flex-items-start flex-justify-between px-10" @click="clickItem(item)">
|
||||
<span class="text-color font-size-12 font-600">
|
||||
<van-swipe class="h-[50px] mt-[8px]" loop vertical :autoplay="autoplay" @change="onSwiperChange">
|
||||
<van-swipe-item v-for="item in bannerList" :key="item.entityName">
|
||||
<div class="swiper-item bg-white flex flex-col items-start justify-between px-10" @click="clickItem(item)">
|
||||
<span class="text-[#0CCD58] text-[12px] text-[600]">
|
||||
{{ item.entityName }}
|
||||
</span>
|
||||
<div class="flex flex-row flex-justify-between">
|
||||
<span class="text-color font-size-10 font-500">
|
||||
<div class="flex flex-row justify-between">
|
||||
<span class="text-[#0CCD58] text-[10px] text-[500]">
|
||||
发布时间:{{ item.effectiveStartTime }}
|
||||
</span>
|
||||
<text class="text-color font-size-10 font-500 underline-text">
|
||||
<span class="text-[#0CCD58] text-[10px] text-[500] underline-text">
|
||||
详情
|
||||
</text>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<yo-indicator-dot :current-index="currentIndex" :length="bannerList.length" duration="0.5" default-width="4px"
|
||||
active-width="16px" dot-height="4px" shape="circle" default-color="rgba(255,255,255,0.5)"
|
||||
active-color="rgba(255,255,255,1)" />
|
||||
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
</div>
|
||||
|
||||
<div v-else-if="props.tipsMessage">
|
||||
<div v-else-if="tipsMessage">
|
||||
<div class="noMessage">
|
||||
<span class="noMessage-text text-color font-size-12 font-600">
|
||||
{{ props.tipsMessage }}
|
||||
<span class="noMessage-text text-[#0CCD58] text-[12px] text-[600]">
|
||||
{{ tipsMessage }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,9 +42,7 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const autoplay = ref(true);
|
||||
const interval = ref(7000);
|
||||
const duration = ref(500);
|
||||
const autoplay = ref(3000);
|
||||
|
||||
const currentIndex = ref(0);
|
||||
const bannerList = ref([]);
|
||||
@@ -87,24 +79,13 @@ const clickItem = (item) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.swiper {
|
||||
height: 50px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
display: block;
|
||||
height: 46px;
|
||||
background: #EBEFFF;
|
||||
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 12px;
|
||||
border: 1px solid #C7D2FE;
|
||||
}
|
||||
|
||||
.text-color {
|
||||
color: #0CCD58;
|
||||
}
|
||||
|
||||
.underline-text {
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #0CCD58;
|
||||
|
||||
Reference in New Issue
Block a user