vue parent-child component data transfer method

Pass value from parent component to child component It is easy for the parent component to pass values to the child component. When directly referencing the child component in the parent component, the data is bound in the child component and received in the props attribute of the child component. The following is the ...

Posted on Tue, 31 Mar 2020 11:53:35 -0400 by Kenwio

Promise asynchronous programming solution

Why use promise? Solve callback hell fs.readFile(__dirname + '/data/a.txt', (err, data)=>{ if(!err){ console.log(data.toString()); fs.readFile(__dirname + '/data/b.txt', (err, data)=>{ if(!err){ console.log(data.toString()); } ...

Posted on Mon, 09 Mar 2020 03:14:06 -0400 by chowwiie

Extensions to Arrays of ECMAScript 6

Extensions to Arrays of ECMAScript 6 1. Extended Operators The extension operator (...) converts an array to a comma-separated sequence of parameters.Behind the extension operator is the invoked traverser interface, which can be used whenever an object with the traverser interface is deployed. let x ...

Posted on Tue, 03 Mar 2020 20:38:54 -0500 by ragefu

JavaScript Advanced Programming - 3rd Edition (Object-Oriented Programming)

JavaScript 6. Object-Oriented Programming 6.1 Understanding Objects 6.1.1 Attribute Type 6.1.2 Define multiple attributes 6.1.3 Features for reading attributes 6.2 Create Objects 6.2.1 Factory Mode 6.2.2 Constructor Mode 6.2.2.1 Treat constructors as functions Problems with 6.2.2.2 Constructors ...

Posted on Sat, 29 Feb 2020 22:43:13 -0500 by mkr

Basic JavaScript (ECMAScript) learning

Article directory 1.JavaScript concept 2. Functions of JavaScript 3.JavaScript development history 4.JavaScript = ECMAScript + BOM+DOM 5.ECMAScript: the standard of client script language 5.1 basic grammar 5.1.1 combination with HTML 5.1.2 notes 5.1.3 data type 5.1.4 variable 5.1.5 operators 5.1.6 au ...

Posted on Thu, 27 Feb 2020 04:08:11 -0500 by j7n5u

Async/Await with Decorator for more elegant asynchronous programming

As Async/Await is officially incorporated into ES7 standard, more and more people are using this so-called asynchronous programming end level solution. However, the more await expressions are found in the process of use, the more redundant code is used to create Promise objects, and the sense of elegance plummets. For this reas ...

Posted on Thu, 13 Feb 2020 13:14:52 -0500 by rodolp13

Operands and forms of components of JavaScript

Article directory 1. Components of JavaScript 2. Operate BOM object 1).Window 2) . navigator 3).screen 4).location 5).document 6).history 3. Operate DOM object 1) . get dom node 2) . update node 3) . insert node 4) . delete node 4. Operation form 1. Components of JavaScript JavaScript consti ...

Posted on Mon, 10 Feb 2020 10:00:39 -0500 by Kerry Kobashi

Some noticeable points about Promise object

By studying Ruan Yifeng's Getting started with ECMAScript 6 , some knowledge points that Promise can easily forget new Promise((resolve, reject) => { reject() resolve() console.log('hello') }).then(() => { console.log('resolve'); }, () => { console.log('reject'); }) for (let ...

Posted on Wed, 29 Jan 2020 10:25:45 -0500 by Daisatske

TypeScript True Fragrance Series-Classes

Preface The content of TypeScript fragrance series will be referenced Chinese Documents However, the examples in this paper will not duplicate those in the document, and will be studied in some places.In addition, the results of some of the examples in this article are compiled into JavaScript without ...

Posted on Mon, 27 Jan 2020 21:44:16 -0500 by JesuZ

JavaScript anti crawling notes, JS basic variables, data types, control flows, functions (detailed closures) + special objects (JSON/Date)

Catalog I. variables 2, Common data types 3, Control flow Four, function 5, Special objects I. variables 1. Variable format Starts with a letter, underscore (_), or dollar sign ($); subsequent characters can also be numbers (0-9) Case sensitive 2. Comment format //Single line notes /*Th ...

Posted on Mon, 27 Jan 2020 05:23:25 -0500 by roustabout