feat(图片背景组件): 新增是否翻转的参数和功能
This commit is contained in:
parent
a7eef81fbf
commit
15a563c1e7
@ -6,6 +6,7 @@
|
|||||||
v-if="shouldShowImage"
|
v-if="shouldShowImage"
|
||||||
v-smart-img
|
v-smart-img
|
||||||
:src="imgUrl"
|
:src="imgUrl"
|
||||||
|
:class="flip ? 'flipImg' : ''"
|
||||||
alt=""
|
alt=""
|
||||||
width="100%"
|
width="100%"
|
||||||
style="display: block"
|
style="display: block"
|
||||||
@ -59,6 +60,12 @@ const props = defineProps({
|
|||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 是否启用懒加载
|
||||||
|
flip: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
|
||||||
// 是否立即显示(优先级高于lazy)
|
// 是否立即显示(优先级高于lazy)
|
||||||
immediate: {
|
immediate: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -124,4 +131,8 @@ onMounted(() => {
|
|||||||
.scrollY::-webkit-scrollbar {
|
.scrollY::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[dir='rtl'] .flipImg {
|
||||||
|
transform: scaleX(-1);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user