Commit 1dfcf747d062f0faf723d83c81d5ee93fcada8cd

Authored by ww
1 parent b1cb3fac

perf: history trend form layout

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