js new is an object process that implements a simple new method

For most front-end developers, it is a very common operation to get the corresponding instance of a constructor or class. In the following example, a simple process of creating an instance is realized through the constructor and class class respectively. // ES5 Constructor let Parent = function (name, age) { this.name = name; this.age ...

Posted by raidon on Sat, 14 May 2022 06:47:51 +0300

Explanation of implementation principle of Mini Pack

The article started on my blog https://github.com/mcuking/bl...Implementation source code, please refer to https://github.com/mcuking/bl... This paper mainly describes how to implement a front-end application packer similar to webpack step by step. The essence of webpack In essence, webpack is a static module bundler for modern JavaScript appli ...

Posted by ryanlwh on Sat, 14 May 2022 04:32:07 +0300

Wechat applet - how to obtain the value in the user's form control (traditional form and non form methods to obtain the value of form components)

background Forms are often used in applet development. We often need to obtain the values in the user's form input box at the applet side (usually the user inputs: switch,input,checkbox,slider,radio,picker), trigger events, and then submit them to the back-end for processing So what are the ways to get the value in the form in the applet, and h ...

Posted by clodius on Sat, 14 May 2022 02:42:17 +0300

Front end training - intermediate stage (42) - use of axios and how to combine it with vue

The most basic front-end is HTML+CSS+Javascript. Mastering these three technologies is just an introduction, but it is only an introduction. Now the definition of front-end development is far more than that. Front end small class (HTML/CSS/JS), in line with the central idea of improving the technical level and laying a solid foundation for basi ...

Posted by jonstu on Fri, 13 May 2022 20:54:19 +0300

JS review - JS light copy and deep copy

A shallow copy copies only one layer, while a deeper object level copy copies only references. Deep copy has multiple layers, and data at each level will be copied. Generally speaking, it is assumed that B copies A. when a is modified, if B changes, it is a shallow copy, and if B does not change, it is a deep copy. In depth, B copies A. i ...

Posted by nicelad_uk on Fri, 13 May 2022 18:30:21 +0300

Collision detection: Transformation

Introduction stay Collision Detection : Triangle The collision detection of triangles is considered from another idea. So far, the introduction is static detection, and then let's take a look at dynamic collision detection. The following examples are not checked for compatibility. It is recommended to view them in the latest Chrome browser. Or ...

Posted by JankaZ on Fri, 13 May 2022 16:33:57 +0300

JS end: write a fully functional e-commerce rotation chart with JavaScript

Rotation chart: automatic rotation + click the corresponding point to switch + next + menu navigation Let's talk about the idea first, and then the code: First take the overall HTML layout, first rotate the map, and then click the corresponding small circle to jump to the previous one and the next one. Then the layout of the left menu bar, th ...

Posted by bluntster on Fri, 13 May 2022 14:33:24 +0300

v-on instruction and its parameter passing and modifier

v-on 1. Foundation Official document link https://cn.vuejs.org/v2/api/#v-on Function: binding event listening. The event type is specified by the parameter. The expression can be the name of a method or an inline statement, and can be omitted if there is no modifier. Expected: Function | Inline Statement | Object Syntax: <di ...

Posted by yellowepi on Fri, 13 May 2022 07:48:51 +0300

Relearn precompile

Relearn precompile Foreword: I originally planned to give up CSDN completely and enter the Nuggets, but seeing that there are still small partners paying attention, I finally decided to spend a little more time and update it synchronously. If this article is helpful to you, please don't be stingy with your likes. 😃 Past situation review ...

Posted by wolfrat on Fri, 13 May 2022 01:40:45 +0300

vue family bucket vuex's martial arts script

1. What is vuex Vuex is designed for Vue The state management mode of JS application development adopts centralized storage to manage the state of all components of the application and solve the multi-component data communication Generally speaking, vuex is an official tool provided by vue that is independent of the component system and manag ...

Posted by socio on Fri, 13 May 2022 00:56:35 +0300