Code Monkey home page Code Monkey logo

vue's Introduction

vue项目demo

安装依赖可能遇到的问题及解决方法

cnpm i element-ui -S

会有版本问题,未解决

// 下载
cnpm install --save less less-loader

// 卸载
npm uninstall less-loader
报错最终解决办法
  • package.json将sass改成下面这两个版本,这里用的是sass而不是node-sass,
  • 将目录下的node_modules删除(包含文件太多了删的很慢,改名更快,弄好之后再删除)
  • 然后npm install 或 cnpm install
    "sass": "1.26.2",
    "sass-loader": "^7.3.1"

使用 在这里插入图片描述

其他可能的解决办法

会一直报错,网上的解决办法是安装指定较低的版本,或者各种卸载重装,但我的还是报错

// 卸载node-sass
npm uninstall node-sass

// 安装node-sass
npm install [email protected]

// 卸载sass-loader
npm uninstall sass-loader

// 安装sass-loader
cnpm install [email protected] --save-dev
cnpm install axios --save

6 eslint常见问题

6.1 error Strings must use singlequote quotes

单双引号问题,将双引号改为单引号 其他解决方法,修改eslintrc.js配置 在这里插入图片描述

7 导入echart

安装教程、使用教程demo

npm install echarts --save

echart版本过高,报错“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘

卸载

npm uninstall echarts

安装

cnpm install [email protected]

全局使用

// 引入echarts
import echarts from 'echarts'
Vue.prototype.$echarts = echarts

安装

npm install --save nprogress

使用

//导入
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

router.beforeEach((to, from, next) => {
  NProgress.start()
  next()
})

router.afterEach(() => {
  NProgress.done()
})

vue's People

Contributors

iamk123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.