Handwritten a simple vue response to take you to understand the principle of response

Vue2.x-response principle 1. Application of defineproperty In vue2 X response uses defineProperty for data hijacking, so we must have a certain understanding of it. Let's first understand its usage. Here, we use defineProperty to simulate data in Vue. <body> <div id="app"></div> <script> // Simulate Vu ...

Posted by introvert on Sun, 02 Jan 2022 19:31:52 +0100

ES6 you understand, but can you really use it? (here are 10 points to test whether you have been recruited)

preface The following is a summary of some ES6 knowledge points commonly used in my development, which does not represent all. It should be noted that the js syntax after ES5 is collectively referred to as ES6 (naming ES7, es8, etc. is nonstandard). 1. Deconstruction assignment In a program, we often take value operations, such as taking val ...

Posted by Matth_S on Sun, 02 Jan 2022 17:27:53 +0100

Front and rear end separation

How to send HTTP requests with js ajax (Asynchronous Javascript And Xml), commonly known as ajax, refers to sending HTTP requests through js and processing the resulting responses There are many kinds of ajax, and we can use one of them: XMLHttpRequest object for processing var xhr = new XMLHttpRequest(); xhr.open("GET". " /user-list.json"); ...

Posted by Welling on Sun, 02 Jan 2022 17:09:46 +0100

Spreadsheet actual combat bag: skillfully using sparse array is the key!

We described it in detail earlier Sparse arrays , and how the sparse array can exert its maximum effect in the front-end spreadsheet in the actual project. This time, we will introduce the specific application of sparse array in the front end from the practical application.We all know that in Javascript, the sparse matrix is created by construc ...

Posted by laduch on Sun, 02 Jan 2022 14:13:25 +0100

Why is there always an error in the countdown you write

In daily requirements, we often need to write the countdown function. But sometimes we find that the speed is different. What's going on?Let's think about it with questions. Should we use setInterval or setTimeout to write the countdown function?Suppose we use setInterval, we might write thislet interval = 1000 let countdown = () => { / ...

Posted by beesgirl713 on Sun, 02 Jan 2022 12:57:41 +0100

Front end error log collection

Front end error log collection 1. Collection content User information: current status, permissions, etcBehavior information: interface path, executed operation, etcException information: error stack, error description, configuration information, etcEnvironmental information: equipment model, identification, operating system, etc fieldtypedes ...

Posted by bailo81 on Sun, 02 Jan 2022 08:56:52 +0100

Six methods of communication between Svelte components

The main challenge of designing user interfaces using components is to manage the application state on different components. Svelte provides a powerful ability to transfer data in components. "Great communication begins with connection." — Oprah Winfrey Oprah Gail Winfrey (English: Oprah Gail Winfrey, January 29, 1954 -), born in Miss ...

Posted by Traduim on Sun, 02 Jan 2022 03:48:25 +0100

JS learning notes -- basic introduction and use of try finally exception mechanism

premise Usually, we use the try {} catch {} mechanism to catch error exceptions in the code. Today, when looking at the project, we suddenly find that try {} finally {} is used to catch exceptions. This method has not been used much before, so we also checked the data and conducted in-depth research. try finally (1) Grammar Another importan ...

Posted by lanbor on Sat, 01 Jan 2022 20:42:17 +0100

JavaScript: basic syntax

1, Basic input and output 2, Variable 2.1 general Understanding: a variable is a container for storing data. You can access and modify data through the variable name. Essence: a piece of space for storing coarse data applied by a program in memory. 2.2 use Before using variables, you need to go through two steps: Declaration and as ...

Posted by rich86 on Sat, 01 Jan 2022 18:33:31 +0100

vue2.x knowledge points

note Scaffold environment structure: |-— node_modules |- public | |—— favicon.ico tab Icon | |—— index.html main page |- src || - assets main page | | |-logo.png || - components store components | | |-HelloWorld.vue | |—— App.vue summarize all components | |—— main.js entry file | |—&mdash ...

Posted by Nile on Sat, 01 Jan 2022 14:56:53 +0100