[Summer vacation] Some little knowledge in the Vue framework (continuously updated)

785fd7a6f9db4a629381ca63cf54f8fa.png

 The role of template in the Vue framework actually plays a role of separation , because it ensures that the code inside is not a script or a style~

expand:

        Params translates to the meaning of parameters

---------------------------------------------------------------------------------------------------------------------------------

local general personal use

Network allows colleagues under the same LAN to enter addresses and use

 expand:

        What is a local area network?

               LAN is a type of network. LAN is a regional network formed in a local area. It is divided into wireless LAN and limited LAN (will be summarized later)

        One of the wireless local area network standards is called IEEE 802.11, commonly known as WIFI

---------------------------------------------------------------------------------------------------------------------------------

acf3d06c80264c9fb63c350b928232b9.png

First: Expanded with a red frame

 If it conforms to the npm specification, there must be a package.json file, which is the package specification  

1f9544772e064f9699c2ec0c5bef58c6.pngWhat kind of dependencies are used in this piece?

Second: The files not expanded by the red box are package version control files used to lock the specified installation version

--------------------------------------------------------------------------------------------------------------------------------        65d8b1bd1cb14354b91ee41ce496070a.jpeg

 Every completed project has a README, which is used to introduce the functions of this project, such as some buttons, details in the interface, etc.


-------------------------------------------------- -------------------------------------------------- ----------------------------
Press the ~ key under Ctrl and Esc to quickly open the terminal 

d5db67bb4555454faa6571fa58f51b79.png

assets put some static resources 

1d95ee44729f419fbf78f696d73c5efd.png

--------------------------------------------------------------------------------------------------------------------------------

What is scaffolding?

The full name of CLI (Command-Line Interface is translated as command line interface, commonly known as scaffolding)

Vue CLI is a complete system for rapid development based on Vue.js. It standardizes the tools in the Vue ecosystem, so that we can focus on writing applications without spending time on configuration issues.

To put it bluntly, Vue scaffolding is used to quickly generate the basic structure of Vue projects

--------------------------------------------------------------------------------------------------------------------------------

What is syntactic sugar?

Syntactic sugar, also translated as sugar-coated grammar, is a term invented by British computer scientists

                This syntax is convenient for programmers to use without affecting the functionality of the language.

The role of syntactic sugar:

                Increase the readability of the program and reduce the chance of program code errors

---------------------------------------------------------------------------------------------------------------------------------

image: image

mutate: The meaning of mutation can also be the meaning of change

 slot:

5df09ceab84b457786f99e580a097765.png

--------------------------------------------------------------------------------------------------------------------------------

The role of template is a template placeholder 

template: It can wrap elements without generating real DOM elements

--------------------------------------------------------------------------------------

patch introduction:

What is a patch?

                patch itself has the meaning of patching, patching, etc. but actually,

                patch can also be called the patching algorithm. When rendering the real DOM through it, it does not overwrite the original DOM violently, but compares the differences between the old and new VNodes, and then finds out the nodes that need to be updated according to the comparison results.

          

What is the function of patch?

The core part of virtual DOM is patch, which can be modified on the existing DOM to achieve the purpose of updating the view, and can render VNode into a real DOM.

What is the reason for using patch? Or why is patch needed?

Because the execution speed of DOM operations is not as fast as that of JavaScript operations, the patching algorithm is used to calculate the nodes that really need to be updated, minimizing DOM operations

--------------------------------------------------------------------------------------------------------------------------------

What is render? (to be added)

--------------------------------------------------------------------------------------------------------------------------------

Execution order:

In the scaffolding, the import statements are all summarized to the top in the order of writing the code

--------------------------------------------------------------------------------------------------------------------------------

v-bind (abbreviation: ) can dynamically read data, and identify whether to read it as a string. It can be parsed as JS code  

If there is no: in it, it will be recognized as a string 

`` This is the template string

Variables mixed in the template string can be parsed using curly braces

--------------------------------------------------------------------------------------------------------------------------------

Multiple groups of key values ​​are separated by &

Component library address:

--------------------------------------------------------------------------------------------------------------------------------

                   The prototype object of the prototype object of the component instance object is equal to the prototype object of vue

How to understand the component instance object?

It is a small VM, first: data must be written as a function, and second cannot be written as an el configuration item

                                         

Xxxx.vue ends with single-file components

 

 

Guess you like

Origin blog.csdn.net/IDApprentice/article/details/126485601