Principle analysis of on-demand loading
brief introductionUnderstand the basic knowledge of Babel plug-in and the internal principle of on-demand loading. I'm no longer afraid of the interviewer asking me the implementation principle of on-demand loading.import { Button } from 'element-ui'How did it becomevar Button = require('element-ui/lib/button.js')
require('element-ui/lib/theme- ...
Posted by TheVoice on Wed, 09 Feb 2022 09:13:07 +0100
qiankun 2.x runtime sandbox source code analysis
brief introductionThe implementation principle of JS sandbox and style sandbox in qiankun framework is explained in detail from the source code level.prefaceThe word sandbox must be familiar to everyone. Even if it is strange, it will not be so strange after reading this articleSandboxie, also known as sandbox, is a virtual system program that ...
Posted by php new bie on Mon, 07 Feb 2022 05:09:38 +0100
[front end] ES6 Promise object
Promise meaning
Promise is a solution for asynchronous programming. Promise is simply a container that holds the results of an event (usually an asynchronous operation) that will not end in the future. Syntactically speaking, Promise is an object from which you can get the message of asynchronous operation. Promise provides a unified API, and ...
Posted by AliceH on Sat, 05 Feb 2022 10:49:52 +0100
Wechat applet like function
Recently, I was working on a simple posting applet, which involves the like function. At first, I thought it was very simple. Later, I found that the difficulty lies in how to record the user's like status of the article, so as to avoid the failure of the like status when I open it next time. Let's start with the renderings: After Baidu for h ...
Posted by Stickybomb on Thu, 03 Feb 2022 00:32:19 +0100
How to write more beautiful and clean JavaScript conditional statements
Transferred from: Micro reading https://www.weidianyuedu.com/content/2317459000818.html
When using JavaScript, we often have to write a lot of conditional statements. Here are five tips for writing cleaner and more beautiful conditional statements.
1. Use array Includes to handle multiple conditions
Take chestnuts for example:
// Condit ...
Posted by burge124 on Tue, 01 Feb 2022 12:21:48 +0100
ES6 new feature 5 -- > value
Representation of values
New writing of binary representation: prefix 0b or 0b.
console.log(0b11 === 3); // true
console.log(0B11 === 3); // true
New writing of octal notation: prefix 0o or 0o.
console.log(0o11 === 9); // true
console.log(0O11 === 9); // true
constant
Number. The epsilon property indicates the difference between 1 and t ...
Posted by torvald_helmer on Tue, 01 Feb 2022 09:08:27 +0100
ES6 new feature 6 -- > object
Object Literal
Concise representation of attributes
ES6 allows the attributes of objects to write variables directly. At this time, the attribute name is the variable name and the attribute value is the variable value.
const age = 12;
const name = "Amy";
const person = {age, name};
person //{age: 12, name: "Amy"}
//Equivalent to
const per ...
Posted by darknuke on Tue, 01 Feb 2022 01:29:05 +0100
Dark horse headline project - Vue-day9 - Article Details module, follow and cancel follow, praise and like functions
Article details module
Configure article detail routing
Objective: configure article detail component routing
Routing configuration
import Detail from '@/views/detail/index.vue'
{ path: '/detail', component: Detail }
Control route jump
<!-- van-cell The component supports route jump, similar to router-link Tagged to attribute - ...
Posted by pauleth on Sun, 30 Jan 2022 21:53:38 +0100
Use of foreach, map, filter, reduce, find, some and every methods in js array
1, Array prototype. forEach()
No return value This method traverses each item in the array and executes the given function once for each element of the array. The forEach method cannot modify array items, but the original array can be modified through the index of the array.
Sample code
const arr = [1,2,3]
arr.forEach((value,index,array) ...
Posted by chronister on Fri, 28 Jan 2022 07:55:43 +0100
odoo technology development white paper Part III Chapter 11 abstract fields
Reprint: http://book.odoomommy.com/chapter3/README11.html
Chapter 11 abstract fields
Abstract field is the abstract basis of field components used in all views. These are common components in views, especially forms and tree lists.
The main function of the field component is to render the visual elements of the current value of the field in ...
Posted by sandsquid on Fri, 28 Jan 2022 06:32:22 +0100