• 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.
Code Notes

Js matches the style in the html tag

 Js matches the style in the html tag
There is a news content module in the project, which is a piece of html text sent from the back end. I decided to use v-html rendering on the front end. However, it is really ridiculous to directly render the tag with style on this page! Regularly match the style in the html tag and delete it with replace Let content="<p style='color: # 00afef; '>Next time</p>"; co ... Read the full text »

barben Four years ago (2020-10-09) 3718 Browse 0 Comments ten Likes

Code Notes

Js timestamp is converted to normal digital time format

 Js timestamp converted to normal digital time format
In the middle of the night, I found that the time field sent to me by the backend is in the format of timestamp??? Originally, I wanted the backend to change the timestamp to a value that can be seen by the male, but when I looked at the time 2020-09-20 02:06:05 Excuse me, I'll do it myself!!!! function getdate(time) { var now = new Date(time), y = now ... Read the full text »

barben Four years ago (2020-09-19) 10059 Browse 1 Comments seventeen Likes

Code Notes

Vant re render update picker view

 Vant re render update picker view
One requirement is to use the picker selector component of vant instead of the input box to set everyone's score. However, each item has a different score. Some have a full score of 10 points and some have a full score of 30 points. Therefore, it is necessary to dynamically change the selectable range for the picker selector. <!-- Score selection pop-up --> <van-popup v-model="showScore" position="bottom" :lazy- ... Read the full text »

barben Four years ago (2020-09-11) 8009 Browse 0 Comments seven Likes

Code Notes

How to remember the data type of JS in a short time?

 How to remember the data type of JS in a short time?
If you can remember the data type of JS in one sentence, you are a real bull! U. Waiguoren likes to use it instead of You, which means you. SO, which means so, then, very, very NB, I don't need to tell you. Of course, it's a cow's criticism!!! >U is undefined >String and ES6 new symbol starting with S >Object with object starting with O >There are two that start with N, number Read the full text »

barben Four years ago (2020-08-19) 3467 Browse 0 Comments twenty-two Likes

Life

The homepage of the browser has been tampered with as poison bully safe navigation newduba?

 The homepage of the browser has been tampered with as poison bully safe navigation newduba?
Today, the homepage of the browser is inexplicably set as the safe navigation of the vicious drug bully. The most annoying thing is that the homepage protection of the browser of Huorong failed to intercept successfully, and the mentality exploded. Enter in the Chrome browser address bar chrome://version/ , (360 browser is se://version/), you will find this disgusting website! Have also done the following useless work 1. First of all, I checked the options of IE, and it is invalid to change the homepage to Baidu, or reset the browser settings 2. Then go to it Read the full text »

barben 4 years ago (2020-06-06) 13641 Browse 0 Comments one hundred and twenty-eight Likes

Code Notes

Vue package axios

 Vue package axios
It is very similar to the previous article "WeChat Applet Encapsulation Request" in the unique For loop writing method The advantage is really clean~ 1. Create two files to encapsulate axios and manage interfaces I have created an index.js and apiList.js under src/assets/js/api In index.js, encapsulate axios: import axios from 'axios' ... Read the full text »

barben 4 years ago (2020-06-05) 5654 Browse 0 Comments three Likes

Code Notes

Vue modularizes data, such as element form verification

 Vue modularizes data, such as element form verification
Why modularize data? When I used the form component of element today, I saw that the form verification rules were written under the data of the page in piles, which was very messy. I wonder if all the form verification rules can be put together for easy management? So I did these things Create a new js file You can put the js file anywhere you want in the project. Then in this js file, write your data and use export default to count Read the full text »

barben Four years ago (2020-05-29) 2735 Browse 0 Comments eight Likes