提交 53b81578 编写于 作者: Y yurj26

perf(picker-view): data

上级 a5acf8c5
......@@ -23,24 +23,24 @@
</template>
<script lang="ts">
const date = new Date()
const _years : number[] = []
const _year = date.getFullYear()
const _months : number[] = []
const _month : number = date.getMonth() + 1
const _days : number[] = []
const _day = date.getDate()
for (let i = 2000; i <= _year; i++) {
_years.push(i)
}
for (let i = 1; i <= 12; i++) {
_months.push(i)
}
for (let i = 1; i <= 31; i++) {
_days.push(i)
}
export default {
data() {
const date = new Date()
const _years : number[] = []
const _year = date.getFullYear()
const _months : number[] = []
const _month : number = date.getMonth() + 1
const _days : number[] = []
const _day = date.getDate()
for (let i = 2000; i <= _year; i++) {
_years.push(i)
}
for (let i = 1; i <= 12; i++) {
_months.push(i)
}
for (let i = 1; i <= 31; i++) {
_days.push(i)
}
return {
title: 'picker-view',
years: _years as number[],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册