wl-design-mobile 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wl-design-mobile",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "finch",
@@ -9,8 +9,9 @@
9
9
  <lambo-vector-icon :icon="icon" @click="onOpen"></lambo-vector-icon>
10
10
  </div>
11
11
  <div>
12
- <van-calendar v-model:show="showBottom" :value="defaultDateArr" type="single"
13
- :style="{ maxHeight: '65%' }" color="#0070D2" @confirm="onConfirm" get-container="body"/>
12
+ <van-calendar v-model:show="showBottom" :value="defaultDateArr" type="single" :max-date="maxDate"
13
+ :min-date="minDate" :style="{ maxHeight: '65%' }" color="#0070D2" @confirm="onConfirm"
14
+ get-container="body"/>
14
15
  </div>
15
16
  </div>
16
17
  </template>
@@ -35,6 +36,14 @@ export default {
35
36
  defaultDate: {
36
37
  type: String,
37
38
  default: ""
39
+ },
40
+ minDate: {
41
+ type: Date,
42
+ default: () => new Date((new Date()).getFullYear() - 3, (new Date()).getMonth(), (new Date()).getDate())
43
+ },
44
+ maxDate: {
45
+ type: Date,
46
+ default: () => new Date((new Date()).getFullYear() + 3, (new Date()).getMonth(), (new Date()).getDate())
38
47
  }
39
48
  },
40
49
  data() {
@@ -73,7 +82,7 @@ export default {
73
82
  this.selectItem.date8 = deepCopy(defDateArr)
74
83
  let startDate8 = defDateArr
75
84
  let startDateFormat = moment(startDate8).format('yyyy-MM-DD') || ''
76
- this.selectItem.date[0] = startDateFormat
85
+ this.selectItem.date = startDateFormat
77
86
  this.dateStr = startDateFormat
78
87
  let startDateObj = moment(startDate8).toDate()
79
88
  this.defaultDateArr = startDateObj
@@ -129,7 +129,7 @@
129
129
 
130
130
  .cell-group-div {
131
131
  flex: 1;
132
- overflow-y: auto;
132
+ /*overflow-y: auto;*/
133
133
  margin-top: 44px;
134
134
  }
135
135