[Summer vacation] Vue component programming

A component is just a brick, move it wherever you need it

1. What is a component?

A collection of codes and resources (html/css/js....) used to achieve partial (specific) functional effects

Why do you need components?

Because the function of an interface is very complex

What is the role of components?

       The role of components is to reuse codes, simplify project codes, and improve operational efficiency

        What are modules?

                        Understanding: A JS program that provides specific functions is generally a JS file (because CSS and HTML do not require modules, so we generally refer to modules as JS files)

        Why use modules?

                Because many JS files are very complicated

        What is the function of the module?

                Reuse JS, simplify the writing of JS, and improve the efficiency of JS operation                

       

2. Compared with the previous traditional programming, what are the advantages of component programming?

Because of the lack of formal organizational form, this is why more and more developers use JavaScript frameworks

3. What is modularization? Componentization?

Modularity : It can be understood that the JS in the application is written in modules, then this application is a modular application

Componentization : When the functions in the application are written in a multi-component manner , then the application is a componentized application

4. What is a non-single-file component?

                A file contains n components

           

5. Steps to use components in Vue:

6.Vuecomponent  

Every time Vue.extend is called, a brand new VueComponent is returned

7. What is the difference between Vue and VueComponet?

First: el can be written in Vue but not in VueComponet

 Second: The data configuration object in Vue can also be written as a function

8. What is scaffolding?

The scaffolding we usually talk about in Vue project development is Vue CLI (Command Line Interface)

Supongo que te gusta

Origin blog.csdn.net/IDApprentice/article/details/126427493
Recomendado
Clasificación