It is a commonly used function to retrieve all the dates in a time period, or the date of the specified day of the week in the time period function setHouseRatesColumn(startTime, endTime, week) { //Get all dates in the time period/date of the specified day of the week week = week == 7 ? 0 : week; let dateList = []; ... Read the full text »
barben
Two years ago (2022-08-30) 2506 Browse 0 Comments
seventy-seven Likes
Js gets the current time and converts it to a number function getTime() { let time = new Date(); //PadStart (2, '0') If the number of time bits is less than 2, add 0 at the beginning Return ` ${time. getFullYear()} Year ${(time. getMonth()+1). toString(). padStar Read the full text »
barben
Three years ago (2020-11-11) 3396 Browse 0 Comments
four hundred and forty-five Likes
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) 3620 Browse 0 Comments
ten Likes
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) 9539 Browse 1 Comments
seventeen Likes
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) 7789 Browse 0 Comments
seven Likes
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) 3360 Browse 0 Comments
twenty-two Likes
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) 5461 Browse 0 Comments
three Likes
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) 2636 Browse 0 Comments
eight Likes
<style> /*To modify the style of a tab, you must delete the scoped label after the style label*/ .el-tabs__item { font-size: 18px ! important; padding: 10px 0 50px ! important; width: 120px ! important; } .el-tabs__ ... Read the full text »
barben
Four years ago (2020-05-29) 9488 Browse 0 Comments
two Likes
The effect is as shown in the figure: <div class="tab"> well! The Year of Baben~ <div class="tab-class-fir"></div> <div class="tab-class-sec"></div> </div> .tab{ display: inli ... Read the full text »
barben
Four years ago (2020-05-28) 3693 Browse 0 Comments
three Likes