On JavaScript Design Pattern

Preliminary study on design mode Singleton mode Variables are defined internally and judged by closures. If they do not exist, new variables are generated Strategy mode Consistent with the principle of single responsibilityAdd or reduce strategies without major changes to the original codeThere are many ways to deal with the same ...

Posted by karldenton on Tue, 18 Jan 2022 13:15:47 +0100

TS learning notes

1, Data types in Ts Before introducing data types, first explain the declaration and assignment methods in ts. 1) Declare first and assign value when necessary: let c:number; c=5 2) Direct assignment after declaration let c:boolean = true; 3) After direct assignment, the variable type defaults to the type at the first assignment an ...

Posted by donbre on Tue, 18 Jan 2022 10:12:03 +0100

Vue3 + element plus configuration cdn

1. Project configuration Recently, I was working on a project. The project configuration version is as follows: vue: 3.2.6vue-router: 4.0.11vuex: 4.0.2axios: 0.21.4element-plus: 1.2.0-beta.6typescript: 4.1.5sass: 1.26.5 Let's share how to configure cdn acceleration for the vue3 project configured above Quietly, there are so many el ...

Posted by midge1970 on Tue, 18 Jan 2022 08:49:40 +0100

Advanced TypeScript types you need to know (summary)

preface For students with JavaScript foundation, it is actually easy to get started with TypeScript. You can gradually transition from JS application to TS application by simply mastering its basic type system. // js const double = (num) => 2 * num // ts const double = (num: number): number => 2 * num However, when the application b ...

Posted by sylesia on Tue, 18 Jan 2022 06:33:29 +0100

Component library actual combat | using vue3+ts to realize global Header and list data rendering ColumnList

🖼️ preface Recently, I used vue3 and ts to play with some gadgets. I found that a common requirement in normal development is the rendering of data list. Now I study again and find that many design specifications and logic I considered when learning vue2 are not particularly appropriate. Therefore, write this article to record the desig ...

Posted by DanArosa on Mon, 17 Jan 2022 22:47:47 +0100

[React basic series] what is JSX and how to use JSX

React is a library developed, open-source and maintained by facebook, and the meaning of react is to use JavaScript to realize user interaction - a JavaScript library for building user interfaces. Therefore, in essence, React is a library, and its role is to use JavaScript to realize user interaction. Its core idea is to use JavaScript to ...

Posted by Copyright on Mon, 17 Jan 2022 22:29:55 +0100

Concept of closure

How to generate closures Closure means that function variables can be saved in the scope of the function, so it seems that the function "wraps" the variables// By definition, functions that contain variables are closures That is, nested functions can be called closures The scope deals with two special situations: Functions are passe ...

Posted by jrforrester on Mon, 17 Jan 2022 22:00:10 +0100

Learned Vue defineAsyncComponent Api, which taught me this knowledge?

Author: Apoorv Tyagi Translator: front end Xiaozhi Source: dev There are dreams and dry goods. Wechat search [Daqian world] pays attention to this bowl washing wisdom who is still washing dishes in the early morning. This article GitHub https://github.com/qq449245884/xiaozhi It has been included. There are complete test sites, materials ...

Posted by PHP_PhREEEk on Mon, 17 Jan 2022 21:48:03 +0100

Practice of front-end deployment of scaffold private network project

prefaceFront end scaffolding is an important tool to improve team efficiency in front-end engineering. Therefore, building scaffolding is an unavailable skill for front-end engineers, while there are relatively few scaffolds in the industry for deployment. Generally speaking, it is related to the relevant templates of the business, This paper a ...

Posted by x_filed2k on Mon, 17 Jan 2022 21:42:53 +0100

JavaScript notes how to write JavaScript

Three principles for writing JavaScript: each responsible component encapsulation process abstractionEach party shall take its own responsibilityHTML/CSS/JavaScript each has its own responsibilitiesHTML -> Structural ; CSS -> Presentational ; JavaScript -> BehavioralUnnecessary direct manipulation of styles by JS should be avoidedYou c ...

Posted by mashamit on Mon, 17 Jan 2022 18:41:19 +0100