feat: 统一图片铺满展示与原生预览
This commit is contained in:
1 parent
352d7bb73b
commit
3a60eebae0
13 files changed
+104
-31
No files matched your search
@@ -4,7 +4,7 @@ import { computed, ref, watch } from 'vue'
|
||||
import { ImageOff } from '@lucide/vue'
|
||||
import { referenceImageUrl } from '../../lib/assets'
|
||||
|
||||
/** 安全图片展示;铺满与原图预览按场景开启,历史选择按钮默认不触发预览。 */
|
||||
/** 图片统一铺满容器;原图预览按场景开启,历史选择按钮不触发预览。 */
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
src?: string | null
|
||||
@@ -14,7 +14,7 @@ const props = withDefaults(
|
||||
objectFit?: 'contain' | 'cover'
|
||||
preview?: boolean
|
||||
}>(),
|
||||
{ retryable: true, objectFit: 'contain', preview: false }
|
||||
{ retryable: true, objectFit: 'cover', preview: false }
|
||||
)
|
||||
const failed = ref(false)
|
||||
const url = computed(() => (props.src ? referenceImageUrl(props.src) : null))
|
||||
|
||||
Reference in new issue
Block a user