Ultra detailed Vue3 responsive principle introduction plus source code reading
published: true date: 2022-2-3 tags: 'front end frame Vue'
Vue3 Reactivity
This chapter introduces another very important module in Vue, responsive. This paper introduces the basic principle (including the diagram), the simple implementation and how to read the source code.
Thanks for Vue master's excellent course, which can be reproduce ...
Posted by atkman on Thu, 03 Feb 2022 15:25:30 +0100
vue realizes the effect of selecting all boxes
Yesterday, I saw a question like Kwai Fu's face, and I tried to achieve it today.
vue component encapsulation, write the logical part, and css ignores it. Probably: select all radio, just like the select all button in the shopping cart, five items, five buttons and one select all button. Click Select all to select all items. On the contrary ...
Posted by flameche on Thu, 03 Feb 2022 14:29:53 +0100
Data type detection in JS
Data type detection in JS
1.type of
Definition: operator used to detect data type. There are two uses:
1.type(expression) : Operate on expressions
2.typeof Variable name: operate on the variable.
Return value: first detect that the returned result is a string. So let's look at the following expression (recently seen interview questions):
...
Posted by shadowwebs on Thu, 03 Feb 2022 13:34:18 +0100
3, Detailed usage of v-model instruction, event modifier and key modifier
① Detailed usage of v-model instruction
1.v-model instruction, bind the contents of text box to realize bidirectional data binding
<input type="text" v-model="name">
2.v-model instruction, bind the contents of multi line text box to realize two-way data binding
Note: interpolation in the text area (< textarea > {text}} < / te ...
Posted by benwilhelm on Thu, 03 Feb 2022 13:12:32 +0100
Failure investigation and replacement scheme of scrollIntoView
Problem background
Today, we need to do a function of clicking icon to slide to the article comment area, using scrollIntoView. It is found that the mobile terminal occasionally fails.
The code is as follows:
commentRef.current.scrollIntoView({
behavior: 'smooth',
});
analysis
Think about whether 1 is caused by a browser bug
accor ...
Posted by Formula on Thu, 03 Feb 2022 10:27:10 +0100
JavaScript implementation prefix tree
brief introduction
Prefix tree is also called word lookup tree, Trie tree , is a kind of tree structure , is a variant of hash tree. The typical application is to count, sort and save a large number of data character String (but not limited to string), so it is often used by search engine system for text word frequency statistics. Its advantag ...
Posted by All4172 on Thu, 03 Feb 2022 08:25:55 +0100
vue event handling
**
vue event handling
** Generally, v-on is used to listen for events. When listening for DOM events, some js code will be triggered.
Use v-on:xxx or @ xxx to bind events. xxx refers to the event name. The callback of the event should be written in the methods object and will eventually be placed on the vm. 2. The function in is managed by ...
Posted by drizzle on Thu, 03 Feb 2022 05:18:41 +0100
Take you hand-in-hand for 10 minutes to create a simple Markdown editor
preface
Recently, I need to implement the requirement of a markdown editor in my project, which is developed based on the React framework, similar to Nuggets:
My first thought is that if you can use excellent open source, you must use open source. After all, you can't always build wheels repeatedly. So I asked a lot of friends in my front-e ...
Posted by playaz on Thu, 03 Feb 2022 02:41:57 +0100
Detailed analysis of the top ten sorting algorithms (js Implementation)
Algorithm overview
Ten common sorting algorithms can be divided into two categories:
Comparison sort: the relative order between elements is determined by comparison. Because its time complexity cannot exceed O(nlogn), it is also called nonlinear time comparison sort.
Non comparison sort: the relative order between elements is no ...
Posted by Jon12345 on Thu, 03 Feb 2022 01:06:47 +0100
Wechat applet like function
Recently, I was working on a simple posting applet, which involves the like function. At first, I thought it was very simple. Later, I found that the difficulty lies in how to record the user's like status of the article, so as to avoid the failure of the like status when I open it next time. Let's start with the renderings: After Baidu for h ...
Posted by Stickybomb on Thu, 03 Feb 2022 00:32:19 +0100