demo 原始链接:https://vux.li/demos/v2/#/component/tabbar
\n下面的$t是Demo的i18n使用的翻译函数,一般情况下可以直接使用字符串。另外,下面代码隐藏了i18n标签部分的代码。
\n<template>\n <div>\n <group>\n <cell is-link title=\"Simple\" link=\"/component/tabbar-simple\"></cell>\n <cell is-link title=\"Switch icons\" link=\"/component/tabbar-icon\"></cell>\n </group>\n <tabbar>\n <tabbar-item>\n <img slot=\"icon\" src=\"../assets/demo/icon_nav_button.png\">\n <span slot=\"label\">Wechat</span>\n </tabbar-item>\n <tabbar-item show-dot>\n <img slot=\"icon\" src=\"../assets/demo/icon_nav_msg.png\">\n <span slot=\"label\">Message</span>\n </tabbar-item>\n <tabbar-item selected link=\"/component/demo\">\n <img slot=\"icon\" src=\"../assets/demo/icon_nav_article.png\">\n <span slot=\"label\">Explore</span>\n </tabbar-item>\n <tabbar-item badge=\"2\">\n <img slot=\"icon\" src=\"../assets/demo/icon_nav_cell.png\">\n <span slot=\"label\">News</span>\n </tabbar-item>\n </tabbar>\n </div>\n</template>\n\n<script>\nimport { Tabbar, TabbarItem, Group, Cell } from 'vux'\n\nexport default {\n components: {\n Tabbar,\n TabbarItem,\n Group,\n Cell\n }\n}\n</script>\n\n
\n