mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
[new feature] Tabs: add animated props to change tabs with animation (#2126)
This commit is contained in:
@@ -5,11 +5,24 @@
|
||||
<span>Vant</span>
|
||||
</h1>
|
||||
<div class="mobile-switch-lang">
|
||||
<span :class="{ active: $vantLang === 'en-US' }" @click="switchLang('en-US')">EN</span>
|
||||
<span :class="{ active: $vantLang === 'zh-CN' }" @click="switchLang('zh-CN')">中文</span>
|
||||
<span
|
||||
:class="{ active: $vantLang === 'en-US' }"
|
||||
@click="switchLang('en-US')"
|
||||
>
|
||||
EN
|
||||
</span>
|
||||
<span
|
||||
:class="{ active: $vantLang === 'zh-CN' }"
|
||||
@click="switchLang('zh-CN')"
|
||||
>
|
||||
中文
|
||||
</span>
|
||||
</div>
|
||||
<h2 class="zanui-desc">{{ description }}</h2>
|
||||
<template v-for="item in navList" v-if="item.showInMobile">
|
||||
<template
|
||||
v-for="item in navList"
|
||||
v-if="item.showInMobile"
|
||||
>
|
||||
<mobile-nav
|
||||
v-for="(group, index) in item.groups"
|
||||
:group="group"
|
||||
@@ -26,16 +39,16 @@ import MobileNav from './MobileNav';
|
||||
import { setLang } from '../utils/lang';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MobileNav
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
docConfig
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
MobileNav
|
||||
},
|
||||
|
||||
computed: {
|
||||
navList() {
|
||||
return this.docConfig[this.$vantLang].nav || [];
|
||||
|
@@ -8,8 +8,16 @@
|
||||
v-for="(demo, index) in demos"
|
||||
>
|
||||
<h4>{{ demo.title }}</h4>
|
||||
<a :href="demo.source" target="_blank">{{ $t('source') }}</a>
|
||||
<img :src="demo.preview" @click="onChangeDemo(demo, index)" >
|
||||
<a
|
||||
:href="demo.source"
|
||||
target="_blank"
|
||||
>
|
||||
{{ $t('source') }}
|
||||
</a>
|
||||
<img
|
||||
:src="demo.preview"
|
||||
@click="onChangeDemo(demo, index)"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
@@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<van-collapse v-model="active" class="mobile-nav">
|
||||
<van-collapse-item :title="group.groupName" :name="group.groupName" class="mobile-nav__item">
|
||||
<van-collapse
|
||||
v-model="active"
|
||||
class="mobile-nav"
|
||||
>
|
||||
<van-collapse-item
|
||||
class="mobile-nav__item"
|
||||
:title="group.groupName"
|
||||
:name="group.groupName"
|
||||
>
|
||||
<van-cell
|
||||
v-if="!navItem.disabled"
|
||||
v-for="(navItem, index) in group.list"
|
||||
|
Reference in New Issue
Block a user