This time I will bring you Vue to implement click time to obtain time period query (with code). What are the precautions for Vue to implement click time to obtain time period query. The following is a practical case, let’s take a look. one time.
The example of this article shares with you the case of vue query by time period. The rendering is as follows
html code
<template> <p> <input> </p> <p></p> <input> <ul> <li>今天</li> <li>昨天</li> <li>本周</li> <li>上周</li> <li>本月</li> <li>上月</li> </ul> <p> <button>查询</button> </p> </template>
vue.js Code click event
//获取时间、 //时间解析; Time:function(now) { let year=new Date(now).getFullYear(); let month=new Date(now).getMonth()+1; let date=new Date(now).getDate(); if (month <p> I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website! </p><p>Recommended reading: </p><p style="text-align: left;"><a href="http://www.php.cn/js-tutorial-396234.html" target="_blank">Detailed explanation of the steps to implement dynamic and static paging in layui</a><br></p><p style="text-align: left;"><a href="http://www.php.cn/js-tutorial-396230.html" target="_blank">Detailed explanation of Vue component use cases</a><br></p><p style="text-align: left;"><a href="http://www.php.cn/js-tutorial-396226.html" target="_blank">Vue implementation of PopupWindow component usage steps analysis</a><br></p>
The above is the detailed content of Vue implements click time to obtain time period query (with code). For more information, please follow other related articles on the PHP Chinese website!