| 12345678910111213141516171819202122232425262728293031323334 |
- Component({
- options: {
- addGlobalClass: true
- },
- properties: {
- iconName: {
- type: String,
- value: "icon-rili1"
- },
- title: {
- type: String,
- },
- onChange: {
- type: Function,
- },
- },
- lifetimes: {
- attached: function () {
- getApp().globalData.Language.getLanguagePackage(this)
- }
- },
- data: {
- value: new Date().toISOString().split('T')[0], // 默认值为今天,格式为 YYYY-MM-DD
- },
- methods: {
- onChange(e) {
- if (e.detail.value == this.data.value) return;
- this.setData({
- value: e.detail.value
- })
- this.triggerEvent("onChange", e.detail.value)
- },
- }
- })
|