mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
103 lines
1.7 KiB
Vue
103 lines
1.7 KiB
Vue
<template>
|
|
<demo-section>
|
|
<van-tabs
|
|
v-model="tab"
|
|
sticky
|
|
>
|
|
<van-tab title="基础图标">
|
|
<van-col
|
|
v-for="icon in icons.basic"
|
|
:key="icon"
|
|
span="6"
|
|
>
|
|
<van-icon :name="icon" />
|
|
<span>{{ icon }}</span>
|
|
</van-col>
|
|
</van-tab>
|
|
<van-tab title="线框风格">
|
|
<van-col
|
|
v-for="icon in icons.outline"
|
|
:key="icon"
|
|
span="6"
|
|
>
|
|
<van-icon :name="icon" />
|
|
<span>{{ icon }}</span>
|
|
</van-col>
|
|
</van-tab>
|
|
<van-tab title="实底风格">
|
|
<van-col
|
|
v-for="icon in icons.filled"
|
|
:key="icon"
|
|
span="6"
|
|
>
|
|
<van-icon :name="icon" />
|
|
<span>{{ icon }}</span>
|
|
</van-col>
|
|
</van-tab>
|
|
</van-tabs>
|
|
</demo-section>
|
|
</template>
|
|
|
|
<script>
|
|
import icons from '@vant/icons';
|
|
|
|
export default {
|
|
i18n: {
|
|
'zh-CN': {
|
|
title: '图标列表',
|
|
info: '显示徽标',
|
|
basic: '基础图标'
|
|
},
|
|
'en-US': {
|
|
title: 'Icon List',
|
|
info: 'Show Info',
|
|
basic: 'Basic Icon'
|
|
}
|
|
},
|
|
|
|
data() {
|
|
this.icons = icons;
|
|
return {
|
|
tab: 0
|
|
};
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less">
|
|
.demo-icon {
|
|
font-size: 0;
|
|
|
|
&-list {
|
|
padding-top: 10px;
|
|
box-sizing: border-box;
|
|
min-height: calc(100vh - 65px);
|
|
}
|
|
|
|
.van-col {
|
|
float: none;
|
|
text-align: center;
|
|
height: 100px;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
|
|
span {
|
|
display: block;
|
|
padding: 0 5px;
|
|
font-size: 12px;
|
|
line-height: 14px;
|
|
}
|
|
}
|
|
|
|
.van-icon {
|
|
font-size: 32px;
|
|
margin: 15px 0;
|
|
color: rgb(69, 90, 100);
|
|
}
|
|
|
|
.van-tab__pane {
|
|
padding-top: 10px;
|
|
}
|
|
}
|
|
</style>
|