Browse Source

Merge branch 'dev' of ssh://git.cestong.com.cn:8162/cecf/observe-front into dev

* 'dev' of ssh://git.cestong.com.cn:8162/cecf/observe-front:
  fix(小屏下日期甩飞问题)
wlf 9 months ago
parent
commit
144bd7c80d
2 changed files with 10 additions and 5 deletions
  1. 2 1
      src/layout/components/Navbar.vue
  2. 8 4
      src/layout/components/TimeRange.vue

+ 2 - 1
src/layout/components/Navbar.vue

@@ -445,7 +445,8 @@ export default {
     float: right;
     height: 100%;
     line-height: 50px;
-
+    width: calc(100% - 350px);
+    display: flex;
     &:focus {
       outline: none;
     }

+ 8 - 4
src/layout/components/TimeRange.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="timebox">
-      <div style="display:flex;">
-        <div>
+      <div style="display:flex;justify-content: end;">
+        <div class="date-picker-content">
           <el-date-picker 
               v-model="value" 
               type="datetimerange" 
@@ -9,7 +9,7 @@
               start-placeholder="开始日期" 
               end-placeholder="结束日期"
               format="yyyy-MM-dd HH:mm:ss"
-              style="width:100%;max-width: 300px;margin-top: 12px;" 
+              style="width:100%;max-width:fit-content;margin-top: 12px;" 
               value-format="timestamp" 
               v-if="timeType=='range'"
               size='mini'
@@ -137,7 +137,6 @@ export default {
   // },
   methods:{
     timeChange(val){
-      console.log(val,'时间改变')
       this.timeType = val; 
       let startTime,endTime;
       switch(val){
@@ -273,6 +272,11 @@ export default {
   box-sizing: border-box;
   padding:0 20px;
   display: inline-block;
+  flex:1;
+  .date-picker-content{
+    flex:1;
+    text-align: right;
+  }
 }
 // .box  ::v-deep .el-button-group > .el-button:first-child {
 //     border-top-right-radius: 0;