UNPKG

@antmjs/vantui

Version:

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

32 lines 926 B
/* eslint-disable */ import react from 'react'; import { SwipeCell, Button, CellGroup, Cell } from '@antmjs/vantui'; import { jsx as _jsx } from "react/jsx-runtime"; export default function Demo() { var it = react.useRef(); var closeAction = function closeAction() { setTimeout(function () { var _it$current; (_it$current = it.current) === null || _it$current === void 0 ? void 0 : _it$current.close(); }, 2000); }; return /*#__PURE__*/_jsx(SwipeCell, { ref: it, rightWidth: 75, leftWidth: 75, asyncClose: true, onClose: closeAction, renderLeft: /*#__PURE__*/_jsx(Button, { children: "\u9009\u62E9" }), renderRight: /*#__PURE__*/_jsx(Button, { children: "\u5220\u9664" }), children: /*#__PURE__*/_jsx(CellGroup, { children: /*#__PURE__*/_jsx(Cell, { title: "\u5355\u5143\u683C", value: "\u5185\u5BB9" }) }) }); }