// components/diy-time/index.js Component({ /** * 组件的属性列表 */ properties: { txtcolor: { type: String, value: "#000000", }, txtfontsize: { type: Number, value: 32, }, txtmargin: { type: String, value: "0rpx 0rpx 0rpx 30rpx", }, datecolor: { type: String, value: "#000000", }, datefontsize: { type: Number, value: 32, }, datemargin: { type: String, value: "0rpx 30rpx 0rpx 0rpx", }, txt: { type: String, value: "时间:", }, time: { type: String, value: '12:00', }, }, /** * 组件的初始数据 */ data: { /* time: '12:00', */ }, /** * 组件的方法列表 */ methods: { bindTimeChange: function(e) { this.setData({ time: e.detail.value }) }, } })