Reference Element-UI component library in Vue2.0

In Vue2.0, the Element-UI component library

Element-ui is a set of Vue 2.0-based desktop component libraries that are hungry team developed.

Official website: http://element.eleme.IO/

installation

 NPM I ELEMENT- UI -S   
Quote complete Element-Ui

Import Elementui from ‘Element-Ui’; import ‘ Element-ui / lib / itme-chalk / index.css’; Vue.use (Elementui);
 Need not to note that the style file needs to be introduced separately.   If an error is reported, configure file_loader in WebPack.config.js. You can add the following configuration items directly in the Rules array: 

{test: /\.(EOT|SVG|TTF|Woff|woff2) (\?\s* )? $ /, loader: ‘file-loader’}

  1 is introduced on demand  1, install Babel-Plugin -component plug-in: 
NPM INSTALL Babel-Plugin-Component -D

2, modify .babelrc configuration file

will
  {"Presets":[["" "{" Modules ": false}]," stage-3 "]}  

{“prespates”:[[“” “, {” Modules “: false}],” plugins “:[[Component “, {” il “:” Element-UI “,” StylelibraryName “:” Theme-chalk “}]]}
   3, if an error is reported, Configure File_Loader in WebPack.config.js. 
Can directly increase the following configuration items directly within the rules array:

{test: /\.(Eot|Svg|tf|woff|Woff2) (\? \ S *)? $ /, Loader: ‘file-loader’}
   4, using components 

Import {button, select} from ‘element-ui’; Vue.component (Button.Name, Button); Vue.component (select.Name, SELECT); / * or Writing * Vue.use (Button) * Vue.use (select) * /

summarizes
  The above is a method of quote the Element-UI component library presentation in Vue 2.0, I hope that if you have any questions, please leave a message, small The newspaper will reply to everyone in time. Thank you very much for your support of Tumi Cloud Website!  
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment