获取当天日期方式

1. 引用组件uView

npm方式安装

安装:npm install uview-ui
更新:npm update uview-ui

2.添加函数到按钮

 <u-button  @click="show = true">{{startDate}}-{{endDate}}</u-button>

3. js中给函数定义

startDate: this.$u.date(),
endDate: this.$u.date(),

4.实际显示

posted @ 2021-06-16 16:37  洛洛`  阅读(174)  评论(0编辑  收藏  举报