feat: 添加图片热区组件、轮播图组件添加控制轮播组件

pull/8/head
kele 2023-09-04 14:12:16 +08:00
parent 18cd88872c
commit e12e2565f0
5 changed files with 52 additions and 8 deletions

View File

@ -1,5 +1,5 @@
{
"name": "星品",
"name": "星品",
"appid": "__UNI__082C0BA",
"description": "Shopro是由SheepJS团队开发使用Uniapp+Vue3技术驱动的在线商城系统内含诸多功能与丰富的活动期待您的使用和反馈。",
"versionName": "1.8.3",
@ -194,12 +194,7 @@
"optimization": {
"subPackages": true
},
"plugins": {
"live-player-plugin": {
"version": "1.3.5",
"provider": "wx2b03c6e691cd7370"
}
},
"plugins": {},
"lazyCodeLoading": "requiredComponents",
"usingComponents": {},
"permission": {},

View File

@ -27,6 +27,8 @@
<s-seckill-block v-if="type === 'seckill'" :data="data" :styles="styles"></s-seckill-block>
<s-groupon-block v-if="type === 'groupon'" :data="data" :styles="styles"></s-groupon-block>
<s-richtext-block v-if="type === 'richtext'" :data="data" :styles="styles"></s-richtext-block>
<s-hotzone-block v-if="type === 'hotzone'" :data="data" :styles="styles"></s-hotzone-block>
</view>
</template>

View File

@ -0,0 +1,45 @@
<template>
<view class="hotzone-wrap">
<image :src="sheep.$url.cdn(data.src)" style="width: 100%" mode="widthFix"></image>
<view
class="hotzone-box"
v-for="item in data.list"
:key="item.width"
:style="[
{
top: item.top + 'rpx',
left: item.left + 'rpx',
width: item.width + 'rpx',
height: item.height + 'rpx',
},
]"
@tap.stop="sheep.$router.go(item.url)"
>
</view>
</view>
</template>
<script setup>
import sheep from '@/sheep';
//
const props = defineProps({
data: {
type: Object,
default: () => ({}),
},
styles: {
type: Object,
default: () => ({}),
},
});
</script>
<style lang="scss" scoped>
.hotzone-wrap {
position: relative;
}
.hotzone-box {
position: absolute;
}
</style>

View File

@ -5,6 +5,8 @@
imageMode="widthFix"
dotCur="bg-mask-40"
:seizeHeight="300"
:autoplay="data.autoplay"
:interval="Number(data.interval)"
/>
</template>

View File

@ -116,7 +116,7 @@
},
interval: {
type: Number,
default: 5000,
default: 3000,
},
duration: {
type: Number,