Browse Source

选择日期样式

bls-dan 2 years ago
parent
commit
8e105530c7

+ 5 - 0
src/assets/global-style.scss

@@ -43,7 +43,12 @@
     }
     }
   }
   }
 }
 }
+.n-date-panel{
+  border: solid 1px #2185E8;
+
+}
 .n-date-picker{
 .n-date-picker{
+  
   .n-input{
   .n-input{
     background: none !important;
     background: none !important;
     border: solid 1px #2185E8;
     border: solid 1px #2185E8;

+ 12 - 10
src/assets/naive-theme.ts

@@ -40,19 +40,21 @@ const themeOverrides: GlobalThemeOverrides = {
     fontSizeHuge: '16px'
     fontSizeHuge: '16px'
   },
   },
   DatePicker: {
   DatePicker: {
-    panelColor: 'rgba(3,20,26,0.95)',
-    panelTextColor: 'rgba(255,255,255,0.8)',
-    calendarDaysTextColor: 'rgba(255,255,255,0.8)',
-    calendarTitleTextColor: 'rgba(255,255,255,0.8)',
+    panelColor: 'rgba(20,44,83)',
+    panelTextColor: '#fff',
+    calendarDaysTextColor: '#fff',
+    itemTextColor: '#fff',
+    calendarTitleTextColor: '#fff',
     calendarTitleColorHover: '#183742',
     calendarTitleColorHover: '#183742',
-    panelHeaderDividerColor: '#164352',
-    calendarDaysDividerColor: '#164352',
-    panelActionDividerColor: '#164352',
-    itemColorActive: '#1AB99B',
-    itemColorHover: '#146371'
+    panelHeaderDividerColor: '#1891FF',
+    calendarDaysDividerColor: '#1891FF',
+    panelActionDividerColor: '#1891FF',
+    calendarDividerColor: '#1891FF',
+    itemColorActive: '#1891FF',
+    itemColorHover: '#0d4e89'
   },
   },
   TimePicker: {
   TimePicker: {
-    panelColor: 'rgba(3, 20, 26, 0.95)',
+    panelColor: '#1891FF',
     panelDividerColor: 'rgb(239, 239, 245)',
     panelDividerColor: 'rgb(239, 239, 245)',
     itemTextColor: 'rgba(255, 255, 255, 0.8)',
     itemTextColor: 'rgba(255, 255, 255, 0.8)',
     itemTextColorActive: '#1AB99B',
     itemTextColorActive: '#1AB99B',

+ 1 - 1
src/components/changeLine.vue

@@ -67,7 +67,7 @@ function changeLine(item: any) {
 }
 }
 async function getLine() {
 async function getLine() {
   const res = await netService.get('/busLine/getList?hasModel=0')
   const res = await netService.get('/busLine/getList?hasModel=0')
-  if (res.success) {
+  if (res.success && res.data.length > 0) {
     originLineList.value = res.data
     originLineList.value = res.data
     // eslint-disable-next-line prefer-destructuring
     // eslint-disable-next-line prefer-destructuring
     curLine.value = res.data[0]
     curLine.value = res.data[0]

+ 11 - 2
src/components/selectDate.vue

@@ -3,7 +3,7 @@
     <div
     <div
       v-for="(itm) in btns"
       v-for="(itm) in btns"
       :key="itm.val"
       :key="itm.val"
-      :class="{ active: itm.val === checkId ,disabled:itm.disabled}"
+      :class="{ active: itm.val === checkId, disabled: itm.disabled }"
       @click="changeFn(itm.val)"
       @click="changeFn(itm.val)"
     >
     >
       {{ itm.label }}
       {{ itm.label }}
@@ -54,12 +54,21 @@ function changeFn(id: number) {
       border-left: solid 1px #2185E8;
       border-left: solid 1px #2185E8;
     }
     }
 
 
-    &.disabled{
+    &.disabled {
       cursor: not-allowed;
       cursor: not-allowed;
       pointer-events: none;
       pointer-events: none;
       // background: #ccc;
       // background: #ccc;
     }
     }
+
+    &:first-child {
+      border-radius: 30px 0 0 30px;
+    }
+
+    &:last-child {
+      border-radius: 0 30px 30px 0;
+    }
   }
   }
+
   .active {
   .active {
     background: #2185e860;
     background: #2185e860;
   }
   }