JavaScript Data Structure--Implementation of Diagram

In computer science, a graph is an abstract model of a network structure composed of a set of vertices connected by edges.A graph G = (V, E) consists of the following elements: V: A set of vertices E: A set of edges that connect the vertices in V The following diagram shows the structure of a graph: Before describing how to implement di ...

Posted on Wed, 14 Aug 2019 22:02:42 -0700 by RobNewYork

TypeScript Initial Knowledge - Enumeration

Number type enumeration Conventional enumeration values are numeric types and are therefore referred to as numeric type enumerations: enum Color { Red, Blue, Green } console.log(Color.Red); // 0 console.log(Color[0]); // Red console.log(Color[Color.Red]); // Red, Color.Red = 0 Change the number associated with the number enumeration ...

Posted on Tue, 13 Aug 2019 20:34:37 -0700 by benjaminj88

Classes of TypeScript -- ts

Classes of TS In traditional JavaScript, we use constructors to implement the concept of classes and inheritance through prototype chains. It's worth celebrating that we finally waited for ES6 and ushered in the class keyword. Front-end engineers f ...

Posted on Tue, 13 Aug 2019 06:41:27 -0700 by overlordofevil

vue source code parsing: nextTick

Use of 1 nextTick The image of dom in vue is not real-time. When the data changes, vue adds the rendered watcher to the asynchronous queue, asynchronous execution, and unified modification of dom after the execution of synchronous code. Let's see the following code. <template> <div class="box">{{msg}}</div> </template> ...

Posted on Mon, 12 Aug 2019 06:12:40 -0700 by trystan

Advanced usage of doT and use of loadData

This article is from APICloud official forum.Thank you for sharing gp3098. The template was written directly in the script tag at the bottom of the page, but now it's different. Using the loadData method of doT.js and api, the whole page is a template. In the past, when opening frame or window, I didn't understand how url and data work together ...

Posted on Mon, 12 Aug 2019 03:02:43 -0700 by somethingorothe

Episode 11: Implementing a set of ui component libraries (tab switching components) for pc vue from scratch

Episode 11: Implementation from scratch (tab switching component) Location of this episode: Let's talk about the meaning of tab switching first. Whether it's a mobile phone or a pc, the screen size is limited, and the range of people's eyes is limited. People don't like the operation of'jump'when they see information, or we need to look up ...

Posted on Sun, 11 Aug 2019 02:05:40 -0700 by iceangel89

Ant Design Pro - Practice React Hooks - Components

demand Background project, using Ant Design Pro, has such a requirement: there is a table, the width is adaptive, there is a column in the table is notes, the length of the text is variable, we want to use ellipsis when the text is too long, and there is a prompt box to display the full text when the mouse is hovering. Design I plan to design a ...

Posted on Fri, 09 Aug 2019 00:29:09 -0700 by EcLip$e

Summary of Common Methods of JS Objects

1. charAt() Returns the character at the specified position var str = 'nihaome wozhendexiangxeuhaoqianduan' var str2 = str.charAt(4); The subscript of a string starts at 1.,So go back o var str3 = str.charAt(25); 25 Location is a; var str4 = str.charAt(5,26); Two parameters are passed in without error, but the second parameter is invalid by d ...

Posted on Thu, 08 Aug 2019 20:29:34 -0700 by Papalex606

Flask Builds Blog Built-in Third Party Markdown

There's always been a catch-up with your blog site, and then you find that article editing can cause a lot of problems if you just use text editing, so you decide to look for data and have a third-party open source Markdown editor built in.Ultimately, I chose editor.md. Show me the final result. Say no ...

Posted on Thu, 08 Aug 2019 19:40:07 -0700 by parka

Advanced Guide to Reaction

react advancement Lazy load React.lazyFunctions allow you to handle dynamic imports like rendering regular components.SuspenseLoad indicators elegantly degrade components.fallbackProperty accepts whatever you want to show during component loading React Elements. const OtherComponent = React.lazy(() => import('./OtherComponent')); function M ...

Posted on Thu, 08 Aug 2019 02:18:20 -0700 by rklapwijk