Basic JavaScript learning
1, Variable
1. Overview of variables
1.1 what are variables
Vernacular: a variable is a box of things. Popular: variables are containers for storing data. We get the data through the variable name, and even the data can be modified.
1.2 storage of variables in memory
Essence: a variable is a piece of space applied by a program in mem ...
Posted by dinosoup on Fri, 11 Feb 2022 21:32:14 +0100
Learn Vuex 4.0 state management (Vite)
Contents of this articleBriefly introduce vite and build vite project.Installing vuexIntroduction to Vuex BasicsUsing VuexPlug in introduction1. Briefly introduce vite and build vite project1.1 what is vite?Vite is a new front-end construction tool, which can significantly improve the front-end development experience. It consists of two main pa ...
Posted by zalath on Fri, 11 Feb 2022 20:54:37 +0100
Generics in TS
The most difficult thing in typescript is undoubtedly generics, so what is the motivation for generics Think about a question: How did generics appear and what problems did it solve Now there is an echo method, which passes in what type of value and returns what type of value
function echo(arg) {
return arg
}
const result = echo(123)
The re ...
Posted by Adam on Fri, 11 Feb 2022 16:57:08 +0100
Airbnb JavaScript style guide
1. Type
1.1 basic type: you can get the value of basic type directly. (direct access)
string,number,boolean,null,undefined,symbol,bigint.
symbol is the original data type newly introduced by ES6, which represents a unique value. The reason for its introduction is to fundamentally prevent the conflict of object attribute names, so ...
Posted by JustinM01 on Fri, 11 Feb 2022 16:50:47 +0100
Stop confusing observer mode with publish subscribe mode!
Observer modeThere are usually two models in the observer model, one observer and one observed. Literally, when the observed person has some behavior or change, it will notify the observer, and the observer will deal with it according to this behavior or change.Let's take a simple chestnut 🌰: Now there is a landlord (observer) whose house is p ...
Posted by oscar2 on Fri, 11 Feb 2022 15:51:21 +0100
Zhiting cloud disk - development guide web: project architecture
Here we mainly talk about the structure and technical architecture of the project, which is convenient for us to start development quickly
1. Technical structure of the project
The project mainly adopts vue + webpack + vantMain purpose of the project vue-cli3 The scaffold shall be initialized, and then the structure shall be adjusted a ...
Posted by breadcom on Fri, 11 Feb 2022 14:55:12 +0100
The seventh web front-end training (JavaScript)
1 built in object
The Arguments of the function are only saved in the Arguments of the function
Array object
Date Date object, which is used to create and obtain dates
Math object
String string object, which provides a series of operations on strings
1.1String
charAt (index): returns the character at the specified position
indexOf (chr) ...
Posted by VooDooRT on Fri, 11 Feb 2022 14:37:08 +0100
How to quickly build your own component library for the team -- Element source code architecture
The article has been included in github , welcome to Watch and Star.brief introductionThe source code architecture of ElementUI is explained in detail, which lays a solid foundation for building the team's own component library based on ElementUI in the next step.How to quickly build your own component library for the team?Component library i ...
Posted by sharugan on Fri, 11 Feb 2022 12:53:15 +0100
es6 series promise, async, await
1, promise1. IntroductionPromise is a solution for asynchronous programming, which is more reasonable and powerful than the traditional solution "callback functions and events".Advantages of asynchronous operation:Chain operation reduces the difficulty of coding (solving the problem of callback hell)Code readability is significantly e ...
Posted by cptnwinky on Fri, 11 Feb 2022 09:45:37 +0100
Various implementation schemes of tab
1. First build structure and style
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>tab </title>
<style>
* {
margin: 0;
padding: 0;
}
ul {
list-style: none;
}
.box {
width: 500px;
...
Posted by supinum on Fri, 11 Feb 2022 09:39:10 +0100