Vue plug-in reference (element UI / SASS)

Time:2022-5-5

element-ui

Installation: NPM I element UI – S

/* main.js */
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

sass

  1. Install the specified version: NPM install sass loader — save dev
  2. Install node sass (specified version): NPM I – D node- [email protected]

Sass load uninstall: NPM uninstall sass load

If an error is reported:
gyp verb check python checking for Python executable “python2” in the PATH
gyp verb check python checking for Python executable “python” in the PATH

MainlyWindows platform lacks compiling environment

  1. Run first: NPM install – G node gyp
  2. Then run NPM install — global — production windows build tools to automatically install the cross platform compiler: gym
    If you still report an error, see if the version corresponds to the previous version

Vue plug-in reference (element UI / SASS)

Vue plug-in reference (element UI / SASS)

Install the specified version
npm i -D [email protected]
npm i -D [email protected]

After installation, it should be used in build / webpack base. In conf.jsde, insert the following code into the rules of the module to add the configuration:

{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
},

Vue plug-in reference (element UI / SASS)

Last rerun