UNPKG

@antmjs/vantui

Version:

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

36 lines (35 loc) 988 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Demo; var _components = require("@tarojs/components"); var _vantui = require("@antmjs/vantui"); var _jsxRuntime = require("react/jsx-runtime"); function Demo() { var onRefresh = function onRefresh() { return new Promise(function (resolve) { setTimeout(function () { resolve(undefined); }, 1000); }); }; return /*#__PURE__*/(0, _jsxRuntime.jsx)(_vantui.PullToRefresh, { onRefresh: onRefresh, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, { style: { padding: '0 12px' }, children: new Array(80).fill(1).map(function (_, index) { return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, { style: { padding: 12, background: '#fff', marginBottom: 12 }, children: index }, "PullToRefresh".concat(index)); }) }) }); }