UNPKG

@antmjs/vantui

Version:

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

51 lines 1.41 kB
import { View } from '@tarojs/components'; import { Button, Notify } from '@antmjs/vantui'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export default function Demo() { var primaryShow = function primaryShow() { Notify.show({ message: '-----通知内容-----', type: 'primary' }); }; var successShow = function successShow() { Notify.show({ message: '-----通知内容-----', type: 'success' }); }; var dangerShow = function dangerShow() { Notify.show({ message: '-----通知内容-----', type: 'danger' }); }; var warningShow = function warningShow() { Notify.show({ message: '-----通知内容-----', type: 'warning' }); }; return /*#__PURE__*/_jsxs(View, { children: [/*#__PURE__*/_jsx(Button, { onClick: primaryShow, type: "info", children: "\u4E3B\u8981\u901A\u77E5" }), /*#__PURE__*/_jsx(Button, { onClick: successShow, type: "primary", children: "\u6210\u529F\u901A\u77E5" }), /*#__PURE__*/_jsx(Button, { onClick: dangerShow, type: "danger", children: "\u5371\u9669\u901A\u77E5" }), /*#__PURE__*/_jsx(Button, { onClick: warningShow, type: "warning", children: "\u8B66\u544A\u7528\u6CD5" }), /*#__PURE__*/_jsx(Notify, { id: "vanNotify" })] }); }