JS Design Mode 5 - Creative Design Mode: Prototype Mode, Policy Mode, Agent Mode

Article Directory Prototype mode Policy Mode Example Different salaries for employees with different performance mtween slow motion animation proxy pattern Protection Agent and Virtual Agent Example: Virtual agent for lazy picture loading Meaning of agency: principle of single responsibility Cac ...

Posted by drew010 on Thu, 11 Jun 2020 19:20:29 -0700

this/call/apply/bind (ten thousand words)

preface Hello, everyone. I'm zha'er ๐Ÿ‘ฆ Every day ๐Ÿ’ช , you can get a promotion and a raise ๐Ÿ’ฐ When general manager becomes CEO, marry Bai Fumei and go to the top of life ๐Ÿ—ป I'm a little excited ๐Ÿ˜Ž. This is my 13th issue A kind of , hope to be able to explain every knowledge point clearly, (of course, if you don't know which one, you can discuss ...

Posted by robotta1530 on Wed, 10 Jun 2020 23:31:30 -0700

Summary of usage of meta tags in HTML5

< meta > tags in front-end interfaces of major websites on June 11, 2020 The meet object represents an element of HTML and provides meta information of HTML elements, such as description, keyword, refresh rate. Object properties: Content sets or returns the content attribute of an element h ...

Posted by nova912 on Wed, 10 Jun 2020 23:28:36 -0700

What does jquery do--Lebyte Front End

JQuery primary coverage Jquery Object JQuery is a set of multi-browser compatible javascript script libraries. The core idea is to write less and do more. Using jQuery will greatly improve the efficiency of writing javascript code, help developers save a lot of work, and make the code more elegant and robust, "like a tiger with wings.&qu ...

Posted by Bennettman on Wed, 10 Jun 2020 10:13:04 -0700

JS design mode (to be sorted out)

Interview and knocking, advanced stepping stone, design with mode, code more reasonable Explanation and application of Javascript Design Pattern System (exercise code) Chapter 2 object oriented 2-1 build development environment 2-2 what is object-oriented 2-3 object oriented inheritance 2-4 object oriented encapsulation 2-5 obje ...

Posted by dandaman2007 on Tue, 09 Jun 2020 23:30:28 -0700

How does the diff algorithm of Vue work? This article teaches you

preface This paper aims at the main logic and key details of diff algorithm in vue. Starting from a simple demo: p tag renders an array of items <div id="demo"> <p v-for="item in items" :key="item">{{ item }}</p> </div> <script src="../vue-source/dist/vue.js"></script> <script> const app = new ...

Posted by feri_soft on Mon, 08 Jun 2020 19:53:08 -0700

Performance optimization brochure - React search optimization: anti shake, cache, LRU

Recently, we need to do reconstruction and optimization of react project. Because we haven't touched react for a long time, today we simply optimize a keyword search based demo, which is recorded below. It is optimized from three aspects: Reduce the frequency of triggering events - debounce keyword typing Reduce HTTP requests - cache block dup ...

Posted by sarahk on Mon, 08 Jun 2020 18:57:30 -0700

N th Way of Front End Request - Play React Hook

I wrote an article a few years ago - " My Opinions on the Differences between Jquery ajax, Axios, Fetch "- Analyses the differences between ajax,axios and fetch in terms of principle and usage.Now, starting with a small ex amp le, this paper uses react hook to dissect a new way of requesting data; and through this custom HOOK, it intr ...

Posted by dennismcdougall on Sun, 07 Jun 2020 18:21:00 -0700

jquery custom alert

Antecedent: since the domain name will pop up in mobile devices, especially in IOS devices, it is necessary to customize the pop-up box; But there is a problem: the custom confirm cannot be assigned in the callback function, and the self defined confirm does not return the Boolean parameter, so when modifying or deleting, click "OK" ...

Posted by frenchpl on Sun, 31 May 2020 06:55:35 -0700

react treading pit does not point completely North (2)

1.img introduces picture paths Local Picture Method 1: <img src={require('../img/icon1.png')} alt="" /> Method 2: import search from '../img/search.png' import user from '../img/user.png' <img src={search} alt="" /> <img src={user} alt="" /> Background Picture Reference Method const divStyle = { color: 'red', ...

Posted by everisk on Sat, 30 May 2020 09:35:26 -0700