9.4上午提交
This commit is contained in:
@@ -84,8 +84,8 @@
|
||||
<view class="calendartop">
|
||||
<view class="title">时间日期</view>
|
||||
<view class="datebox">
|
||||
<view class="year">2025年</view>
|
||||
<view class="day">11月22日周六</view>
|
||||
<view class="year">{{ headerYear }}</view>
|
||||
<view class="day">{{ headerDay }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-calendar class="uni-calendar--hook" @change="change" @monthSwitch="monthSwitch" />
|
||||
@@ -110,6 +110,8 @@
|
||||
const followUpContent = ref('请于近日来院复诊、复查');
|
||||
const remindMe = ref(false);
|
||||
const remindPatient = ref(true);
|
||||
const headerYear = ref('');
|
||||
const headerDay = ref('');
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
@@ -170,7 +172,17 @@
|
||||
});
|
||||
const change=(e)=>{
|
||||
console.log('change 返回:', e)
|
||||
|
||||
if(e && e.fulldate){
|
||||
const d = new Date(e.fulldate);
|
||||
const y = d.getFullYear();
|
||||
const m = d.getMonth()+1;
|
||||
const dd = d.getDate();
|
||||
const weekdays = ['日','一','二','三','四','五','六'];
|
||||
const w = weekdays[d.getDay()];
|
||||
headerYear.value = `${y}年`;
|
||||
headerDay.value = `${m}月${dd}日周${w}`;
|
||||
selectedDate.value = `${y}年${m}月${dd}日(星期${w})`;
|
||||
}
|
||||
};
|
||||
|
||||
const monthSwitch=(e)=>{
|
||||
@@ -179,7 +191,6 @@
|
||||
|
||||
// 初始化页面
|
||||
const initPage = () => {
|
||||
// 设置默认日期为今天
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
const month = today.getMonth() + 1;
|
||||
@@ -187,6 +198,8 @@
|
||||
const weekdays = ['日', '一', '二', '三', '四', '五', '六'];
|
||||
const weekday = weekdays[today.getDay()];
|
||||
selectedDate.value = `${year}年${month}月${day}日(星期${weekday})`;
|
||||
headerYear.value = `${year}年`;
|
||||
headerDay.value = `${month}月${day}日周${weekday}`;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user