Front end modularization
1. Background Recently, when using a front-end library, I looked at its documentation. The only way to import it is script, and I want to introduce this module in VueCLI environment. Open the entry file of this library as follows: When we see the keyword exports, we know that this is a module defined according to the CommonJs module specificat ...
Added by Grodo on Tue, 28 Dec 2021 06:36:08 +0200
Development of detailed page of steps of imitating mushroom street in vue project
1, Detail page - encapsulation of navigation bar
The navigation is a little complicated. Don't go directly to deatil Vue inside Create a new folder childComps under the detail folder and a new file detailnavbar vue
Detail.vue Detail.vue effect
2, Data request and rotation chart display
1. Data request
network folder creates a n ...
Added by mad3533 on Tue, 28 Dec 2021 05:23:29 +0200
You must know the iterator and generator
generator is a special iterator, which can replace the implementation of iterator to make the code more conciseWhat is an iteratorAn iterator is called an iterator. It is an object used to help traverse a data structure. This object needs to comply with the iterator protocol.The iterator protocol requires the implementation of the next method, ...
Added by scott56hannah on Tue, 28 Dec 2021 01:35:14 +0200
HTML5 media event usage and compatibility handling
In html4 When you want to insert audio and video, you must use flash
1. Video and audio understanding
1.1. Mainstream video file formats
MPEG-4: usually in mp4 is the extensionFlash video: usually in flv is the extensionOgg: usually in ogv is the extensionwebm: usually in webm is an extensionAudio video interleaving: usually in avi is the e ...
Added by aravind_mg on Mon, 27 Dec 2021 23:26:47 +0200
Discussion on non overflow and non deformation of flex layout sub elements
The problem is this: we are going to make a layout effect of the picture below When the window height is reduced, the red and blue boxes and the largest gray box are reduced accordingly, but the premise is that the red and blue boxes can not overflow to the outside of the gray box, and the contents can not be squeezed
The following is the neg ...
Added by Lautarox on Mon, 27 Dec 2021 21:55:07 +0200
Publish Subscription Mode EventEmitter
Node. The events module of JS provides an external EventEmitter object for Node. Events in JS are managed uniformly. Because Node.js uses event-driven mechanisms, and EventEmitter is Node.js implements the foundation of event driven. On the basis of EventEmitter, Node. Almost all modules in JS inherit this class to implement an asynchronous eve ...
Added by ljschrenk on Mon, 27 Dec 2021 19:57:16 +0200
Selenium | after page Jump, you can't locate the element. How to break it?
This article is excerpted from the internal textbook of Hogwarts Testing Institute
When you want to locate an element, if you can't locate it, you should consider whether the browser has embedded a frame window or the element you want to find is in the newly opened window. At this time, frame is required Switch between or windows.
frame is ...
Added by shivabharat on Mon, 27 Dec 2021 19:45:45 +0200
Webpack 5 learning notes
1 Introduction to webpack
1.1 what is a webpack
Webpack is a front-end resource building tool, a static module bundler. In the view of webpack, all resource files (js/json/css/img/less /...) of the front end will be processed as modules. It will perform static analysis according to the dependency of the module and package the corresponding st ...
Added by Acs on Mon, 27 Dec 2021 19:18:54 +0200
Long story JavaScript proxy base
Proxy and reflection provide developers with the ability to intercept and embed additional behavior into basic operations. Specifically, an associated proxy object can be defined for the target object, which can be used as an abstract target object. These operations can be controlled in the proxy object before the various operations on the targ ...
Added by jaql on Mon, 27 Dec 2021 17:54:11 +0200
React series -- the realization idea of react basic syntax
prefaceLet's not talk about the syntax principle, but first forcibly simulate the syntax according to the API effect to realize a simple version of ReactThe following code has nothing to do with the React source code, just a simple simulation idearenderThe first step is to create an element return with the class and bind the click event. The co ...
Added by PHPFreaksMaster on Mon, 27 Dec 2021 15:42:39 +0200