随笔分类 - 前端项目实战-2022-学习
前端项目实战-2022
摘要:const buttonFlag: any = { 0: () => { // setCurrentMenu(null); setEditVisible(true); }, 1: () => { // setCurrentMenu(null); setAddSpecialVisible(true);
阅读全文
摘要:useEffect(() => { if(menuModalData.id){ form.setFieldsValue({...menuModalData,beginDate:moment(menuModalData.begin_date), endDate:moment(menuModalData
阅读全文
摘要:res.beginDate = countFormat(res.beginDate) res.endDate = countFormat(res.endDate) const countFormat = (item:any) => { return item?moment(item).format(
阅读全文
摘要:<Form.Item label="有效期" > <Form.Item name={'beginDate'} style={{ display: 'inline-block', width: 'calc(50% - 8px)' }} rules={[{ required: true, message
阅读全文
摘要:Postgrest使用手册 1 过滤出 is_delete = 0 的数据 分页查询并按照 id 倒叙排列 2 GET http: // 127.0.0.1 : 3000 / t_wms_location?is_delete = eq .0 & limit = 10 & offset = 2 3 &
阅读全文
摘要:<Form.Item labelCol={{ span: 8 }} label="文件上传" name={"uoload"} rules={[{ required: true, message: '文件上传' }]} > <Upload name="file" fileList={fileList}
阅读全文
摘要:URLSearchParams API 提供对 URL 查询的读写访问。 URLSearchParams 类也可以与以下四个构造函数之一单独使用。 URLSearchParams 类也在全局对象上可用。 WHATWG URLSearchParams 接口和 querystring 模块具有相似的用途
阅读全文
摘要:{ title: '房号', dataIndex: 'bedCode', key: 'bedCode', render: (value, record, index) => { // 处理列,相同数据则合并 // 处理rowSpan const obj = { children: value, pr
阅读全文
摘要:const onChangeValue = (e: any) => { console.log(e,"eeeeee") const length=e let arr:any=[] for(var i=0;i<length;i++){ arr.push({index:i}) } setDataList
阅读全文
摘要:import React, { useState, useEffect, useCallback, memo } from 'react'; import { Select, Table, Button, Modal, message, Card, Form, DatePicker } from '
阅读全文
摘要:getOne: (resource: any, params: any) => { const key: any = Object.keys(params) const id = params[key[0]]; const primaryKey = getPrimaryKey(resource, p
阅读全文
摘要:const beforeUpload = (file: any) => { console.log(file,"file") // 设置上传文件大小小于50M const isLt50M = file.size / 1024 / 1024 < 50; if (!fileList.length) {
阅读全文
摘要:getList: (resource: any, params: any) => { const primaryKey = getPrimaryKey(resource, primaryKeys); const { pageIndex, pageSize } = params.pagination;
阅读全文
摘要:const getOrderBy = (field: string, order: string, primaryKey: PrimaryKey) => { console.log(field, order,primaryKey,"test") if (field == 'id') { consol
阅读全文
摘要:console.log(splitKey[0],"[splitKey[0]") if (result[splitKey[0]] undefined) { // first operator for the key, we add it to the dict result[splitKey[0]]
阅读全文
摘要:values.forEach((value: any) => { //进行拼接 // if operator is intentionally blank, rpc syntax let op = operation.includes('like') ? `${operation}.*${value
阅读全文
摘要:点击子元素 向上冒泡 阻止向上冒泡
阅读全文