chore(Image): fix vite warning

This commit is contained in:
chenjiahan 2021-09-08 17:08:26 +08:00 committed by neverland
parent 0dfb594bd5
commit 1b6d77073b
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ const t = useTranslate({
});
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>
<template>
@ -76,12 +76,12 @@ const fits = ['contain', 'cover', 'fill', 'none', 'scale-down'];
<demo-block :title="t('error')">
<van-row gutter="20">
<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>
</van-col>
<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>
</van-image>
<div class="text">{{ t('customTip') }}</div>

View File

@ -284,7 +284,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100%; height: 27vw;"
>
<img src="x"
<img src="http://x"
class="van-image__img"
>
<div class="van-image__loading">
@ -302,7 +302,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100%; height: 27vw;"
>
<img src="x"
<img src="http://x"
class="van-image__img"
>
<div class="van-image__loading">