UNPKG

@antmjs/vantui

Version:

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

35 lines 1.13 kB
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; /* eslint-disable */ import react from 'react'; import { View } from '@tarojs/components'; import { Cell, Popup } 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(false), _react$useState2 = _slicedToArray(_react$useState, 2), show = _react$useState2[0], setShow = _react$useState2[1]; return /*#__PURE__*/_jsxs(View, { className: "van-root-popup", children: [/*#__PURE__*/_jsx(Cell, { title: "\u6302\u8F7D\u5230\u9875\u9762\u6839\u8282\u70B9", isLink: true, onClick: function onClick() { return setShow(true); } }), /*#__PURE__*/_jsx(Popup, { rootPortal: true, show: show, onClose: function onClose() { return setShow(false); }, children: /*#__PURE__*/_jsx(View, { className: "van-root-popup-content", children: /*#__PURE__*/_jsx(View, { children: "\u5185\u5BB9" }) }) })] }); }