Commit 1dfcf747d062f0faf723d83c81d5ee93fcada8cd

Authored by ww
1 parent b1cb3fac

perf: history trend form layout

@@ -292,5 +292,6 @@ @@ -292,5 +292,6 @@
292 <style> 292 <style>
293 .history-modal .ant-input-number { 293 .history-modal .ant-input-number {
294 min-width: 0 !important; 294 min-width: 0 !important;
  295 + width: 100% !important;
295 } 296 }
296 </style> 297 </style>
@@ -2,14 +2,14 @@ @@ -2,14 +2,14 @@
2 import { BasicForm, useForm } from '/@/components/Form'; 2 import { BasicForm, useForm } from '/@/components/Form';
3 import { defaultSchemas, SchemaFiled } from './config'; 3 import { defaultSchemas, SchemaFiled } from './config';
4 import { onMounted } from 'vue'; 4 import { onMounted } from 'vue';
  5 + import { useGridLayout } from '/@/hooks/component/useGridLayout';
  6 + import { ColEx } from '/@/components/Form/src/types';
5 7
6 const emit = defineEmits(['register']); 8 const emit = defineEmits(['register']);
7 const [register, method] = useForm({ 9 const [register, method] = useForm({
8 schemas: defaultSchemas, 10 schemas: defaultSchemas,
9 labelWidth: 120, 11 labelWidth: 120,
10 - baseColProps: {  
11 - span: 5,  
12 - }, 12 + baseColProps: useGridLayout(2, 3, 4) as unknown as ColEx,
13 fieldMapToTime: [ 13 fieldMapToTime: [
14 [SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS], 'YYYY-MM-DD HH:mm:ss'], 14 [SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS], 'YYYY-MM-DD HH:mm:ss'],
15 ], 15 ],
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
43 width="70%" 43 width="70%"
44 :minHeight="400" 44 :minHeight="400"
45 :footer="null" 45 :footer="null"
  46 + wrap-class-name="history-trend-model"
46 :canFullscreen="false" 47 :canFullscreen="false"
47 @cancel="handleCancelModal" 48 @cancel="handleCancelModal"
48 > 49 >
@@ -487,6 +488,11 @@ @@ -487,6 +488,11 @@
487 } 488 }
488 </style> 489 </style>
489 <style> 490 <style>
  491 + .history-trend-model .ant-input-number {
  492 + min-width: 0 !important;
  493 + width: 100% !important;
  494 + }
  495 +
490 .device-status__alarm { 496 .device-status__alarm {
491 transform-origin: 10px 15px; 497 transform-origin: 10px 15px;
492 animation: 0.5s linear 0s infinite alternate Scale; 498 animation: 0.5s linear 0s infinite alternate Scale;