摘要: 小众需求,删除Cascader级联选择框option的子项,实现如下: // CascaderOption 为自定义结构,非官方 const transformOptions = (opts: CascaderOption[]) => { return opts.map((opt: Cascader 阅读全文
posted @ 2025-07-09 15:27 维多利亚的巴黎世家 阅读(17) 评论(0) 推荐(0)
摘要: const fs = require('node:fs/promises'); const path = require('node:path'); async function batchRenameExtension(directory, oldExtension, newExtension, 阅读全文
posted @ 2025-03-18 18:17 维多利亚的巴黎世家 阅读(18) 评论(0) 推荐(0)
摘要: 将github的ssh链接改为https链接 git config --global url."https://github.com/".insteadof "ssh://git@github.com/" 阅读全文
posted @ 2024-11-02 11:04 维多利亚的巴黎世家 阅读(131) 评论(0) 推荐(0)
摘要: 以下来自官方文档: useEffect(() => { map = new window.google.maps.Map(ref.current!, { center: { lat: , lng: }, zoom: 16, streetViewControl: false, fullscreenCo 阅读全文
posted @ 2024-09-20 09:16 维多利亚的巴黎世家 阅读(128) 评论(0) 推荐(0)
摘要: 函数防抖(debounce),就是指触发事件后,在 n 秒内函数只能执行一次,如果触发事件后在 n 秒内又触发了事件,则会重新计算函数延执行时间(在这里和函数节流区分一下,函数节流是在触发完事件之后的一段时间之内不能再次触发事件)。 实现: //创建防抖函数 import { useRef } fr 阅读全文
posted @ 2024-05-31 19:48 维多利亚的巴黎世家 阅读(294) 评论(0) 推荐(0)
摘要: 简易模式 import axios from 'axios' const axiosInstance = axios.create({ baseURL: baseUrl, timeout: 1000 * 60 * 1, responseType: 'json', insecureHTTPParser 阅读全文
posted @ 2024-04-23 17:59 维多利亚的巴黎世家 阅读(74) 评论(0) 推荐(0)
摘要: 最近在做一个electron项目时,需要在node环境使用axios请求,我试图向API发出请求,但我得到了这个错误: AxiosError: Parse Error: Invalid header value char 问题在于API返回的响应头中的值包含不允许的字符。 Node.js的HTTP解 阅读全文
posted @ 2024-04-23 16:44 维多利亚的巴黎世家 阅读(590) 评论(0) 推荐(0)
摘要: import { Form, Input, Button } from 'antd'; const MyForm = () => { const onFinish = (values) => { console.log('Form values:', values); }; const valida 阅读全文
posted @ 2023-11-30 17:14 维多利亚的巴黎世家 阅读(98) 评论(0) 推荐(0)
摘要: import React, { useState } from 'react'; import 'antd/dist/antd.css'; import './index.css'; import { MinusCircleOutlined, PlusOutlined } from '@ant-de 阅读全文
posted @ 2023-09-04 17:54 维多利亚的巴黎世家 阅读(453) 评论(0) 推荐(0)
摘要: const rowSelection = userInfo.isManager == 1 || userInfo.isSuperAdmin == 1 ? { onChange: (selectkeys) => { setSelectedRowKeys(selectkeys) }, } : { onC 阅读全文
posted @ 2023-07-20 15:55 维多利亚的巴黎世家 阅读(774) 评论(0) 推荐(0)