[source code explanation] VUE enables multiple users to quickly select and operate components in wechat style

The grid layout and user-defined selection of any number of users are realized. First, see the effect Basic effect It supports the callback of the selected personnel. When someone is selected, the Edit button pops up and emit s the edit event Source code analysis Overall implementation: the basic component implementation based on V ...

Posted by Molarmite on Mon, 25 Apr 2022 05:29:36 +0300

In fact, it is not so difficult for webpack to compile the "modular" source code

We are webpack first experience This article demonstrates that the browser does not support CommonJS and only supports Es Module in specific scenarios, and webpack can parse these modular codes into syntax recognized by the browser.So how does webpack deal with modularity? Let's have a look.Project structuredemo ├─ src │ ├─ utils │ │ ...

Posted by GiaTuan on Sun, 24 Apr 2022 15:41:52 +0300

js knowledge point dom node

1, dom node type 1. Element node 2. Attribute node 3. Text node 2, View element nodes 1. View node name Node object nodeName console.log(oDiv.nodeName); //Node name DIV 2. View label name Node object tagName; console.log(oDiv.tagName); //Label name DIV 3. View node type Node object nodeType; Return val ...

Posted by Rohlan on Sun, 24 Apr 2022 15:20:05 +0300

Rendering flow of Vue components

Introduction and examples When we create Vue instances, we use new Vue and this_ Init (options) method to initialize, and then execute $mount, etc. can the components use the same set of logic to process when rendering components? A: Yes, of course. You need to use Vue Extend method. Take an example that can be used in work: Requirements: w ...

Posted by kigroy on Sun, 24 Apr 2022 12:36:07 +0300

BFC for Front End Knowledge Points

BFC What is BFC BFC: Block formatting context, Chinese block level formatting context. It is a separate rendering area with only the Block-level box participating, it defines how the internal Block-level box is laid out, and it has nothing to do with the outside of the area. BFC is an independent layout environment in which the layout of el ...

Posted by poseidix on Sat, 23 Apr 2022 20:14:52 +0300

JavaScript basic syntax

catalogue preface I summary 1.JavaScript history 2.JavaScript composition 3. The first JavaScript program Attention  4.JavaScript adding method (similar to CSS adding method) (1) Intra bank mode (2) Inline style (3) External mode 5. Execute JavaScript in Chrome browser II data output 1. Warning box output 2.HTML document outp ...

Posted by Jewelie on Sat, 23 Apr 2022 17:09:58 +0300

This paper solves the cross domain problem of browser

1. General As the old saying goes: focus on the big picture and don't be greedy for temporary benefits. Too greedy, will only lose more, contentment can be happy.   To get back to business, today we'll talk about how to solve the problem of browser cross domain.   2. Cross domain issues 2.1 what is cross domain Cross domain, in short, the domai ...

Posted by mzfp2 on Sat, 23 Apr 2022 16:04:54 +0300

ES language improvement

Piecemeal changes Strict mode This is a new syntax for ES5 reference resources: https://www.runoob.com/js/js-strict.html reference resources: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Strict_mode let and const ES6 recommends that you no longer use var to define variables, but let to define variables and const to de ...

Posted by BRUUUCE on Sat, 23 Apr 2022 10:56:39 +0300

Differences between Map and WeakMap

1, Map 1. Basic API Use the new keyword and the Map constructor to create an empty Map const m = new Map() If you want to initialize the instance while creating it, you can pass an iteratable object to the Map constructor, which needs to contain an array of key value pairs. Each key value pair of the iteratable object is inserted into the n ...

Posted by usmc on Sat, 23 Apr 2022 03:29:29 +0300

Advanced JavaScript -- advanced events

1. Registration event (binding event) Registration event overview Adding an event to an element is called a registration event or a binding event. There are two ways to register events: traditional method and method listening registration method                 <body> <button>Traditional registration event</button> ...

Posted by sysop on Fri, 22 Apr 2022 17:05:51 +0300