Slots for vue2 and vue3

Preface: the use of slots is actually very simple. You only need to understand two points: 1. Slots are used in sub assemblies. 2. Slots are used to display the template data of child components in the parent component normally vue2. Slot for 0 Without much to say, let's go directly to the case: <div id="app"> <div class="fa ...

Posted by billynastie on Mon, 27 Dec 2021 04:15:18 +0100

web project polling practice

Recently, two different methods have been used to realize instant messaging: one is polling based on timer (cooperating with the back-end within the project), and the other is two-way communication based on websocket (integrating and cooperating with the third party). Next, the basic use, advantages and disadvantages of these two different inst ...

Posted by kyoru on Mon, 27 Dec 2021 03:22:05 +0100

The WPS editor implements custom widgets

WPS or other forms and document processing are often used in learning and work. In particular, some formulas or calculations are often used in tables to process data. It is OK to simply take the maximum or minimum, but it is troublesome if too much data is involved or cyclic processing is required. For example, I want to get an accumulated val ...

Posted by ts10 on Sun, 26 Dec 2021 21:30:55 +0100

An interpretation of exports and module Exports and export, export default

For front-end beginners, exports and module Exports, export and export default are easy to misunderstand. The author writes an article to interpret them. Part I: exports and module exports To make node JS files can call each other, node JS provides a simple module system. The module is node The basic components of JS application, files and ...

Posted by maneetpuri on Sun, 26 Dec 2021 20:00:31 +0100

Array reduce method and array accumulation and de duplication

Fast reading 1, reduce Definition Examples 2, Array accumulation 3, Flexible use 4, Array de duplication   1, reduce Definition reduce is an aggregation method, which can turn each item in the array into one item by superposition. Examples var arr = [1, 2, 3, 4, 5]; arr.reduce(function(prev, cur, index) { console.log(prev); ...

Posted by Mehdi on Sun, 26 Dec 2021 18:22:06 +0100

ES6 Decorator, core decorators js,Mixin,Trait

ES6 (xxx) Decorator, core-decorators.js, Mixin, Trait [note] the Decorator proposal has been greatly revised and has not been finalized yet. I wonder if the grammar will change again. The following content is completely based on previous proposals and is a little outdated. After waiting for finalization, it needs to be completely rewritten ...

Posted by stemp on Sun, 26 Dec 2021 11:50:09 +0100

todo case - creating projects and components

analysis: ① : initialize todo project ② : create 3 components and internal code ③ : prepare the style file of styles ④: App.vue is introduced for registration. The outermost container class name is todoapp Prepare in advance: prepare the style file of styles (copy it from the preview materials) in app Vue introduction and use (there is a link ...

Posted by Jeyush on Sun, 26 Dec 2021 09:07:03 +0100

js array common methods

1.join() (array to string) Array to string, the method only receives one parameter: the default comma separator (). <script> var arr=[ 1, 2, 3, 4]; c ...

Posted by Peter on Sun, 26 Dec 2021 08:47:33 +0100

On V8 compilation

I. Introduction This article is an introduction to the principles of V8 compilation, which aims to give you a perceptual understanding of the parsing process of JavaScript in V8. The main writing process of this paper is as follows: Interpreter and compiler: introduction to basic knowledge of computer Compilation PrincipleV8 compilation pri ...

Posted by shawnyoung on Sun, 26 Dec 2021 08:13:07 +0100

JavaScript WebGL draws a face

IntroductionJavaScript WebGL Basics After some optimization, we try to draw common two-dimensional faces.The geometry in WebGL is ultimately composed of triangles, which is more suitable for cutting in.OriginMy GitHubDraw triangleThis is Example , based on Draw a line The main changes are:vertexDrawing elementsvertexA triangle has three vertice ...

Posted by LinuxForce on Sun, 26 Dec 2021 06:02:06 +0100