mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-26 00:09:15 +08:00
chore(Image): fix vite warning
This commit is contained in:
parent
0dfb594bd5
commit
1b6d77073b
@ -27,7 +27,7 @@ const t = useTranslate({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const image = 'https://img.yzcdn.cn/vant/cat.jpeg';
|
const image = 'https://img.yzcdn.cn/vant/cat.jpeg';
|
||||||
const fits = ['contain', 'cover', 'fill', 'none', 'scale-down'];
|
const fits = ['contain', 'cover', 'fill', 'none', 'scale-down'] as const;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -76,12 +76,12 @@ const fits = ['contain', 'cover', 'fill', 'none', 'scale-down'];
|
|||||||
<demo-block :title="t('error')">
|
<demo-block :title="t('error')">
|
||||||
<van-row gutter="20">
|
<van-row gutter="20">
|
||||||
<van-col span="8">
|
<van-col span="8">
|
||||||
<van-image width="100%" height="27vw" src="x" />
|
<van-image width="100%" height="27vw" src="http://x" />
|
||||||
<div class="text">{{ t('defaultTip') }}</div>
|
<div class="text">{{ t('defaultTip') }}</div>
|
||||||
</van-col>
|
</van-col>
|
||||||
|
|
||||||
<van-col span="8">
|
<van-col span="8">
|
||||||
<van-image width="100%" height="27vw" src="x">
|
<van-image width="100%" height="27vw" src="http://x">
|
||||||
<template #error>{{ t('loadFail') }}</template>
|
<template #error>{{ t('loadFail') }}</template>
|
||||||
</van-image>
|
</van-image>
|
||||||
<div class="text">{{ t('customTip') }}</div>
|
<div class="text">{{ t('customTip') }}</div>
|
||||||
|
@ -284,7 +284,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-image"
|
<div class="van-image"
|
||||||
style="width: 100%; height: 27vw;"
|
style="width: 100%; height: 27vw;"
|
||||||
>
|
>
|
||||||
<img src="x"
|
<img src="http://x"
|
||||||
class="van-image__img"
|
class="van-image__img"
|
||||||
>
|
>
|
||||||
<div class="van-image__loading">
|
<div class="van-image__loading">
|
||||||
@ -302,7 +302,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-image"
|
<div class="van-image"
|
||||||
style="width: 100%; height: 27vw;"
|
style="width: 100%; height: 27vw;"
|
||||||
>
|
>
|
||||||
<img src="x"
|
<img src="http://x"
|
||||||
class="van-image__img"
|
class="van-image__img"
|
||||||
>
|
>
|
||||||
<div class="van-image__loading">
|
<div class="van-image__loading">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user