docs: revert cdn URL (#8310)

This commit is contained in:
neverland
2021-03-08 17:19:56 +08:00
committed by GitHub
parent 8bae9ca0ed
commit 110af6f1f4
96 changed files with 249 additions and 268 deletions
+4 -8
View File
@@ -15,11 +15,7 @@ app.use(VanImage);
### Basic Usage
```html
<van-image
width="100"
height="100"
src="https://img01.yzcdn.cn/vant/cat.jpeg"
/>
<van-image width="100" height="100" src="https://img.yzcdn.cn/vant/cat.jpeg" />
```
### Fit Mode
@@ -29,7 +25,7 @@ app.use(VanImage);
width="10rem"
height="10rem"
fit="contain"
src="https://img01.yzcdn.cn/vant/cat.jpeg"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
```
@@ -42,7 +38,7 @@ Show round image, it may not works at `fit=contain` and `fit=scale-down`.
round
width="10rem"
height="10rem"
src="https://img01.yzcdn.cn/vant/cat.jpeg"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
```
@@ -53,7 +49,7 @@ Show round image, it may not works at `fit=contain` and `fit=scale-down`.
width="100"
height="100"
lazy-load
src="https://img01.yzcdn.cn/vant/cat.jpeg"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
```
+6 -10
View File
@@ -21,11 +21,7 @@ app.use(VanImage);
基础用法与原生 `img` 标签一致,可以设置 `src``width``height``alt` 等原生属性。
```html
<van-image
width="100"
height="100"
src="https://img01.yzcdn.cn/vant/cat.jpeg"
/>
<van-image width="100" height="100" src="https://img.yzcdn.cn/vant/cat.jpeg" />
```
### 填充模式
@@ -37,7 +33,7 @@ app.use(VanImage);
width="10rem"
height="10rem"
fit="contain"
src="https://img01.yzcdn.cn/vant/cat.jpeg"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
```
@@ -50,7 +46,7 @@ app.use(VanImage);
round
width="10rem"
height="10rem"
src="https://img01.yzcdn.cn/vant/cat.jpeg"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
```
@@ -63,7 +59,7 @@ app.use(VanImage);
width="100"
height="100"
lazy-load
src="https://img01.yzcdn.cn/vant/cat.jpeg"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
```
@@ -80,7 +76,7 @@ app.use(Lazyload);
`Image` 组件提供了默认的加载中提示,支持通过 `loading` 插槽自定义内容。
```html
<van-image src="https://img01.yzcdn.cn/vant/cat.jpeg">
<van-image src="https://img.yzcdn.cn/vant/cat.jpeg">
<template v-slot:loading>
<van-loading type="spinner" size="20" />
</template>
@@ -92,7 +88,7 @@ app.use(Lazyload);
`Image` 组件提供了默认的加载失败提示,支持通过 `error` 插槽自定义内容。
```html
<van-image src="https://img01.yzcdn.cn/vant/cat.jpeg">
<van-image src="https://img.yzcdn.cn/vant/cat.jpeg">
<template v-slot:error>加载失败</template>
</van-image>
```
+1 -1
View File
@@ -88,7 +88,7 @@ export default {
return {
t,
image: 'https://img01.yzcdn.cn/vant/cat.jpeg',
image: 'https://img.yzcdn.cn/vant/cat.jpeg',
fits: ['contain', 'cover', 'fill', 'none', 'scale-down'],
};
},
+11 -11
View File
@@ -6,7 +6,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100px; height: 100px;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
>
<div class="van-image__loading">
@@ -24,7 +24,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: contain;"
>
@@ -43,7 +43,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: cover;"
>
@@ -62,7 +62,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: fill;"
>
@@ -81,7 +81,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: none;"
>
@@ -100,7 +100,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: scale-down;"
>
@@ -123,7 +123,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image van-image--round"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: contain;"
>
@@ -142,7 +142,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image van-image--round"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: cover;"
>
@@ -161,7 +161,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image van-image--round"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: fill;"
>
@@ -180,7 +180,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image van-image--round"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: none;"
>
@@ -199,7 +199,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-image van-image--round"
style="width: 100%; height: 27vw;"
>
<img src="https://img01.yzcdn.cn/vant/cat.jpeg"
<img src="https://img.yzcdn.cn/vant/cat.jpeg"
class="van-image__img"
style="object-fit: scale-down;"
>