adjz057
V2EX  ›  问与答

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

  •  
  •   adjz057 · Aug 2, 2021 · 1489 views
    This topic created in 1769 days ago, the information mentioned may be changed or developed.
    //使用 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 replies    2021-08-02 17:04:23 +08:00
    rsyjjsn
        1
    rsyjjsn  
       Aug 2, 2021
    more1sec
        2
    more1sec  
       Aug 2, 2021
    import ProTable from '@ant-design/pro-table';
    import { Modal } from 'antd';

    我这样没问题啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2874 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 05:50 · PVG 13:50 · LAX 22:50 · JFK 01:50
    ♥ Do have faith in what you're doing.