Multilingual support
Multilingual support
International processing
The multilingual support in the Vue project uses vue-i18n https://kazupon.github.io/vue-i18n/zh/started.html
target
Realize the Chinese English switching function of elementUI and feel the effect of Chinese switching
Install internationalized packages
npm i vue-i18n@8.22.2
Please note the ...
Posted by treeleaf20 on Wed, 02 Feb 2022 22:36:08 +0100
How to use useEffect and setInterval correctly
background
useEffect seems simple, but it's not. Because I didn't understand the working principle of useEffect, I was severely cheated.
The thing is this: I want to achieve a very simple "object falling" effect:
The vertical position of the object is represented by the state of position y. calculated from top to bottom, the la ...
Posted by ganesan on Wed, 02 Feb 2022 22:22:03 +0100
c + + lesson 5 ~ special members
catalogue
const member
static member
Friends
this pointer and explicit
const member
const data member
const type variables cannot be modified and are in read-only mode
It must be initialized in the form of initialization parameter list
const member function
In terms of writing, const is written after the function
A constant member f ...
Posted by 7awaka on Wed, 02 Feb 2022 21:36:28 +0100
React router: build multi page SPA
Using Router, you can build a multi page single page app
1. Install the react router:
npm intall react-router-dom
2 basic usage
2.1 App.js import Route component
import { Route } from "react-router-dom";
2.2 App.js definition path:
There are two paths:
http://localhost:3000/welcome
http://localhost:3000/products
Load correspo ...
Posted by avalonindigo on Wed, 02 Feb 2022 21:17:25 +0100
GEE(Google Earth Engine) learning - common Filter operation
1, Filter filter
(1) Relational comparison filter
var filter_1 = ee.Filter.eq/neq/gt/gte/lt/lte('field','field value');
//Judge the relationship and return the filter
var result_filter = (FeatureCollection/ImageCollection).fliter(filter_1);
//At this time, the filtering result is still of type Collection.
If a non Collec ...
Posted by doforumda on Wed, 02 Feb 2022 21:14:38 +0100
Building vue--- shopping cart case from scratch
Shopping cart case
1. Case effect
2. Implementation steps
① Initialize project basic structure② Encapsulating EsHeader components③ Requesting product list data based on axios④ Encapsulate EsFooter components⑤ Encapsulate EsGoods components⑥ Encapsulate the EsCounter component
1. Initialize project structure
Run the following co ...
Posted by davey10101 on Wed, 02 Feb 2022 12:28:33 +0100
Rotation diagram of mobile terminal (written in native JS)
Rotation diagram of mobile terminal (written in native JS)
1, Realize the following functions:
Can automatically play pictures You can drag your finger to play the carousel
2, Implementation steps
Auto play function:
① Start timer
② The translate of CSS3 can be used to move the mobile terminal. Note that you can move without adding us ...
Posted by SueHubert on Wed, 02 Feb 2022 09:15:06 +0100
Six ways of Vue component communication
preface
The component is Vue JS is one of the most powerful functions, and the scope of component instances is independent of each other, which means that the data between different components cannot refer to each other. Generally speaking, components can have the following relationships:
As shown in the above figure, A and B, B and C, B an ...
Posted by superman on Wed, 02 Feb 2022 06:17:55 +0100
npm easy-to-use software packages must be collected
From: Wangdao
https://juejin.cn/post/6950584088462163982
In the face of busy schedule and urgent construction period constraints, it is undoubtedly very important to choose tools that can effectively improve productivity.
Here, I sort out a list of my favorite NPM packages. In order to facilitate browsing, I also classified them, hoping t ...
Posted by buzz on Wed, 02 Feb 2022 05:35:14 +0100
Simple implementation of Promise basic method
prefacePromise is a very common concept in front-end interview and work. There is also a market for the handwritten implementation of its various methods. Today, I will summarize the simple implementation of promise's basic methods.catch() methodThe catch method is an encapsulation of the then method and is only used to receive error messages i ...
Posted by webguync on Wed, 02 Feb 2022 03:49:49 +0100