V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
qazsewong
V2EX  ›  问与答

antd pro 下面如何调用 antd 下的组件

  •  
  •   qazsewong · 2021-08-02 13:51:13 +08:00 · 783 次点击
    这是一个创建于 970 天前的主题,其中的信息可能已经有所发展或是发生改变。
    //使用 NPM 创建 新的项目
    npx create-umi myapp
    
    //选择
    ->ant-design-pro 
    ->TypeScript
    ->simple
    
    //安装 umijs
    npm install --save-dev @umijs/preset-ui
    
    //成功运行
    
    //添加新的页面,导入 Tag 组件
    import { Tag } from 'antd';
    
    //编辑 return
     return (
        <PageContainer content="这是一个新页面,从这里进行开发!" className={styles.main}>
          <Tag>新增的 Tag</Tag>
          <div
            style={{
              paddingTop: 100,
              textAlign: 'center',
            }}
          >
            <Spin spinning={loading} size="large" />
          </div>
        </PageContainer>
      );
    //报错 GG
    

    fpsiSU.jpg

    搜不到怎么处理,请教怎么在 ant-design-pro 中使用 antd 的组件

    2 条回复    2021-08-02 17:04:23 +08:00
    rsyjjsn
        1
    rsyjjsn  
       2021-08-02 14:41:40 +08:00
    more1sec
        2
    more1sec  
       2021-08-02 17:04:23 +08:00
    import ProTable from '@ant-design/pro-table';
    import { Modal } from 'antd';

    我这样没问题啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5334 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 07:10 · PVG 15:10 · LAX 00:10 · JFK 03:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.