UNPKG

@antmjs/vantui

Version:

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

30 lines 821 B
import { View } from '@tarojs/components'; import { PullToRefresh } from '@antmjs/vantui'; import { jsx as _jsx } from "react/jsx-runtime"; export default function Demo() { var onRefresh = function onRefresh() { return new Promise(function (resolve) { setTimeout(function () { resolve(undefined); }, 1000); }); }; return /*#__PURE__*/_jsx(PullToRefresh, { onRefresh: onRefresh, children: /*#__PURE__*/_jsx(View, { style: { padding: '0 12px' }, children: new Array(80).fill(1).map(function (_, index) { return /*#__PURE__*/_jsx(View, { style: { padding: 12, background: '#fff', marginBottom: 12 }, children: index }, "PullToRefresh".concat(index)); }) }) }); }