Open canvascat opened 1 month ago
import React from "react"; import { Picker } from "@arco-design/mobile-react"; const options = [ { label: "male", value: "1" }, { label: "female", value: "2" }, { label: "others", value: "3" }, ]; export default function FormDemo() { const [value, setValue] = React.useState(["1"]); return ( <Picker value={value} onChange={setValue} renderLinkedContainer={(value, data) => { console.debug(value, data); return ( <div className="arco-form-picker-link-container" style={{ width: 240, height: 30, border: "1px solid #ccc" }} > {data.map((item) => item.label).join(",")} </div> ); }} cascade={false} data={options} maskClosable /> ); }
在有初始值的情况下,显示data为空
Basic Info
在有初始值的情况下,显示data为空