Use graphics to add element-UI dependencies on recommendations

Vue scaffolding can quickly generate the architecture underlying a Vue project. A. Install 3.x Vue scaffolding: NPM install -g@vue /cli B. Create a Vue project based on 3.x scaffolding: 1). Create a Vue project using commands Command: Vue create my-project Select Manually select features Check features can be checked with Spaces. N ESLint Select: ESLint + Standard config When to verify ESLint syntax: Lint on save Babel, postCSS and other configuration files how to place: In dedicated config files whether to save as a template: n Tool installation package: NPM 2). Create a Vue project based on the UI Command: Vue UI configures the project information in the create project page that opens automatically. NPM install -g@vue /cli-init Vue init webpack my-project C Node_modules: dependency package directory public: static resource directory SRC: source directory SRC /assets: resource directory SRC /components: Component directory SRC/app. vue: root component SRC /main.js: entry js SRC /router.js: route js babel.config.js: Babel configuration file.eslintrc.js:Copy the code

Make a few important points.

Manual configuration is selected by default

The function is to choose the first Babel Router vuex Linter/Formatter and the last one to use the configuration file.

The third configuration is EsLint+Standard Config

Vue scaffolding custom configuration when running NPM Run Server project port number and help you automatically open web pages.

A. Use package.json. [Not recommended] "vue":{"devServer":{"port":"9990", "open":true}} B. Js module.exports = {devServer:{port:8888, open:true}}Copy the code

The basic use of element-UI is the first step to install dependencies, and the second step to introduce related files in main

NPM install element-ui -s B Use: import ElementUI from "element-ui"; import "element-ui/lib/theme-chalk/index.css"; Vue.use(ElementUI)Copy the code

Use graphics to add element-UI dependencies on recommendations

First create a project as described above, then go to Plugins - Add Plugins - Search vue-cli-plugin-Element and install it. Choose import on demand. okCopy the code