Ant Desing Pro 2.0 (2) 신규 페이지

1. 참고 자료
  • 참조 ant design pro
  • 참조 DvaJs
  • 2. 디 렉 터 리 주소
  • Ant Desing Pro 2.0 (一) 프로젝트 초기 화
  • Ant Desing Pro 2.0 (2) 신규 페이지
  • Ant Desing Pro 2.0 (3) 설정 에이전트
  • Ant Desing Pro 2.0 (4) 과 서버 의 상호작용
  • 1. 페이지 추가
    1.1  src->pages->『     』NewPage->『  js  』NewPage.js   『  less  』NewPage.less
    
    1.2      
    //   NewPage.js  
    import React, { PureComponent } from "react";
    //   
    import PageHeaderWrapper from "@/components/PageHeaderWrapper";
    //   less
    import styles from "./NewPage.less";
    
    class NewPage extends PureComponent {
      render() {
        return (
          
            
    HELLO WORD!
    ); } } export default NewPage;
    //   NewPage.less  
    //         CSS Modules,    ,              antd       :
    //           antd              ,           ,         。
    @import "~antd/lib/style/themes/default.less";
    

    2. 경로 설정
    2.1  config->router.config.js->『47       』
    
      //         
      {
        path: "/newPage",
        icon: "file",
        name: "newPage",
        routes: [
          {
            path: "/newPage/newPage",
            name: "newPage",
            component: "./NewPage/NewPage"
          }
        ],
      },
      ![clipboard.png](/img/bVbppqB)
    
    2.2               ,  pro 2.x            。          
    
              ,         
     src->locales->zh-CN->menu.js->『11       』
    
    
    'menu.newPage': '    ',
    'menu.newPage.newPage': '    ',
    

    3. 효과 보기
    3.1    
    
    3.2         
    

    좋은 웹페이지 즐겨찾기