UNPKG

@antmjs/vantui

Version:

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

44 lines 1.25 kB
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; import { useState } from 'react'; import { View } from '@tarojs/components'; import { CheckList } from '@antmjs/vantui'; import { options, statusArr } from './options'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export default function Demo() { var _useState = useState([]), _useState2 = _slicedToArray(_useState, 2), value = _useState2[0], setValue = _useState2[1]; var onChange = function onChange(e) { setValue(e.detail); }; return /*#__PURE__*/_jsxs(View, { style: { display: 'flex' }, children: [/*#__PURE__*/_jsx(CheckList, { value: value, onChange: onChange, limit: 5, labelName: "label", placeholder: "\u8FD0\u8425\u516C\u53F8", data: options, placeholderColor: "#333", showArrowDown: true }), /*#__PURE__*/_jsx(CheckList, { bodyHeight: "max-content", placeholder: "\u72B6\u6001", style: { marginLeft: 12 }, limit: 1, labelName: "label", data: statusArr, placeholderColor: "#333", showArrowRight: true, searchShow: false, allowClear: false })] }); }