VUE learning notes 2
1. slot
1.1 slot - basic use of slot
The slot of the component is also to make our package more scalableIt allows users to decide what is displayed inside the component
The basic use of slots is added in the template label Default value button for slot If there are multiple values, they will be used as replacement elements when compo ...
Posted by juancarlosc on Sun, 23 Jan 2022 14:43:44 +0100
[Vue] dark horse introduction to advanced actual combat summary
v-text v-cloak
V-text is equivalent to {}} for displaying content, but the difference is that {}} will cause flashing problems, and v-text will not flash If you want to use {}} without flickering, use v-cloak. The steps are as follows: Act on the v-cloak command on the template entry node managed by Vue Add a CSS hidden style of attribute ...
Posted by formlesstree4 on Sun, 23 Jan 2022 14:01:53 +0100
js displays the formatted code and highlights it (code highlighting is implemented in vue)
Implement a simple version of the web editor, without intelligent prompts, and will not automatically highlight labels (manual highlighting is required)
vue is used+ Highlight.js + js-beautify
The effect is shown in the figure below
js implementation code formatting
First, we will use the < pre > < / pre > and < code &g ...
Posted by CrimsonSoul on Sun, 23 Jan 2022 13:44:30 +0100
VUE3.0 series: vue3 What's new for 0
And vue2 0 compared to vue3 What are the highlights of 0:
Serial numbercharacteristicanalysis1PerformanceBetter performance than vue2 0 is 1.3-2 times faster2Tree shaking supportOn demand compilation, lighter volume3Composition APIComposite API, similar to ReactHooks4Better TypeScript supportBetter support for Ts5Custom Renderer APIExposed cus ...
Posted by osti on Sun, 23 Jan 2022 12:54:23 +0100
[React family bucket] through the component design mode, making simple todo (including source code)
1, Design project structure
Because we implement todo as a functional component, the basic design idea is:
1. Create a todo folder in components and a new index JSX is a todo component. This folder contains some todo widgets
2. On app Import todo from 'is introduced into JSX/ Components / todo 'and render in render:
import Rea ...
Posted by FijiSmithy on Sun, 23 Jan 2022 12:42:51 +0100
js data type and deep and shallow copy
Js data type
Basic data types (value types): Number, String, Boolean, Undefined, Null, Symbol (unique value added in es6) and BigInt (added in es10);
Reference data type: Object. Contains Object, Array, function, Date, RegExp.
Deep copy
Only when the copy refers to the data type, the copy can be divided into shallow copy and deep copy
...
Posted by quercus on Sun, 23 Jan 2022 04:52:55 +0100
Brief description of using steps of Tencent cloud instant messaging IM front end
Note: This article mainly demonstrates the steps of accessing IM through the wechat applet developed by uniapp:
Preparations: first, it is recommended that you save a copy of your project git to the remote warehouse before trying to access IM (prepare for the worst and recover later);
The first step below is to connect IM to the project. If y ...
Posted by mikes127 on Sun, 23 Jan 2022 03:53:48 +0100
JavaScript key and difficult point parsing 5 (advanced object, browser kernel and event loop model (js asynchronous mechanism))
Object advanced
Object creation mode
Object constructor mode
First create an empty Object object, and then dynamically add properties / methods
var p = new Object()
p = {}
p.name = 'Tom'
p.age = 12
p.setName = function (name) {
this.name = name
}
console.log(p.name, p.age)
p.setName('Bob')
console.log(p.name, p.ag ...
Posted by goodluck4287 on Sat, 22 Jan 2022 23:40:36 +0100
Record video notes / VUE / Part4 routing
1, Previously on
vue router is a plug-in library of vue (used by Vue.use()), which is specially used to implement SPA applications.
SPA application understanding:
1. single page web application (SPA)
2. The whole application has only one complete page. It will not jump to a new page, but only make local updates
3. Data is obtained through ...
Posted by bluwe on Sat, 22 Jan 2022 19:34:47 +0100
How to quickly implement a color selector
catalogue
Color model
Differences between HSV and HSL
Implementation selector
Hue
Calculate the slider position of the hue column
Saturation and brightness
Calculate these two values
hsv to rgb
transparency
HSL based color selector
Using canvas settings panel
When developing the front-end interface, you need to use the color select ...
Posted by mojito on Sat, 22 Jan 2022 19:32:41 +0100