• Welcome to Baben's blog that year. I'm glad to meet you at the right age!
  • Due to the theme, the QQ login partner displays the default avatar in the comments. Please go to the personal center to upload the avatar again.

Regular expressions I used in those years

 Regular expressions I used in those years
Can only be numbers and commas/^ [ d,]*$/ Verify that the phone number is basically correct/^ 1 [345789] d {9}$/ Enter multiple mobile phone numbers separated by commas. Commas/^ (1 (3 | 4 | 5 | 7 | 8) d {9}) (, (1 (3 | 4 | 5 | 7 | 8) d {9}) cannot appear at the beginning and end of each mobile phone number*$/ The password length is 6-18 digits, and numbers, letters, and symbols contain at least two types of/(?! ^ [0-9]+$) (?! ^ [A-z Read the full text »

barben Six years ago (2019-12-17) 3212 Browse 0 Comments eleven Likes

How to turn off eslint for vue-cli3?

 How to turn off eslint for vue-cli3?
Today, I took over the project of a big guy. When problems occurred, I upgraded Node.js and Vue cli. I found that the scaffolding version has reached 4.1.1! In order to see what the difference is after the scaffold is upgraded, we set up a project. Next, vue create emmmm is as fierce as a tiger You may use special comments to disable some warnings. U ... Read the full text »

barben Six years ago (2019-12-10) 16017 Browse 1 Comments eight Likes

CSS penetration: put divs on the top without affecting the clicking of the lower elements

 CSS penetration: put divs on the top without affecting the clicking of the lower elements
case analysis There is a div with copyright information on the page. Set the fixed location at the bottom. Every time I open the console, this div will mask the "Login Now" button. Because after the page height changes, the fixed positioning will make the div move up, which just blocks the buttons below. I have to implement it now: div is displayed on the top without blocking the elements below [Normal browser size] [When the console is opened Read the full text »

barben Six years ago (2019-10-22) 39163 Browse 2 Comments nine Likes

Solve the problem that clicking button in vue will refresh the page

 Solve the problem that clicking button in vue will refresh the page
Today's test gave me another bug. Clicking the function button in the platform will directly refresh the page. After taking a look at the code, I still wonder when the button has a default click event? Finally, I found that the problem was in the form! <form> <button>OK</button> </form> <! -- Use the button tag in the form, possibly .. Read the full text »

barben Six years ago (October 12, 2019) 5428 Browse 0 Comments six Likes

Css centers divs or elements of unknown size horizontally and vertically

 Css centers divs or elements of unknown size horizontally and vertically
Set the top, bottom, left and right center for elements of known size Product Manager: I have a 200 × 200 picture here. Please help me display it in the middle of the browser! [Method 1] After positioning, set 0 at the top, bottom, left and right positions, and finally set the margin to auto! .photo { width: 200px; height: 200px; position: fixed; top ... Read the full text »

barben Six years ago (2019-08-06) 3575 Browse 0 Comments eight Likes

Use local storage localStorage to realize the function of no longer popping up

 Use local storage localStorage to realize the function of no longer popping up
Let's make an analogy I have a web page. When I open it, I will pop up an announcement or advertisement. Anyway, I will pop up a window. If you don't click something like "Don't remind me again", it will pop up next time!!! For example, who and why did you hit him? Implementation method: After the user clicks "Don't pop up again", a value will be written, for example: buttonchuang=true. Every time the page is loaded, it will be judged that buttonchuang Read the full text »

barben Six years ago (2019-06-11) 3919 Browse 0 Comments ten Likes

Vue.js code for md5 encryption of text (without plug-in)

 Vue.js code for md5 encryption of text (without plug-in)
Remember that the following fields need to be submitted when using Baidu Translation API last week. Field Name type Required parameter describe remarks q TEXT Y Request translation query UTF-8 encoding from TEXT Y Translation source language For example: zh Chinese, en English, can be set to auto automatic detection to TEXT Y Translation language For example: zh Chinese, en English, cannot be set to auto auto detection appid INT ... Read the full text »

barben Six years ago (2019-05-30) 3449 Browse 0 Comments ten Likes