ES6-6.Set set and Map set

1, Set set Set set is an unordered list containing multiple duplicate values, which can quickly access the data and track various discrete values more effectively 1. Create a Set collection and add elements //Since there is no forced type conversion on the stored value in the set set, the number 5 and the string '5' can exist as independe ...

Added by ryan-uk on Fri, 28 Jan 2022 11:04:35 +0200

[Vue] Vuex concept and basic usage

Welcome to learn and communicate!!! Continuously updating Vuex 1. Concept Vuex is a Vue plug-in that implements centralized state (data) management in Vue. It centrally manages (reads / writes) the shared state of multiple components in Vue applications. It is also a way of communication between components, and is suitable for commun ...

Added by daucoin on Fri, 28 Jan 2022 09:41:16 +0200

JS basic function advanced

Basic knowledge Functions are modules that encapsulate reusable code blocks. In JS, functions have features that other languages do not have. Next, we will master the use skills in detail. Declaration definition In JS, a Function is also an object. A Function is an instance of the creation of a Function class. The following example is co ...

Added by mlefebvre on Fri, 28 Jan 2022 03:21:06 +0200

Theme skin changing based on element UI

Today we share the theme skin changing function based on element UI demand The effect is shown in the moving picture: Requirement Description: switch themes of different colors and styles according to customers' personal preferences. Key point 1: configure the theme color in the official element ui and download the corresponding file, which ...

Added by gizmola on Fri, 28 Jan 2022 02:41:44 +0200

Simulated nail! I package the Vue project as a client, and everything can be packaged!

One way to encapsulate Web projects as PC clients is to use node WebKit. Node WebKit is based on node JS and chromium application running environment, through which we can build on chrome browser and node The web application on JS is packaged into desktop application, which is what we call client, and it also supports cross platform.   ...

Added by jzimmerlin on Fri, 28 Jan 2022 02:34:45 +0200

Declaration of variables in JavaScript

variable In ECMAScript, variables can store any type of data (either string, array or other...), that is, "loose". Variables are just placeholders for distinguishing. There are three keywords var, const and let to declare variables (var is available in all versions of ECMAScript, and the last two are only available in ES6 and later). ...

Added by ChetUbetcha on Fri, 28 Jan 2022 02:07:09 +0200

js loop and code specification

1 - cycle 1. for loop Grammatical structure for repeatedly executes some code, usually related to counting // 2. for syntax structure for(initialize variable; Conditional expression; Operation expression ){ //Circulatory body } Initialization variable: a common variable declared with var, which is usually used ...

Added by darkside_3k on Fri, 28 Jan 2022 01:22:44 +0200

JS deep excavation: hand tear Promise detailed code complete introduction

catalog: 1,new Promise() 2,.then()And chain call 3,.resolve()and.reject() 4,.all()and.race() Before tearing Promise by hand, we have to understand the characteristics of Promise.First of all, Promise is essentially a constructor, which can create Promise object instances to meet the requirements of asynchronous programming.The Promise features ...

Added by divadiva on Fri, 28 Jan 2022 01:09:59 +0200

[Vue3] new Vue3 status management tool: Pinia

[Vue3] new Vue3 status management tool: Pinia New Vue3 status management tool: Pinia Vue3 has been released for some time. It adopts a new responsive system and builds a new Composition API. The surrounding ecology of Vue is stepping up the adaptation of this new system, and the official state management library Vuex is also being adapted. Th ...

Added by Sakujou on Fri, 28 Jan 2022 01:08:22 +0200

[JS] several methods of array de duplication

There are many methods of array de duplication. Next, let's talk about several common methods: 1, includes method + for loop The includes() method is used to determine whether an array contains a specified value. According to the situation, if it does, it returns , true; otherwise, , false const array = [1,2,3,2,4,6,3,1, undefined, Na ...

Added by ikscovski on Thu, 27 Jan 2022 23:19:23 +0200