import { Affix, Layout, Menu, Breadcrumb, Table, Tag, Space, Pagination, message, notification, Anchor } from "antd"; import { Row, Col } from "antd"; import { UserOutlined, LaptopOutlined, NotificationOutlined } from "@ant-design/icons"; import { Footer } from "antd/lib/layout/layout"; import { useState } from 'react'; import { WidgetCommitNofifiction } from '@/components/demo' const { SubMenu } = Menu; const { Header, Content, Sider } = Layout; const { Link } = Anchor; message.config({ maxCount: 4 }); //表数据 const dataSource = [ { key: '1', name: 'name1', age: 32, adress: "西湖南路" }, { key: '2', name: 'name2', age: 34, adress: '西湖公园' }, { key: '3', name: 'name1', age: 32, adress: "西湖南路" }, { key: '4', name: 'name2', age: 34, adress: '西湖公园' }, { key: '5', name: 'name1', age: 32, adress: "西湖南路" }, { key: '6', name: 'name2', age: 34, adress: '西湖公园' } ] //表头 const columns = [ { title: 'Id', dataIndex: 'id', key: 'id', render: text => {text}, }, { title: 'user_id', dataIndex: 'user_id', key: 'user_id', }, { title: "title", dataIndex: 'title', key: 'title', } ] function handleClick(e) { console.log('click', e); ntfOpen(e.key); } function pageChange(page: number, pagesize?: number | undefined) { message.info("page:" + page); if (pagesize) { message.error("pagesize:" + pagesize); } } function ntfOpen(msg: string) { const args = { message: "title", description: msg, duration: 5, }; notification.open(args); } export default () => { const [top, setTop] = useState(0); const [bottom, setBottom] = useState(10); const [commitStatus, setcommitStatus] = useState(false); const [commitTime, setcommitTime] = useState(0); const [commitMsg, setcommitMsg] = useState("失败"); const [tableData, setTableData] = useState(); function getTableData(){ fetch('https://gorest.co.in/public-api/posts') .then(function (response) { console.log("ajex:", response); return response.json(); }) .then(function (myJson) { console.log("ajex",myJson.data); setTableData(myJson.data); }); } function pageChange(page: number, pagesize?: number | undefined) { setcommitTime(page); message.info("page:" + page); if (pagesize) { message.error("pagesize:" + pagesize); } } return (
Palicanon Course nav 3 } title="Others"> option1 option2 option3 option1 option2 option3
} title="subnav 1"> option1 option2 option3 option4 } title="subnav 2"> option1 option2 option3 option4 Home List App
搜索结果
col1col2col3 col4col5 col6 ); }