react+antd 主表和子表table+form验证添加
import React, { useEffect, useState } from 'react' import backImg from '@/assets/images/back.png' import './in...
import React, { useEffect, useState } from 'react' import backImg from '@/assets/images/back.png' import './in...
import { PlusOutlined } from '@ant-design/icons' import { Button, Form, Input, InputNumber, Popconfirm, Space, Table, Typo...
import * as echarts from "echarts"; import { EChartsOption } from "echarts"; import React, { useEffect, useRef } from "react"; ex...
const [params, setParams] = useState({ pageIndex: 1, pageSize: 10, name: '' }); { title: '序号', ...
import React, { createContext, ReactNode, useContext, useReducer } from 'react' interface IntitData { username: strin...
由于 vite 本身已按需导入了组件库,因此仅样式不是按需导入的,因此只需按需导入样式即可。import { defineConfig } from 'vite'...
const exportImgClick = () => { if (!guestsData || !guestsData.hdmc) { message.warning('请选择活动') ...
下载依赖npm install react-redux --save npm isntall redux --save npm install redux-thunk创建redux文件目录在store.ts创建数据,创建Red...
useMemo把“创建”函数和依赖项数组作为参数传入 useMemo,它仅会在某个依赖项改变时才重新计算 memoized 值。这种优化有助于避免在每次...
import { action, makeObservable, observable } from 'mobx'; import { createContext, useContext } from 'react'; cla...
export const useDebounce = (value, delay = 1000) => { const [debounce, setDebounce] = useState(value); useEffect(() => { ...
<Col span={5}> <Form.Item label="身份证信息" name='sfzxx' rules={[{ validator: checkL...
后端响应的数据格式文件是由后台生成,传给前端是这样的文件流。前端请求Axios({ url:'xxx', method, responseType:&#...
<Input.Password style={{ height: '46px' }} placeholder='请输入密码' prefix={<UserImg />} /> const UserImg = (props...
/* * @Description: * @Author: pang bo * @Date: 2021-06-28 16:18:17 * @LastEditTime: 2021-06-28 17:20:07 * @LastEditors: Do no...
参考了vue-admin-template中的导出excel/* eslint-disable */ import { saveAs } from 'file-saver' import XLSX from 'xlsx&#...