axios token authority authentication request mechanism, and the front end realizes senseless refresh

axios token authority authentication request mechanism Detailed explanation of parameter attributes Mechanism process 1. Login The user enters the account and password to log in. After successful login, save the user information, token and other information to the local localstorage. 2. Add request header to global axios When importing th ...

Posted by deljhp on Fri, 24 Sep 2021 00:49:17 -0700

Output result question

const obj = { 1: "a", 2: "b", 3: "c" }; const set = new Set([1, 2, 3, 4, 5]); obj.hasOwnProperty("1"); obj.hasOwnProperty(1); set.has("1"); set.has(1); A: false true false true B: false true true true C: true true false true D: true true true true Answer: C All object keys (excluding Symbols) will be stored as strings, even if you don't ...

Posted by Maeltar on Thu, 23 Sep 2021 03:05:17 -0700

this point in javaScript is no longer lost

What is this pointing to? No matter where you use this, it eventually points to an object; Where this is used and which object it will point to depends on the location of the function call. In short, remember one sentence: Which object calls the function and which object this in the function points to. this point in different scenes ...

Posted by truckie2 on Thu, 23 Sep 2021 00:46:57 -0700

JQuery entry level - Basic

1. Simple introduction to JQuery 1.1 introduction to JQuery jQuery is a JavaScript library.The so-called library is a JS file, which encapsulates many predefined functions, such as obtaining elements, performing hiding, moving, etc. The purpose is to call directly when in use without repeated definition, which can greatly simplify JavaScr ...

Posted by pacmon on Wed, 22 Sep 2021 21:51:42 -0700

JS operator - comparison operator

Comparison operator summary The comparison operator is used to compare the size of two values, and then return a Boolean value indicating whether the specified conditions are met. 2 > 1 // true The above code compares whether 2 is greater than 1 and returns true. Note that comparison operators can compare various types of values, no ...

Posted by klaaz on Wed, 22 Sep 2021 01:08:16 -0700

jQuery introduction to proficient learning tutorial, collect my article is enough

Hello, I'm hottie. I'll organize jQuery learning tutorials for you today.   catalogue 1, Introduction to jQuery 2, Usage of jQuery 3, jQuery selector 4, Selection set filtering 5, Selection set transfer 6, Get and set element content 7, Get and set element properties 8, jQuery event 9, Event agent 10, JavaScript object 11, json ...

Posted by blmg911 on Wed, 22 Sep 2021 01:02:59 -0700

React performance optimization best practices

React component performance optimization best practices The core of React component performance optimization is to reduce the frequency of rendering real DOM nodes and Virtual DOM comparison. 1. Clean the components before unloading The global events and timers registered for window in the component shall be cleared before the component is u ...

Posted by zander213 on Tue, 21 Sep 2021 23:21:15 -0700

Vue writes (preventReClick) anti riot point + de bounce and throttle functions

Several have been tried before and have no effect. Reasons: 1. The writing method of vue is a little different from that of ordinary, because this of vue is not only the current component object, but also inherits the vue object upward (the difference can be seen below) 2. Call and apply can only inherit the parent, not deep inheritance 3. Bec ...

Posted by xtian on Tue, 21 Sep 2021 18:06:41 -0700

1. In depth summary of JS advanced Foundation

1. Data type 1.1 classification 1. Basic (value) type typeBrief descriptionStringArbitrary stringNumberArbitrary numberbooleantrue/falseundefinedundefinednullnull 2. Object (Reference) type typeType descriptionObjectAny objectFunctionA special object (executable)ArrayA special object (numeric subscript, internal data is ordered) var a ; ...

Posted by _SAi_ on Tue, 21 Sep 2021 14:13:45 -0700

Zero foundation quickly master the inheritance methods and characteristics of JavaScript JS, string, number, date built-in objects, and common extension libraries

catalogue 1, js inheritance mode and its characteristics 1. Prototype chain inheritance 2. Classic inheritance (constructor) 3. Combination function inheritance (prototype chain + Classic) 2, Built in object 1. String object method in JS 2.Math object (math built-in object) 3.Date object (method of date built-in object) 3, Extension li ...

Posted by nemesis.2002 on Tue, 21 Sep 2021 13:18:19 -0700