添加 image-mode 参数

This commit is contained in:
icssoa
2025-10-27 18:14:46 +08:00
parent 41d63f19c0
commit 0914598a15

View File

@@ -35,7 +35,7 @@
<slot :item="item" :index="index"> <slot :item="item" :index="index">
<image <image
:src="item.url" :src="item.url"
mode="aspectFill" :mode="imageMode"
class="cl-banner__item-image" class="cl-banner__item-image"
:class="[pt.image?.className]" :class="[pt.image?.className]"
></image> ></image>
@@ -123,6 +123,11 @@ const props = defineProps({
height: { height: {
type: [Number, String], type: [Number, String],
default: 300 default: 300
},
// 图片模式
imageMode: {
type: String,
default: "aspectFill"
} }
}); });
@@ -435,7 +440,7 @@ onMounted(() => {
@apply absolute bottom-3 left-0 w-full; @apply absolute bottom-3 left-0 w-full;
&-item { &-item {
@apply w-2 h-2 rounded-full mx-1; @apply w-2 h-2 rounded-full mx-1 border border-solid border-surface-500;
background-color: rgba(255, 255, 255, 0.3); background-color: rgba(255, 255, 255, 0.3);
transition-property: width, background-color; transition-property: width, background-color;
transition-duration: 0.3s; transition-duration: 0.3s;