import React from 'react'; import { Menu, Typography } from 'kts-components-antd-x3'; import { Invoice } from '../../..'; export default () => { const controller = React.useMemo(() => new Invoice.InvoiceController(), []); React.useEffect(() => { controller.pipeline(async s => { s.goodsListState.goodsMenuExpand = [ () => 自定义1, () => 自定义2, () => 自定义3, (index, controller) => { // 注意: 如果不保存货物,获取的数据是编辑前端的数据 await controller.saveEditGood(); // 保存正在编辑的货物 await controller.wait() // 等待保存完成 await controller.pipeline(async s => { console.log('===>', s.goodsListState.goodsMap.get(index)) // 输出当前货物 })() }} >自定义4, ] })() }, [controller]) return (
); };