Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

与 umi max 集成后,组件无法使用 #597

Open
yudar1024 opened this issue Mar 13, 2025 · 0 comments
Open

与 umi max 集成后,组件无法使用 #597

yudar1024 opened this issue Mar 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@yudar1024
Copy link

重现步骤

在线示例链接:(必填)

步骤:
1.使用 pnpm create umi 生成基础代码,选择 ant design pro,其他选项使用 pnpm , taobao
2.添加一个任意页面

import {
  // 消息气泡
  Bubble,
  // 发送框
  Sender,
} from '@ant-design/x';
import React from 'react';

const messages = [
  {
    content: 'Hello, Ant Design X!',
    role: 'user',
  },
];

const Conversation: React.FC = () => {
  return (
    <div>
      <Bubble.List items={messages} />
      <Sender />
    </div>
  );
};

export default Conversation;

umirc 内容如下

import { defineConfig } from '@umijs/max';

export default defineConfig({
  antd: {},
  access: {},
  model: {},
  initialState: {},
  request: {},
  layout: {
    title: 'AI 模型超市',
  },
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      name: '首页',
      path: '/home',
      component: './Home',
    },
    {
      name: '权限演示',
      path: '/access',
      component: './Access',
    },
    {
      name: ' CRUD 示例',
      path: '/table',
      component: './Table',
    },
    {
      name: ' 第一个页面',
      path: '/fistpage',
      component: './firstpage',
    },
    {
      name: 'AI Conversation',
      path: '/conversation',
      component: './conversation',
    },
  ],
  styledComponents: {},
  npmClient: 'pnpm',
});

当前行为

Image

预期行为

正常显示组件

上下文

No response

版本

1.05

您在哪些浏览器上遇到了这个问题?

Chrome

@yudar1024 yudar1024 added the bug Something isn't working label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant