• Welcome to the eight year blog, I'm glad to meet you at the right age!
  • Due to the theme, QQ login partners will display the default avatar in the comments. Please go to the personal center and upload the avatar again.

Convert JS timestamp to normal digital time format

 Convert JS timestamp to normal digital time format
On the interface in the middle of the night, I found that the time field passed to me by a good person in the back end was actually in the format of timestamp??? originally, I wanted the back end to change this timestamp to a value that can be seen by a man in the sun, but when I look at the time . 2020-09-20 02:06:05 excuse me, I will come by myself!!!! function getdate(time) { var now = new Date(time), y = now ... Read the full text

barben Six days ago 50 view 0 comments seven Praise

Van re rendering updates picker view

 Van re rendering updates picker view
One requirement is to use van's picker selector component instead of the input box to set everyone's score. however, the score of each item is different. Some items have a full score of 10 points, while others have a full score of 30 points. Therefore, it is necessary to dynamically change the optional range for picker selectors. Score selection pop-up window > Read the full text

barben 2 weeks ago (09-11) 85 browse 0 comments six Praise

How to remember JS data type in a short time?

 How to remember JS data type in a short time?
If you can remember the data type of JS in one sentence, you are really a U so NB! I like to use it instead of you, which means you. So, so, very, very You don't need me to talk about it. Of course, it's cattle criticism!!! The ones that start with u are undefined > > the ones with s start with string and ES6, and the new symbol > the ones that start with o have objects. There are two objects that start with N, numb Read the full text

barben One month ago (08-19) 89 view 0 comments twenty-two Praise

Vue encapsulates Axios

 Vue encapsulates Axios
And the previous article "wechat applet encapsulates request" very similar to the single door for loop writing The advantages are really clean ~ 1. Create two new files to encapsulate Axios and manage interfaces. Here, I create a new 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 months ago (06-05) 256 browse 0 comments two Praise

Vue modularizes data, such as element form verification

 Vue modularizes data, such as element form verification
Why modularize data? when using the form component of element today, I saw that the form verification rules were written in piles under the data of the page, which was very messy. so I wonder, can we put all the rules of form verification together to facilitate management? So I did these things create a new JS file you can put this JS file anywhere you want in the project. Then in this JS file, write your data and use export default to set the number Read the full text

barben 4 months ago (05-29) 235 view 0 comments eight Praise

Vue using sass in uni app

 Vue using sass in uni app
1. First of all, you need to install node sass, because sass loader depends on it NPM install node sass -- save dev 2, install sass loader NPM install sass loader -- save dev 3. Modify the style label to declare the use of SASS < style lang = "SCSS" scoped > < / St Read the full text

barben 5 months ago (05-13) 622 view 0 comments ten Praise

The applet component cannot get the node using SelectAll

 The applet component cannot get the node using SelectAll
Shocked! Encapsulating a component, using Wx. Createselectorquery(). Selectall(). Boundingclientrect() to get an empty array!? the solution is unexpected and makes people feel sad. Xiaobian takes a breath of cold air after learning about it, and can't speak on the spot! pay attention to add. In (this) to the component, that is, const query = Wx. Createselectorquery(). In (...) Read the full text

barben 5 months ago (05-06) 214 browse 0 comments two Praise

Wechat request encapsulation

 Wechat applet encapsulates request request
Recently in the small program project, want to package a convenient management of the interface address request, Baidu for a long time, found that many of the wheel provided by predecessors are not suitable for me. so I built this wheel by myself. I just need to declare the request mode and address in the file. It will be very convenient to manage the interface and use it in the later stage. 1. Create the api.js file and encapsulate the Wx. Request request / / import apilist from '. / apilist' / / use the import index Read the full text

barben 5 months ago (04-22) 236 browse 0 comments two Praise