Usage of named slot and scope slot in vue2 and old and new syntax
Conceptual difference
Named slot: how to distinguish when there are multiple slots at the same time. Just specify a name for each slot
Scope slot: how to use the data of child components in the parent component to define the slot content. A simple understanding: the child slot displays its own internal data by default, but the parent wants to ...
Posted by menriquez on Mon, 07 Feb 2022 08:34:51 +0100
TypeScript learning - 20 Mixins
Mixins
introduce
In addition to the traditional object-oriented inheritance, there is also a popular way to create classes through reusable components, which is to combine the code of another simple class. You may be familiar with mixins and its features in languages such as Scala, but it is also very popular in JavaScript.
Blend in Exam ...
Posted by Kingw on Mon, 07 Feb 2022 06:52:09 +0100
qiankun 2.x runtime sandbox source code analysis
brief introductionThe implementation principle of JS sandbox and style sandbox in qiankun framework is explained in detail from the source code level.prefaceThe word sandbox must be familiar to everyone. Even if it is strange, it will not be so strange after reading this articleSandboxie, also known as sandbox, is a virtual system program that ...
Posted by php new bie on Mon, 07 Feb 2022 05:09:38 +0100
Vue common instructions
vue common instructions
vue provides some more convenient output for page + data. These operations are called instructions. The instructions encapsulate some DOM behaviors and combine attributes as a code. The code has corresponding values. According to different values, the framework will bind relevant DOM operations
V-text (equivalent ...
Posted by drag0ner on Mon, 07 Feb 2022 02:29:31 +0100
Life cycle of Vue
Life cycle of Vue
The process of vue instance from creation to destruction is the life cycle. vue each component is independent, and each component has its own life cycle. Life cycle makes it easier for us to form better logic when controlling the whole vue. It can be divided into three stages: Mount stage, update stage and destroy stage.
...
Posted by ptraffick on Mon, 07 Feb 2022 02:00:47 +0100
Vue component communication
1, Pass parent component to child component
Parent components communicate with child components through props attribute Data is one-way flow parent - > child (if props data is modified in the child component, it is invalid, and there will be a red warning)
Parent component Vue code is as follows:
<template>
<div class="parent ...
Posted by parms on Mon, 07 Feb 2022 01:32:19 +0100
JavaScript basic interview question summary 01
1. What are the basic types of JavaScript? What are the reference types? What is the difference between null and undefined?
Data type:
Basic data types: Number, String, Boolean, undefined, null
Reference data types: Function, Object, Array
difference:
undefined: indicates the value when the variable is declared but not initialized
Null: i ...
Posted by soccerstar_23 on Sun, 06 Feb 2022 21:23:01 +0100
HTML < template > tags in Vanilla JavaScript and Vue
HTML Template Tag in Vanilla JavaScript and Vue - DEV Communityhttps://dev.to/therealdanvega/html-template-tag-in-vanilla-javascript-and-vue-5eoo
Over the past few months, I've been writing a lot of documents, tutorials, and exercises around VueJS and Vanilla JavaScript. In some cases, I am Tech Elevator This is a coding training camp, which c ...
Posted by Scooby08 on Sun, 06 Feb 2022 21:01:42 +0100
Common operations of JavaScript array
preface
Array is one of the common data types in JavaScript. I'll make a brief record and summary about its operation methods here.
Today's main introduction:
How to find duplicate / non duplicate elements in an arrayArray flattening method
Find duplicate or non duplicate elements in the array
Double loop + slice to find the repeated elemen ...
Posted by phpBuddy on Sun, 06 Feb 2022 20:50:26 +0100
Large front end - vue - vuex state management
1: Communication mode between components
state: the data source that drives the application.
View: map state to view declaratively.
actions: respond to state changes caused by user input on the view.
Status management:
Communication mode between components:
Value transfer from parent component to child (parent-child component) 1. Receiv ...
Posted by kilby on Sun, 06 Feb 2022 20:38:07 +0100