mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Doc] use relative path for links (#4093)
This commit is contained in:
parent
26aac6037b
commit
f4125bceb8
@ -65,17 +65,17 @@ export default {
|
||||
return [{
|
||||
title: this.$t('goodsDetail'),
|
||||
preview: 'https://img.yzcdn.cn/public_files/2017/10/24/7070a8d1d6504b864c605114d32f2aae.png',
|
||||
url: 'https://youzan.github.io/vant-demo/#/goods',
|
||||
url: '/vant-demo/#/goods',
|
||||
source: 'https://github.com/youzan/vant-demo/blob/master/base/src/view/goods/index.vue'
|
||||
}, {
|
||||
title: this.$t('userCenter'),
|
||||
preview: 'https://img.yzcdn.cn/public_files/2017/10/23/e1d70757e3ab88d39a360b704be8f43f.png',
|
||||
url: 'https://youzan.github.io/vant-demo/#/user',
|
||||
url: '/vant-demo/#/user',
|
||||
source: 'https://github.com/youzan/vant-demo/blob/master/base/src/view/user/index.vue'
|
||||
}, {
|
||||
title: this.$t('shoppingCart'),
|
||||
preview: 'https://img.yzcdn.cn/public_files/2017/10/24/06b8b5ed3692314d434db7f6854dcdbe.png',
|
||||
url: 'https://youzan.github.io/vant-demo/#/cart',
|
||||
url: '/vant-demo/#/cart',
|
||||
source: 'https://github.com/youzan/vant-demo/blob/master/base/src/view/cart/index.vue'
|
||||
}];
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ export default {
|
||||
logoLink: [
|
||||
{
|
||||
image: 'https://b.yzcdn.cn/vant/logo/weapp.svg',
|
||||
url: 'https://youzan.github.io/vant-weapp'
|
||||
url: '/vant-weapp'
|
||||
},
|
||||
{
|
||||
image: 'https://b.yzcdn.cn/vant/logo/github.svg',
|
||||
|
@ -77,7 +77,7 @@ Vue.use(Button);
|
||||
### Route
|
||||
|
||||
```html
|
||||
<van-button type="primary" url="//youzan.github.io/vant/mobile.html">URL</van-button>
|
||||
<van-button type="primary" url="/vant/mobile.html">URL</van-button>
|
||||
<van-button type="primary" to="index">Vue Router</van-button>
|
||||
```
|
||||
|
||||
|
@ -95,7 +95,7 @@ Vue.use(Button);
|
||||
可以通过`url`属性进行 URL 跳转,或通过`to`属性进行路由跳转
|
||||
|
||||
```html
|
||||
<van-button type="primary" url="//youzan.github.io/vant/mobile.html">URL 跳转</van-button>
|
||||
<van-button type="primary" url="/vant/mobile.html">URL 跳转</van-button>
|
||||
<van-button type="primary" to="index">路由跳转</van-button>
|
||||
```
|
||||
|
||||
|
@ -130,7 +130,7 @@
|
||||
<van-button
|
||||
:text="$t('urlRoute')"
|
||||
type="primary"
|
||||
url="//youzan.github.io/vant/mobile.html"
|
||||
url="/vant/mobile.html"
|
||||
/>
|
||||
<van-button
|
||||
:text="$t('vueRoute')"
|
||||
|
@ -59,7 +59,7 @@ Vue.use(Cell).use(CellGroup);
|
||||
|
||||
```html
|
||||
<van-cell-group>
|
||||
<van-cell title="URL" is-link url="//youzan.github.io/vant/mobile.html" />
|
||||
<van-cell title="URL" is-link url="/vant/mobile.html" />
|
||||
<van-cell title="Vue Router" is-link to="index" />
|
||||
</van-cell-group>
|
||||
```
|
||||
|
@ -62,7 +62,7 @@ Vue.use(Cell).use(CellGroup);
|
||||
可以通过`url`属性进行 URL 跳转,或通过`to`属性进行路由跳转
|
||||
|
||||
```html
|
||||
<van-cell title="URL 跳转" is-link url="//youzan.github.io/vant/mobile.html" />
|
||||
<van-cell title="URL 跳转" is-link url="/vant/mobile.html" />
|
||||
<van-cell title="路由跳转" is-link to="index" />
|
||||
```
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
<van-cell
|
||||
:title="$t('urlRoute')"
|
||||
is-link
|
||||
url="//youzan.github.io/vant/mobile.html"
|
||||
url="/vant/mobile.html"
|
||||
/>
|
||||
<van-cell
|
||||
:title="$t('vueRoute')"
|
||||
|
Loading…
x
Reference in New Issue
Block a user