vue method of introducing Element UI demand

In our actual project development, mostly using on-demand model introduced for development, then the specific how to operate it, there may be many newcomers silly you could not tell, will specifically mentioned below.

First we vue create democreate a project at this time we came out of this project is

At this point we enter the terminal

vue add element

  

Let us choose can see all introduced or the introduction of on-demand, on-demand at this time we have chosen to introduce, Import on demand

Then choose zh-CN, this time we can see here one more plugins folder, which has a element.js file, and the contents of a multi-main.js of import. Then if we look closely, you will find that babel.config.js also injected related content.

From the element's official website, we can see that in this way the introduction of on-demand, but this way vue add element of it, you do not need be individually configured in this manner.

 

So what element.js file is it? Let us a look, exactly how we needed to introduce it?

We can then directly be used directly in the page you, pay attention to which component to use element, then, we need to be introduced in this document, use.

 

Guess you like

Origin www.cnblogs.com/gitByLegend/p/10960504.html