UNPKG

@antmjs/vantui

Version:

一套适用于Taro3及React的vantui组件库

35 lines 1.1 kB
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; /* eslint-disable */ import react from 'react'; import { Tabbar, TabbarItem } from '@antmjs/vantui'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export default function Demo() { var _react$useState = react.useState('home'), _react$useState2 = _slicedToArray(_react$useState, 2), active = _react$useState2[0], setActive = _react$useState2[1]; return /*#__PURE__*/_jsxs(Tabbar, { active: active, onChange: function onChange(e) { return setActive(e.detail); }, children: [/*#__PURE__*/_jsx(TabbarItem, { name: "home", icon: "home-o", children: "\u6807\u7B7E" }), /*#__PURE__*/_jsx(TabbarItem, { name: "search", icon: "search", children: "\u6807\u7B7E" }), /*#__PURE__*/_jsx(TabbarItem, { name: "friends", icon: "friends-o", children: "\u6807\u7B7E" }), /*#__PURE__*/_jsx(TabbarItem, { name: "setting", icon: "setting-o", children: "\u6807\u7B7E" })] }); }