随笔分类 -  前端学习-项目work-

前端学习-项目work-
摘要:const MenuButton = memo( ({ index, onButtonClick, }: { index: number; onButtonClick: (type: string, index: number) => void; }) => ( <React.Fragment> < 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(9) 评论(0) 推荐(0) 编辑
摘要:function identity<T>(arg: T): T { return arg; } 我们定义了泛型函数后,可以用两种方法使用。 第一种是,传入所有的参数,包含类型参数: let output = identity<string>("myString"); // type of outpu 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(46) 评论(0) 推荐(0) 编辑
摘要:子组件 import React, { useCallback, useState } from 'react'; import { Table } from 'antd'; import { PaginationProps } from 'antd/lib/pagination'; import 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(20) 评论(0) 推荐(0) 编辑
摘要:父组件 <Card> <SearchForm formList={formList} actions={actions} onSearch={onSearch} onClick={onAddMenu} showLabel={true} ></SearchForm> </Card> 子组件 impor 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(7) 评论(0) 推荐(0) 编辑
摘要:{dataRouter && dataRouter.map((child, index) => { return <Route key={index} path={child.path} element={<React.Suspense fallback={<Loading />}> {child. 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(3) 评论(0) 推荐(0) 编辑
摘要:<Route path='/' element={<React.Suspense fallback={<Loading/>}> <App /> </React.Suspense> }> <Route path='/user' element={<React.Suspense fallback={<L 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(1) 评论(0) 推荐(0) 编辑
摘要:const EmployeeSkill=lazy(() => import("@/views/systemmanage/emploeeskills/emploeeskills")) const Factory=lazy(() => import("@/views/factorymodeling/fa 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(9) 评论(0) 推荐(0) 编辑
摘要:if(response.code==200){ saveToken(response.data); message.success("登陆成功"); // setTokenList(response.data) // let temp = data as { token: string }; set 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(18) 评论(0) 推荐(0) 编辑
摘要:webpack.config.js webpack:{ alias: { "@": pathResolve("src"), } }, ts.config.json "baseUrl": "./", 阅读全文
posted @ 2022-10-14 08:19 前端导师歌谣 阅读(3) 评论(0) 推荐(0) 编辑
摘要:const onAddMenu = useCallback(() => { setCurrentMenu(null); setEditVisible(true); }, []); const onTableChange = useCallback(({ current, pageSize }: Pa 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(14) 评论(0) 推荐(0) 编辑
摘要:<Upload name="file" action="xxxx" onChange={handleChange} fileList={fileList} headers={{ "Authorization": getToken() || "" }} > {headPic ?"" : uploadB 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(15) 评论(0) 推荐(0) 编辑
摘要:const downURL = window.URL.createObjectURL(new Blob([data])); // data 为获取到的二进制数据 const listNode = document.createElement("a"); // 这里注意 : 非同源a标签的downlo 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(38) 评论(0) 推荐(0) 编辑
摘要:form.setFieldsValue({ parentId: "", code: "", name: "", contact: "", addr: "", contactNumber: "", status: "" }) 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(15) 评论(0) 推荐(0) 编辑
摘要:axios.interceptors.response.use(function (response) { console.log(getToken(),"getTokenTest") // 对响应数据做点什么 console.log(response, "response1111") if (re 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(34) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示