Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 1x 1x | import React from "react"; import { List } from "@tencent/tea-component/lib/list"; import { Dropdown } from "@tencent/tea-component/lib/dropdown"; export default function ListExample() { return ( <Dropdown button="点击展开" appearance="button" clickClose={false}> {close => ( <List type="option"> <List.Item onClick={close}>预付费</List.Item> <List.Item onClick={close}>后付费</List.Item> <List.SubMenu label="更多"> <List type="option"> <List.Item disabled>订阅</List.Item> <List.Item onClick={close}>朋友代付</List.Item> </List> </List.SubMenu> </List> )} </Dropdown> ); } |