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

前端学习-项目work-
摘要://数组按照某字段去重排序 export function filterData(arr: any, flag: any) { console.log(arr,flag) let objList:any = [] let filterList:any = [] arr.forEach((item:a 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(12) 评论(0) 推荐(0) 编辑
摘要:直接设置 scroll={{ x: 1000 }} 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(13) 评论(0) 推荐(0) 编辑
摘要:<BasicTable data={menuData} onChange={onTableChange} loading={loading} scroll={{ x: 2000 }}> 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(23) 评论(0) 推荐(0) 编辑
摘要:<Table.Column<Menu> width={170} align="center" fixed={"right"} title="操作" render={(text, record, index) => ( <MenuButton index={index} record={record} 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(28) 评论(0) 推荐(0) 编辑
摘要:// FormLayout const formItemLayout = { labelCol: { xs: { span: 6 }, sm: { span: 6 }, }, wrapperCol: { xs: { span: 14 }, sm: { span: 14 }, }, }; const 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(55) 评论(0) 推荐(0) 编辑
摘要:const onOk = (() => { console.log(dataParams, "dataParams") if(fileLoading){ cutSchemeListAdd(dataParams) .unwrap() .then((response: any) => { if (res 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(28) 评论(0) 推荐(0) 编辑
摘要:<Table.Column<Menu> width="100px" title="生产单号" dataIndex="code" align="center"></Table.Column> <Table.Column<Menu> width="100px" title="订单编号" dataInde 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(18) 评论(0) 推荐(0) 编辑
摘要:render: (value, record, index) => { // 处理列,相同数据则合并 // 处理rowSpan const obj = { children: value, props: { rowSpan: 1 }, }; // 当检索到相同数据则返回 那条数据 let arr = 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(42) 评论(0) 推荐(0) 编辑
摘要:import React, { useState, useEffect, useCallback, memo } from 'react'; import {Modal, Input, message, Form, Calendar} from 'antd'; import {useHolidayD 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(46) 评论(0) 推荐(0) 编辑
摘要:第一种打印方式 window.document.body.innerHTML = window.document.getElementById('print')!.innerHTML; window.print(); window.location.reload(); 直接根据dom节点打印 阅读全文
posted @ 2022-10-26 22:32 前端导师歌谣 阅读(25) 评论(0) 推荐(0) 编辑
摘要:只有卡片样式的页签支持新增和关闭选项。使用 closable={false} 禁止关闭。 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(174) 评论(0) 推荐(0) 编辑
摘要:<Tabs hideAdd onTabClick={makeStyle} activeKey={getStyle} type="editable-card" // onEdit={onEdit} > {styleList2 && styleList2.map(pane => ( <TabPane t 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(25) 评论(0) 推荐(0) 编辑
摘要:<Dragger > <p className="ant-upload-drag-icon"> <UploadOutlined /> </p> <p className="ant-upload-text">单击或者拖拽到该区域进行表格导入</p> <p className="ant-upload-h 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(43) 评论(0) 推荐(0) 编辑
摘要:box-sizing: content-box;/*盒子宽度=CSS中设置的width+border+padding*/ box-sizing: border-box;/*盒子的宽度=css中设置的width*/ 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(31) 评论(0) 推荐(0) 编辑
摘要:function sortData(list) { let result = [] const colorGroup = {} for (const item of list) { if (!colorGroup[item.color]) { colorGroup[item.color] = [] 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(33) 评论(0) 推荐(0) 编辑
摘要:import React, { useState, useEffect, useCallback, memo } from 'react'; import { Menu } from './service'; import { Select, Table, Button, Modal, messag 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(37) 评论(0) 推荐(0) 编辑
摘要:const getStatus = (status: any) => { let obj:any = { '1':'通过', '-1':'驳回', '0':'待审核' } return obj[status] }; render={(text)=>{ return getStatus(text) } 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(14) 评论(0) 推荐(0) 编辑
摘要:<div id='customers'> <div> <span>日期</span>:<span>{item?.date}</span> </div> <div> <span>制单</span>:<span>{item?.manufactureCode}</span> </div> <div> <s 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(32) 评论(0) 推荐(0) 编辑
摘要:/** * 所有正则校验都写到这里 */ // 手机号 const isPhone = /^1[3-9]\d{9}$/; // const isPhone = /(\d{3}-|\d{4}-)?(\d{8}|\d{7})?/; // 邮箱 const isEmail = /^([A-Za-z0-9_ 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(21) 评论(0) 推荐(0) 编辑
摘要://返回从当前数据重复标识的数据长度 export function filterNumData(obj:any,arr: any,record:any,index:number,flag: any) { let length:number = 0 if(arr.length>0){ for(let 阅读全文
posted @ 2022-10-26 22:31 前端导师歌谣 阅读(17) 评论(0) 推荐(0) 编辑

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