Real router V4 & V5 interceptor (hook), static route, route view implementation

premise Before the v3 version of React Router, there was the onEnter hook function, which also supports the static routing configuration; however, after the v4 version, the hook function was removed, which is officially intended to be provided to developers, who can play it freely. In this case, we can only realize it ourselves. At present, th ...

Posted by sandrine2411 on Sat, 04 Apr 2020 13:35:56 -0700

Object expansion

Object expansion Object development review: Object literal, object deconstruction, three dot operators Object name attribute Object's method name attribute, but there are two special attribute methods. 1. If it is a property method, it is obtained through the property object. // / / object // let obj = { // demo() {}, // //Characteristi ...

Posted by boby on Sun, 29 Mar 2020 03:05:58 -0700

Timer-Case Analysis in JS

Making js timer In javascritp, there are two special functions for timers: 1. Countdown timer: timename = setTimeout ("function (;"), delaytime); 2. Cycle timer: timename=setInterval ("function();", "delaytime); The first parameter,'function()', is the action to be performed when the timer triggers. It can be a funct ...

Posted by Akenatehm on Wed, 25 Mar 2020 01:06:50 -0700

JavaScript Modular Development

What is modular development? In front-end development, it can achieve some basic interaction effect as long as several dozens or hundreds of lines of code are embedded in script tags at first. Then js is valued and widely used. The help of jQuery, Ajax, Node.Js, MVC, MVVM, etc. also makes front-end development important and makes front-end pro ...

Posted by pmjm1 on Mon, 23 Mar 2020 10:53:05 -0700

JS common regular expression memo

Matching regularization Use the. test() method let testString = "My test string";let testRegex = /string/;testRegex.test(testString); Match multiple patterns Use operation symbols| const regex = /yes|no|maybe/; ignore case Use the i flag to ignore case const caseInsensitiveRegex = /ignore case/i;const testString = 'We use the i fl ...

Posted by stone.cold.steve.austin on Mon, 23 Mar 2020 07:50:38 -0700

Nuxt.js ajax operation of programmer's necessary programming

Nuxt.js(4) ajax operation for programmers 1, Integrate axiox When building a project, if you select the axios component, nuxt.js will automatically integrate with axios. Integration effect:   1) package.json has axios version   2) nuxt.config.js add axios as a module   Common configuration, modify nuxt.config.js to config ...

Posted by --ss-- on Sun, 22 Mar 2020 08:37:51 -0700

Linux-Packaged Tutorial Club Series-shell

Preface Remember the fear of being dominated by bat.It's really hard to write bat scripts than shell scripts. Now that you understand these advanced languages, such as java js, it's easy to understand shell s.Learn simple grammar, look at scripts in familiar applications like tomcat and nacos, and learn other people's skills. It's about getting ...

Posted by mpower on Sat, 21 Mar 2020 22:14:33 -0700

How to insert multiple videos in vue-video-player of vue.js, the problem that videos can be played at the same time and the solution

@TOC Multiple video solutions Because it is to obtain different video data from the background and change the url in the playerOptions, a playerOptions object cannot be solved 1. Change the playerOptions object to an empty array 2. The data obtained from the background is placed in the videolist array, as follows 3. Loop through the videolist ...

Posted by kidd1270 on Fri, 20 Mar 2020 07:29:21 -0700

vue project, summary of detail points

1. vue Componentized Development and Value Transfer 1. Starting with the second line of goods, there is a margin-top value from the previous line, but the first line is not needed.In my practice, each line is required, except that the distance from the value of the element on the first line subtracts the margin-top value.Simple practice:'wra ...

Posted by spfoonnewb on Thu, 19 Mar 2020 20:54:38 -0700

tornado learning notes day04 execution order

Response output - > write prototype self.write() function This is how it is defined in the source code def write(self, chunk: Union[str, bytes, dict]) -> None: Effect Write chunk data to buffer Four ways to refresh buffer Program interrupt Manual refresh Buffer full Encounter \n When you write a print, it is not directly displayed on t ...

Posted by chyan on Mon, 16 Mar 2020 20:31:09 -0700