当前位置: 首页> 健康> 知识 > 给个网站能看的_哈尔滨疫情轨迹_网络推广的目标_2023引流软件

给个网站能看的_哈尔滨疫情轨迹_网络推广的目标_2023引流软件

时间:2025/7/9 11:41:36来源:https://blog.csdn.net/qq_39427511/article/details/143328211 浏览次数:0次
给个网站能看的_哈尔滨疫情轨迹_网络推广的目标_2023引流软件

各种安装:

node.js

https://nodejs.org/zh-cn/

安装完node.js 可以使用npm,npm跟随nodejs一起安装

node --version  查看已安装node.js的版本,确认是否安装nodejs
npm -v 查看npm版本npm install <Module Name> 安装模块
npm install -g <Module Name>    加-g全局安装<>模块npm init vite@latest xxx(project name)  快速创建前端项目npm run dev 启动

修改镜像源

修改镜像源为淘宝镜像:输入以下命令并回车

npm config set registry [https://registry.npmmirror.com](https://registry.npmmirror.com)

修改镜像源为腾讯镜像源:输入以下命令并回车

npm config set registry [http://mirrors.cloud.tencent.com/npm/](http://mirrors.cloud.tencent.com/npm/)

修改镜像源为华为镜像源:输入以下命令并回车

npm config set registry [https://mirrors.huaweicloud.com/repository/npm/](https://mirrors.huaweicloud.com/repository/npm/)

pnpm 安装

速度快、节省磁盘空间的软件包管理器

npm install -g pnpm

scss

css预处理语言, 样式

安装:

  npm install sass --save

Element Plus

安装:

  npm install element-plus --save

使用:

import ElementPlus from 'element-plus'  导入element-plus包
import 'element-plus/dist/index.css' 导入样式createApp(App).use(ElementPlus).mount('#app')  使用

路由的配置

作用:URL地址和页面的适配

安装命令

npm install vue-router@next --save

使用步骤:

1安装路由包

2新建页面

示例代码:

import {createRouter,createWebHistory} from 'vue-router'
import HomePage from "./views/HomePage.vue"
import LoveFlower from "./views/LoveFlower.vue"  
const router = createRouter({history: createWebHistory(),routes: [{ path: '/', component: HomePage },{ path: '/loveflower', component: LoveFlower },   ],
})
export default router

vuex

Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式 + 库

安装:

npm install vuex --save

使用:

  1. src目录下新建文件夹vuex,新建文件index.ts
  2. main函数里导入
import store from './vuex/index//挂载vuexapp.use(store)

ecahrts

安装

npm install echarts --save

教程官网:

https://echarts.apache.org/zh/index.html

axios

axios拦截器

安装

npm install axios --save
关键字:给个网站能看的_哈尔滨疫情轨迹_网络推广的目标_2023引流软件

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: