日历完成
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="date">
|
||||
<div class="head">
|
||||
<div>
|
||||
<div @click="shang">
|
||||
<img src="" alt="">
|
||||
上一月
|
||||
</div>
|
||||
2020年9月
|
||||
{{month.year}}年{{month.yue}}月
|
||||
<a-button type="primary" class="button">
|
||||
周日历
|
||||
</a-button>
|
||||
<div>
|
||||
<div @click="xia">
|
||||
下一月
|
||||
<img src="" alt="">
|
||||
</div>
|
||||
@@ -25,7 +25,7 @@
|
||||
<div>周六</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row" v-for="(item,index) in month" :key="index">
|
||||
<div class="row" v-for="(item,index) in month.date" :key="index">
|
||||
<div v-for="(i,j) in item" :key="j">
|
||||
<div class="day">
|
||||
<div>
|
||||
@@ -193,8 +193,19 @@ export default defineComponent({
|
||||
console.log(1)
|
||||
const date = getdate();
|
||||
const month = ref(date);
|
||||
let yue = 0;
|
||||
function xia(){
|
||||
yue = yue + 1;
|
||||
month.value = getdate(yue)
|
||||
}
|
||||
function shang(){
|
||||
yue = yue - 1;
|
||||
month.value = getdate(yue)
|
||||
}
|
||||
return {
|
||||
month
|
||||
month,
|
||||
xia,
|
||||
shang
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user