三 Vue前端项目构建

三 V u e 前端项目构建 三 Vue前端项目构建 Vue前端项目构建

1.创建进入项目

npm install vue-router@4 --save
npm install vuex@4.0.2 --save
npm install qs@6.10.1
npm install sass-loader@10.2.0 --save-dev
npm install node-sass@6 --save-dev
npm install element-plus@1.2.0-beta.3 --save
npm install vue-router  --save

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

cd .\my_vue_pro\
npm  run serve

在这里插入图片描述

2.UI框架-`element-plus`

官方教程:https://element-plus.org/zh-CN/guide/quickstart.html#%E5%AE%8C%E6%95%B4%E5%BC%95%E5%85%A5

npm install element-plus@1.2.0-beta.3 --save

在这里插入图片描述

在这里插入图片描述

import {
    createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'

const app = createApp(App)

app.use(ElementPlus)
app.mount('#app')
<template>
  <div class="hello">
    <el-button type="primary">Primary</el-button>
  </div>
</template>

<script>
export default {
   
  name: 'HelloWorld',
  props: {
   
    msg: String
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
   
  margin: 40px 0 0;
}
ul {
   
  list-style-type: none;
  padding: 0;
}
li {
   
  display: inline-block;
  margin: 0 10px;
}
a {
   
  color: #42b983;
}
</style>

在这里插入图片描述

3. 路由库-vue-router

npm install vue-router  --save

在这里插入图片描述

App.vue

<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>


export default {
   
  name: 'App',
}
</script>

<style>

</style>

FrameView.vue

容器控件–https://element-plus.org/zh-CN/component/container.html

<template>
<div class="frame">
  <el-container class="frame-container">
    <!-- 头部区域 -->
    <el-header class="header">
      <a href="/" class='brand'><strong>AI</strong>平台</a>
      <div class="header-content">
        <div class="greet">欢迎</div
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值