@antmjs/vantui
Version:
一套适用于Taro3及React的vantui组件库
24 lines • 682 B
JavaScript
import { CheckList } from '@antmjs/vantui';
import { options } from './options';
import { jsx as _jsx } from "react/jsx-runtime";
export default function Demo() {
var searchData = function searchData(keyWord) {
return new Promise(function (resolve) {
setTimeout(function () {
if (!keyWord) {
resolve(options);
} else {
resolve(options.filter(function (it) {
return it.label.includes(keyWord);
}));
}
}, 1200);
});
};
return /*#__PURE__*/_jsx(CheckList, {
placeholder: "\u9009\u62E9\u8FD0\u8F93\u516C\u53F8",
checkAll: true,
labelName: "label",
searchData: searchData
});
}