Basic usage of angular js1.4 lazy loading

First, briefly explain the role of lazy loading: As the name implies, laziness means that resources that need to be loaded are not loaded the first time, but are loaded when the page needs to be used, usually to improve the efficiency of loading the first page. Here is a simple example of the basic use of lazy loading ...

Posted by ddemore on Sat, 04 Apr 2020 18:08:11 -0700

JQuery implementation input upload image display thumbnail

Recently, I made a set of mobile shopping mall page, which has the function of uploading pictures to display thumbnails on the refund application page. I haven't done this before, so I sorted it out. First HTML: <p>Upload picture:</p> <div id="imgPreview"></div> <span class="upload-img">& ...

Posted by Dragoonus on Sat, 04 Apr 2020 16:58:33 -0700

JWT simple expiration time is wrong

Today, I used node to write in the background, used token for login authentication, and then used a simple JWT simple. However, I found that the set expiration time was not correct, and I didn't prompt for expiration all the time, but it was clearly the expired time, so I checked the source code of JWT simple. My path, under the root directory ...

Posted by sergeidave on Sat, 04 Apr 2020 13:40:41 -0700

Event capture and detailed explanation of event bubble

Binding of events The difference between addEventListener and event binding on addEventListener can bind multiple identical events to an element and ensure that all events will be executed Multiple events bound with on are overwritten by the last event Remove event binding: removeEventListener Event captu ...

Posted by JAM on Sat, 04 Apr 2020 11:23:47 -0700

Why does the front end use the idea of componentization? It is analyzed by an example

In normal projects, why do we use the idea of component to write code? In fact, the reason is very simple!!! When we write the code, we find that the code will appear in other places, and we want to reuse it, or our colleagues are interested in using it. At this time, we need to reuse the code through componentization, otherwise the workl ...

Posted by Submerged on Sat, 04 Apr 2020 09:29:00 -0700

ElementUI get sub component validation results

Recently, in the project, the parent component needs to obtain the verification result of the child component (form), which is sorted out as follows: Although there are prop s and events, sometimes you still need to access the subcomponents directly in JavaScript. To do this, use ref to specify a reference ID for t ...

Posted by maybl8r03 on Sat, 04 Apr 2020 06:40:08 -0700

Vue 2.0 monitoring text box content changes and ref instructions

<!DOCTYPE html>   <html lang="en">          <head>           <meta charset="UTF-8">           <title>Title</title>           <link rel="stylesheet" href="css/bootstrap.css">           <script src="js/jquery-3.2.1.min.js"></script>           <script src="js/bootstrap.js ...

Posted by TheMD on Sat, 04 Apr 2020 02:40:52 -0700

dva.js usage details: list display

github: https://github.com/axel10/dva_demo-Counter-and-list/tree/master   This time, we use the case of getting user data online and rendering it into a list to demonstrate dva.js. The whole development process should be summarized as follows: Write user list model - > write method to modify model - > write service interface - > write ...

Posted by caminator on Fri, 03 Apr 2020 23:26:46 -0700

jquery form validation plug-in - validation form

The blogger recommended jQuery Validate before, because it was used before, but the configuration was a little bit cumbersome. Until the recent project used the validform, it opened my eyes. The whole interface suddenly felt too friendly. Let's take a few renderings first. There are very few css and j ...

Posted by chemoautotroph on Fri, 03 Apr 2020 23:15:41 -0700

select2.js value traverse setting default value

This chapter mainly introduces the initialization of Select2, obtaining the selected value, setting the default value, and three methods. Select 2 beautifies the selection of radio boxes, check boxes and drop-down boxes, especially the problem of multiple selection of drop-down boxes. But at the same time, there are a lot of wo ...

Posted by SuNcO on Fri, 03 Apr 2020 18:57:46 -0700