可能会有以下两个错误:

  1. 缺少依赖项

解决方案:

在终端中运行以下命令:

npm install antd --save
  1. 缺少类型定义文件

解决方案:

在终端中运行以下命令:

npm install @types/antd --save-dev

然后,将代码更改为:

import { DatePickerProps } from "antd/lib/date-picker/interface";
interface QDatePickerProps extends DatePickerProps {
  value?: string;
}
下面的代码报错,怎么改
import {DatePickerProps} from

原文地址: https://www.cveoy.top/t/topic/syr 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录