0에서 1까지 vue2 프로젝트 세부 단계 및 오류 솔루션 만들기

1. vue2 프로젝트를 만드는 단계:

1. 노드 환경 확인

node -v

2. 프로젝트 이름 만들기

vue create 项目名称

첫 번째 기본 기본 구성
수동으로 기능 사용자 정의 구성 선택

? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, Linter
? Choose a version of Vue.js that you want to start the project with 2.x
? Pick a linter / formatter config: Basic
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No
$ cd kr
$ npm run serve

이 단계는 생성이 성공했음을 의미합니다! 그냥 명령을 실행

둘, elementUI 컴포넌트

1. 공통 레이아웃

<template>
  <div class="about">
    <el-container>
      <el-header>Header</el-header>
      <el-container>
        <el-aside width="200px">Aside</el-aside>
        <el-main>Main</el-main>
      </el-container>
      <el-footer>Footer</el-footer>
    </el-container>
  </div>
</template>
<style>
.el-header,
.el-footer {
    
    
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
    
    
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
  height: 500px;
}

.el-main {
    
    
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body>.el-container {
    
    
  margin-bottom: 40px;
}
</style>

여기에 이미지 설명 삽입

추천

출처blog.csdn.net/weixin_43778617/article/details/130681940