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
+12 -12
View File
@@ -16,8 +16,8 @@ app.use(ImagePreview);
```js
ImagePreview([
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
]);
```
@@ -26,8 +26,8 @@ ImagePreview([
```js
ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
startPosition: 1,
});
@@ -40,8 +40,8 @@ After setting the `closeable` attribute, the close icon will be displayed in the
```js
ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
closeable: true,
});
@@ -54,8 +54,8 @@ import { Toast } from 'vant';
ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
onClose() {
Toast('closed');
@@ -68,8 +68,8 @@ ImagePreview({
```js
const instance = ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
beforeClose: () => false,
});
@@ -107,8 +107,8 @@ export default {
return {
state,
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
onChange,
};
+13 -13
View File
@@ -11,7 +11,7 @@ ImagePreview 是一个函数,调用函数后会直接在页面中展示图片
```js
import { ImagePreview } from 'vant';
ImagePreview(['https://img01.yzcdn.cn/vant/apple-1.jpg']);
ImagePreview(['https://img.yzcdn.cn/vant/apple-1.jpg']);
```
### 组件调用
@@ -42,8 +42,8 @@ export default {
```js
ImagePreview([
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
]);
```
@@ -54,8 +54,8 @@ ImagePreview 支持传入配置对象,并通过 `startPosition` 选项指定
```js
ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
startPosition: 1,
});
@@ -68,8 +68,8 @@ ImagePreview({
```js
ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
closeable: true,
});
@@ -84,8 +84,8 @@ import { Toast } from 'vant';
ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
onClose() {
Toast('关闭');
@@ -100,8 +100,8 @@ ImagePreview({
```js
const instance = ImagePreview({
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
beforeClose: () => false,
});
@@ -142,8 +142,8 @@ export default {
return {
state,
images: [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
onChange,
};
+4 -4
View File
@@ -65,10 +65,10 @@ const i18n = {
};
const images = [
'https://img01.yzcdn.cn/vant/apple-1.jpg',
'https://img01.yzcdn.cn/vant/apple-2.jpg',
'https://img01.yzcdn.cn/vant/apple-3.jpg',
'https://img01.yzcdn.cn/vant/apple-4.jpg',
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
'https://img.yzcdn.cn/vant/apple-3.jpg',
'https://img.yzcdn.cn/vant/apple-4.jpg',
];
export default {
@@ -83,7 +83,7 @@ DOMWrapper {
>
<img
class="van-image__img"
src="https://img01.yzcdn.cn/1.png"
src="https://img.yzcdn.cn/1.png"
style="object-fit: contain;"
/>
<div
@@ -139,7 +139,7 @@ DOMWrapper {
>
<img
class="van-image__img"
src="https://img01.yzcdn.cn/1.png"
src="https://img.yzcdn.cn/1.png"
style="object-fit: contain;"
/>
<div
+3 -3
View File
@@ -11,9 +11,9 @@ import { nextTick } from 'vue';
import { DOMWrapper } from '@vue/test-utils/dist/domWrapper';
const images = [
'https://img01.yzcdn.cn/1.png',
'https://img01.yzcdn.cn/2.png',
'https://img01.yzcdn.cn/3.png',
'https://img.yzcdn.cn/1.png',
'https://img.yzcdn.cn/2.png',
'https://img.yzcdn.cn/3.png',
];
function triggerTwoFingerTouchmove(