UNPKG

@aliretail/react-materials-components

Version:
56 lines (50 loc) 1.14 kB
--- title: TradeTable-Usage order: 3 --- ```jsx import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { TreeManager } from '@aliretail/react-materials-components'; const mockTabList = [ { title: '自定义标签', key: '001', }, { title: '系统标签', key: '002', }, ]; const requestMap = { queryAll: { url: 'https://rap2api.alibaba-inc.com/app/mock-scene/6013//TagClassQueryAllCateGory?_tag=empty', }, move: { url: 'https://rap2api.alibaba-inc.com/app/mock/6013/TagClassMove', }, delete: { url: 'https://rap2api.alibaba-inc.com/app/mock/6013/TagClassDelete', }, modify: { url: 'https://rap2api.alibaba-inc.com/app/mock/6013/TagClassModify', }, create: { url: 'https://rap2api.alibaba-inc.com/app/mock/6013/TagClassCreate', }, }; class App extends Component { onSelect = (key) => { console.log('key:', key); }; render() { return ( <div> <TreeManager requestMap={requestMap} tabList={mockTabList} onSelect={this.onSelect} /> </div> ); } } ReactDOM.render(<App />, mountNode); /* deploy 工程 */ ```