You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the process of internal desktop applications development, many different design specs and
implementations would be involved, which might cause designers and developers difficulties
and duplication and reduce the efficiency of development.
After massive project practice and summaries, Ant Design, a design language for background
applications, is refined by Ant UED Team, which aims to{' '}
uniform the user interface specs for internal background projects, lower the unnecessary
cost of design differences and implementation and liberate the resources of design and
front-end development
您遇到的错误信息 react__WEBPACK_IMPORTED_MODULE_1___default(...).useId is not a function 通常是由于 React 版本不匹配或库版本不兼容导致的。useId 是 React 18 中引入的一个新 Hook,因此确保您使用的是 React 18 或更高版本。
以下是一些可能的解决方案:
检查 React 版本:
确保您的项目中安装的 React 和 React DOM 版本都是 18 或更高。您可以在 package.json 中查看并更新这些依赖项。
重现步骤
在线示例链接:(必填)
这是我的使用实例:
import React, { useState, useEffect, Fragment, Component } from 'react';
import { Welcome, Sender, ThoughtChain } from '@ant-design/x';
import { Drawer, Button, Card, Typography } from 'antd';
import { CodeTwoTone, CheckCircleOutlined, MoreOutlined } from '@ant-design/icons';
const { Paragraph, Text } = Typography;
import styles from './index.less';
const customizationProps = {
title: 'Thought Chain Item Title',
description: 'description',
icon: ,
extra: <Button type="text" icon={} />,
footer: Thought Chain Item Footer,
content: (
In the process of internal desktop applications development, many different design specs and
implementations would be involved, which might cause designers and developers difficulties
and duplication and reduce the efficiency of development.
After massive project practice and summaries, Ant Design, a design language for background
applications, is refined by Ant UED Team, which aims to{' '}
uniform the user interface specs for internal background projects, lower the unnecessary
cost of design differences and implementation and liberate the resources of design and
front-end development
),
};
class ErrorBoundary extends Component {
constructor(props) {
super(props);
this.state = { hasError: false };
}
static getDerivedStateFromError(error) {
// 更新 state 使下一次渲染能够显示降级后的 UI
return { hasError: true };
}
componentDidCatch(error, errorInfo) {
// 你同样可以将错误日志上报给服务器
console.error('1111111111', error, errorInfo);
}
render() {
if (this.state.hasError) {
// 你可以自定义降级后的 UI 显示
return
Something went wrong.
;}
return this.props.children;
}
}
const items = [
{
title: 'Thought Chain Item Title',
description: 'description',
extra: <Button type="text" icon={} />,
},
{
title: 'Thought Chain Item Title',
description: 'description',
extra: <Button type="text" icon={} />,
},
{
title: 'Thought Chain Item Title',
description: 'description',
extra: <Button type="text" icon={} />,
},
{
title: 'Thought Chain Item Title',
description: 'description',
extra: <Button type="text" icon={} />,
},
];
const AIInput = (props) => {
const [visible, setVisible] = useState(true);
useEffect(() => {}, []);
return (
<Sender
className={styles.aiInput}
submitType="enter"
placeholder="请一句话概括你的需求~比如:我想实现一个抽奖组件"
onSubmit={(editor) => {
if (editor === '帮我实现一个点赞组件') {
setVisible(true);
} else {
setVisible(false);
}
console.log(editor, '==editor, value');
}}
/>
<CodeTwoTone onClick={() => setVisible(true)} />
<Drawer
open={visible}
title="AI 调用结果"
placement="right"
onClose={() => setVisible(false)}
width={400}
>
<Card style={{ width: 500 }}>
);
};
export default AIInput;
当前行为
No response
预期行为
No response
上下文
No response
版本
1.0.6
您在哪些浏览器上遇到了这个问题?
Chrome
The text was updated successfully, but these errors were encountered: