Map and WeakMap explanation and course selection component development
Map and WeakMap
Characteristics and creation of Map type
To understand Map, first look at the objects. Compare the objects to learn about Map.
For an object, the key in the object can only be a string!!
let obj = {
1:'lihuina',
"1":"lhn"
}
console.log(obj); //{1: "lhn"}
When defining an object, although ...
Added by networkthis on Sat, 22 Jan 2022 03:47:09 +0200
IO operation of client JavaScript
1. Local disk IO - "click" to read
1.1 create FileReader object
The FileReader object is used for read operations in IO operations
let fd = new FileReader()
1.2 using FileReader object to read files
fd.readAsArrayBuffer() reads a file asynchronously and returns ArrayBuffer fd.readAsBinaryString() reads a file asynchronously ...
Added by chrispos on Sat, 22 Jan 2022 02:23:42 +0200
Face detection using Javascript and OpenCV
Hello, we will study how to detect faces from images using conventional Javascript, HTML Canvas and OpenCV libraries. Let's look at some examples first, and then we'll continue to write code and explain If you need to view the complete code base, just get my github repositoryGitHub - rajeshpachaikani/face-detection-opencv-js: Simple demonstrati ...
Added by nova912 on Sat, 22 Jan 2022 02:06:37 +0200
vue editor web shop decoration rapid development template npm vue jsonschema form
This editor is extracted from the open source project: Vue JSON Schema Form The Editor section It is extracted to facilitate secondary development, use and learning Original author: Liu Jun Official website: https://vue-json-schema-form.lljj.me/
Primary directory structure: Route - route Vue route directory │ └─routes └─views └─editor Table ...
Added by dexter_sherban on Sat, 22 Jan 2022 01:20:07 +0200
react3.0 - component, component value transfer, Context, component life cycle, routing, matching mode
react3.0
The variable name of global import can be customized, and the specified variable name is used for on-demand import
Review component value transfer:
Father to son, son to father:
review.js
import React from "react"
// When transferring values, pay attention to the problem of this pointing. There are three solutions: 1 Use bind in t ...
Added by edtlov on Sat, 22 Jan 2022 00:40:37 +0200
Front end H5 interview question Js: what are the common methods of JavaScript strings?
1, Preface:
The common operation methods of strings can be summarized as add, delete, modify and query. You need to know that once a string is created, it is immutable.
2, Increase
The meaning of adding is not to add content directly, but to create a copy of the string and then operate it. In addition to string splicing with + and ${}, you ...
Added by christophebmx on Fri, 21 Jan 2022 20:34:43 +0200
New API in Vue3
Common Composition API
setup
Vue3.0 is a newly added configuration item. The value is a functionsetup is the of all composition APIsThe data and methods used in the component need to be configured in the setup functionThere are two return values of the setup function:
If the return is an object, the attributes and methods in the object can ...
Added by ericdorman on Fri, 21 Jan 2022 20:28:11 +0200
layui table handles wonderful background data and realizes the function of complex header fixed column
The company requires the implementation of complex header tables on mobile phones. The first column can be fixed and other sliding table functions. I have seen that this function is available in elementui, but its multi-level header needs to realize the object relationship between upper and lower levels, and the data returned to us by the backg ...
Added by blinks on Fri, 21 Jan 2022 20:09:56 +0200
Common methods of js array
There are several methods of array:
join() push() and pop() shift() and unshift() sort() reverse() concat() slice() splice() indexOf() and lastIndexOf() (new in ES5) forEach() (new in ES5) map() (new in ES5) filter() (newly added in ES5) every() (ES5 added) some() (new in ES5)
Common array methods
1.join()
join is to convert an array int ...
Added by developer on Fri, 21 Jan 2022 19:42:16 +0200
Chapter 5 inheritance of JavaScript object-oriented Essentials
Chapter 5 succession
Essentials of object oriented JavaScript -- Nicholas C. Zakas The syntax of class already exists in ES6
Learning how to create objects is the first step in understanding object-oriented programming. The second step is to understand inheritance. In traditional object-oriented languages, classes inherit the properties ...
Added by Tux-e-do on Fri, 21 Jan 2022 17:44:55 +0200