Browse Source

日历表上的跨日时间显示

Karsa 3 năm trước cách đây
mục cha
commit
2420158d2c
1 tập tin đã thay đổi với 15 bổ sung2 xóa
  1. 15 2
      src/views/ssbg/components/calendar.vue

+ 15 - 2
src/views/ssbg/components/calendar.vue

@@ -187,12 +187,26 @@ defineExpose({ toogeCurrentWeek,calendarApi });
   >
     <div class="dialog-cont">
       <p>
+
+        <template v-if="selectEventInfo.StartDate === selectEventInfo.EndDate">
+					{{
+            `${moment(selectEventInfo.StartDate).format("MM.DD")}
+            (${moment(selectEventInfo.StartDate).format('ddd')}) 
+            ${selectEventInfo.StartTime&&selectEventInfo.StartTime.substr(0,5)} - 
+            ${selectEventInfo.EndTime&&selectEventInfo.EndTime.substr(0,5)}`
+          }}
+				</template>
+        <template v-else>
           {{
             `${moment(selectEventInfo.StartDate).format("MM.DD")}
             (${moment(selectEventInfo.StartDate).format('ddd')}) 
             ${selectEventInfo.StartTime&&selectEventInfo.StartTime.substr(0,5)} - 
+            ${moment(selectEventInfo.EndDate).format("MM.DD")}
+            (${moment(selectEventInfo.EndDate).format('ddd')}) 
             ${selectEventInfo.EndTime&&selectEventInfo.EndTime.substr(0,5)}`
           }}
+        </template>
+          
         </p>
         <p v-if="isSeller">{{ selectEventInfo.ResearcherName }}</p>
         <p>{{ selectEventInfo.title }}</p>
@@ -252,8 +266,7 @@ defineExpose({ toogeCurrentWeek,calendarApi });
 }
 
 .dialog-cont {
-  /* min-width: 400px; */
-  width: 500px;
+  width: 550px;
   padding: 40px;
   p {
     color: #333;