Vue infinite scroll load instruction
There's no load, just a way to tell if the scroll bar has reached the bottom of the browser If it arrives, the event will be triggered. If it arrives, it will not be handled.
The calculation formula is simple: the bottom is equal to (0) = the height of the scroll bar - the distance between the top of the scroll bar and the visible height. The ...
Posted by cage on Fri, 22 Nov 2019 17:23:56 +0100
vue learning [bind native events to components]
When a click event is defined in the parent component, and the click event is defined in the methods of the parent component, clicking on the page will have no response. So what should we do?
We can define a click event (native event) on the dom in the template of the subcomponent, and define the click event in the methods of th ...
Posted by Transwarp-Tim on Thu, 21 Nov 2019 15:52:53 +0100
How to use protobuf in front end
A while ago, I shared an article: How to use protobuf in front end Has been a lazy cancer attack and has dragged the node page to the present day.In the last share, many students had some discussions about why Protobuf should be used in front-end, indicating that the front-end is not suitable for protobuf.Our company uses protobuf together on ...
Posted by Branden Wagner on Thu, 21 Nov 2019 01:08:33 +0100
Vue cli project template file description asynchronous request
This article is the http part of src directory under vue/cli, with project structure reference Description of Vue cli project template file (I) overall structure
Reference to this catalog Here If you have any questions about this directory, you can adjust it by reference. The following is the contents of a single file
(1) con ...
Posted by sheen4him on Tue, 19 Nov 2019 20:25:04 +0100
Learn typescript in practice - implement full screen browser (100 lines)
Learning a new language, the fastest way is to look at the actual code!
At the beginning of learning ts, everyone will ask "is there any practical project that can be referred to?"
OK! To meet your needs, I plan to regularly use ts to do some common business plug-ins, and the code volume is as small as possible (controlled within 🦕 1 ...
Posted by MadDawgX on Tue, 19 Nov 2019 09:11:31 +0100
Vue responsive Principle & how to realize MVVM bidirectional binding
Preface
As we all know, the response of Vue.js is to use the data hijacking + publish subscribe mode. However, it means that as a Xiaobai, he always feels that he can answer it, and finally stops talking and ends up failing. As one of the classic interview questions, in most cases, he can only answer the question of "Object.defineProperty. ...
Posted by samba_bal on Fri, 15 Nov 2019 10:10:21 +0100
Common rules checks in front-end Vue
premise
In the development of vue, it is unavoidable to encounter a variety of form checks, here sorted out some checking methods used on the network and in their usual high frequencies.If you are wrong, you are welcome to add updates later.
1. Is it a legal IP address
export function validateIP(rule, value,callback) {
if(value==''||value==un ...
Posted by Flying Sagittarius on Thu, 14 Nov 2019 06:18:57 +0100
34 tips that React development must know [nearly 1W words]
Preface
React is one of the three front-end frameworks and a skill in interview and development.This paper summarizes some skills and techniques of React development from the actual development, which are suitable for students who are new to React or have some project experience.Long text in thousands of words, recommended collection. Sequent ...
Posted by satya61229 on Wed, 13 Nov 2019 03:12:26 +0100
Using html2canvas to upload pictures to generate posters
Link: Link descriptionUsing Vue + html2canvas + EXIF JS github address Online demo
major function
Upload pictures
Operate on pictures: move, enlarge and shrink
Synthetic Poster
Specific functions:
Upload pictures
html:
<input type="file" value="" accept="image/*" @click="getPhoto" id="image-input">
js
getPhoto () {
var imageInput ...
Posted by libertyct on Fri, 08 Nov 2019 19:14:40 +0100
From the beginning of web front end to the actual combat: css style initialization
In order to eliminate the default settings of each browser for css and keep the appearance of web pages consistent in each browser, it is necessary to initialize css! Many incompatible styles can be solved by css initialization code.
1. The most resource consuming and simple
* { padding: 0; margin: 0; border: 0; }
2. Selective initialization ...
Posted by typo on Fri, 08 Nov 2019 15:57:12 +0100