Handwritten vue source-bidirectional data binding (simple implementation)
We've been asking vue about the principle of two-way data binding. Today, I'm just handwriting a two-way data binding and I'll get a better understanding of it.
Because the current vue technology is also constantly updated, now updated to 3.0, the internal method logic has also changed a lot, so as the development of us, in fact, we master the ...
Posted by kbrij on Tue, 26 Nov 2019 19:32:36 -0800
Solve the problem that v-lazy-image is invalid under the kernel of qq browser x5
Problem: in Android qq browser, v-lazy-image cannot be displayed all the time.
Cause analysis:
After debugging, it is found that the IntersectionObserver in the qq browser lacks an isIntersecting field, while the v-lazy-image plug-in displays pictures according to isIntersecting, so it can only be judged by using intersectionRatio.
Another diff ...
Posted by ashokkumar on Mon, 25 Nov 2019 10:12:14 -0800
Electronic Vue silent printing 2019 latest solution (including source code)
Project environment
node 10.15.3yarn 1.15.2win10Code completion time: April 18, 2019
Don't talk too much, put the source code first
GitHub
https://github.com/951477037/electron-print
git clone https://github.com/951477037/electron-print.git
//Installation dependency
yarn
//Operation item
yarn run dev
//Packing project
yarn run build
directory ...
Posted by mrwowza on Mon, 25 Nov 2019 10:05:56 -0800
Build multi page vue.js project
introduce
According to the requirements, we want to build a multi page vue.js project. How to transform a single page vue.js project into a multi page project? Follow me and watch
1. Create a single page vue.js project
Simply record the following creation steps:
--install cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.or ...
Posted by tastro on Sun, 24 Nov 2019 10:41:01 -0800
Click the button to get the last week, this week and next week's time infinitely
Reference blog: https://blog.csdn.net/qq_36742720/article/details/82455061
In the first two days, you need to draw an eckarts chart. Click the buttons of the previous week and the next week to get the data of the chart.
I have been looking for it on the Internet for a long time and found it written by the blogger. It's super. I ...
Posted by blacksnday on Sun, 24 Nov 2019 09:45:47 -0800
Vue.js virtual dom and diff algorithm
Vue.js virtual dom and diff algorithm
What is virtual dom?
Virtual DOM is also called vdom. In fact, it uses the Object model of js Object to simulate the real DOM, so its structure is a tree structure; vdom will render once as soon as it is created
Take a look at the code
//Initial virtual dom structure
var vdom = {
vn ...
Posted by tigomark on Sun, 24 Nov 2019 09:34:36 -0800
JavaScript Design pattern part 1: Singleton pattern
What is singleton mode
Singleton Pattern ensures that a class has only one instance and provides a global access point to access it
Singleton pattern is a simple and easy to understand design pattern, but its usage scenarios are very wide, including the famous Vuex also uses singleton pattern.
This article introduces two implementation methods ...
Posted by ztealmax on Sun, 24 Nov 2019 07:24:59 -0800
The principle of array monitoring in Vue -- array method interceptor
Core: by building a prototype interceptor, the array can first modify its own methods, including push, pop, shift, unshift, splice, sort, and reverse. By redefining the contents of the above methods, the trigger dependency is realized when calling the above methods, so as to inform the subscribers listening to the number of gro ...
Posted by Thora_Fan on Sat, 23 Nov 2019 13:13:29 -0800
Mobile page example project: Vue mobile demo
Today, I uploaded the Demo I made in these two days to github and generated a sample project: Vue mobile Demo. I hope it can help the novice.
Let's briefly introduce the content of this project
Basic situation
This project is based on the van demo project, which adds many practical functions, involving Vue + van T + Axios + mockjs, ...
Posted by thetechgeek on Sat, 23 Nov 2019 09:41:16 -0800
Vue router switches header by routing
In a single page application, the first and last parts of the page layout are fixed on the layout page, and the middle part is the route entry. At this time, the header title will not change when visiting the page. The solution to this problem is as follows:
By using the routing guard (before router enter, before router update) and routing met ...
Posted by RobinTibbs on Sat, 23 Nov 2019 08:24:24 -0800