提交工作台和首页的更改
This commit is contained in:
37
components/DateTimePicker/index.js
Normal file
37
components/DateTimePicker/index.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// components/datePicker/index.js
|
||||
import dayjs from "../../utils/dayjs"
|
||||
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
show: Boolean,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
currentDate: new Date().getTime(),
|
||||
maxDate: new Date().getTime(),
|
||||
minDate: new Date(2024, 1, 1).getTime(),
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
console.log("attached", this.data.show)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
onCancel() {
|
||||
this.triggerEvent("cancel")
|
||||
},
|
||||
onConfirm(e) {
|
||||
this.triggerEvent("confirm", { time: dayjs(e.detail).format("YYYY-MM-DD HH:mm:ss") })
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user