vue+vuex+axios+echarts Draw a dynamically updated map of China

I. Build projects and install plug-ins # Install vue-cli npm install vue-cli -g # Initialize project vue init webpack china-map # Cut into Catalog cd china-map # Installation Project Dependency npm install # Install vuex npm install vuex --save # Install axios npm install axios --save # Install ECharts npm install echarts --save II. Pr ...

Posted by jimmyborofan on Mon, 20 Jul 2020 08:30:08 -0700

jwt Logon Check Carry token

jwt login registration jwt concept Token does not need to be stored in the database.Just generate the key behind the scenes, then put the token in the request body or header when the client sends the request. When the client receives the token, it is stored in the local store or cookie. Note that sensitive information cannot be stored in the to ...

Posted by phat_hip_prog on Mon, 29 Jun 2020 09:12:56 -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

Building vue mobile project from scratch to online

Let's see a wave of renderings   Initialize project 1. Installed on node.js Using the following command npm install --g vue-cli 2. Under the directory where the project will be built Vue init webpack myproject (project directory name) All the way back here In the middle, you can select ESLint to check the code style of the project. ...

Posted by zuhalter223 on Sun, 07 Jun 2020 01:05:45 -0700

Don't know how to improve code quality?Take a look at these design patterns!

Purpose of improving code quality Programming apes do their job of writing code. Writing high-quality code should be our pursuit and our own requirement because: High quality code often means fewer BUG s, better modularity, and is the basis for our scalability and reusability High quality code also means better writing, better naming, ...

Posted by kcorless on Fri, 05 Jun 2020 17:20:40 -0700

Sorting out the use of some functional functions

Some commonly used functional functions About native JS File size unit conversion /** * @desc bytesToSize Byte unit conversion * @param bytes Incoming data in bit */ const bytesToSize = function (bytes) { const k = 1024; if (!bytes || bytes === 0) return '0 B'; if (typeof (bytes) == 'string') { return bytes } else { ...

Posted by gilijk on Sat, 30 May 2020 08:29:56 -0700

Building mock data environment with vue+koa2

I wrote an article a while ago Implementation of mock data mode in front-end vue project In this paper, we mainly use mock data in vue project. The data and project are coupled together, which is not elegant. As a front-end with pursuit, how can we tolerate this method? In this article, we record the method of using koa2 to build the server and ...

Posted by cschotch on Sun, 17 May 2020 17:26:47 -0700

Java + element UI realizes simple tree menu

1, Simple entry level tree menu implementation (pure background logic) 1. Introduction (1) Development environment  IDEA + JDK1.8 + mysql 1.8  SpringBoot 2.2.6 + mybatis-plusHere, it is only developed in the background (json data is returned), which will be explained in the subsequent presentation of the front page. (2) Data sheetAs follows ...

Posted by msnhockey on Fri, 08 May 2020 03:48:21 -0700

Mixins + operational dom (ref and $refs) + a little understanding of component exposure in vue.

Mixing (Mixins) What is mixins?Is a way to reuse functions during component development in vue When the page styles are different, but the methods you perform and the data you need are similar, you can use Mix Bar, a common and identical part of the extract to encapsulate, reduce the amount of code and make modifications and tests more diff ...

Posted by barry_p on Wed, 06 May 2020 17:14:50 -0700