Commit 07d502bc87603de836635563fad1d70adaf7700a
1 parent
1ce3d0e6
fix: DEFECT-685 update component info component not recalculate
Showing
3 changed files
with
6 additions
and
7 deletions
... | ... | @@ -10,7 +10,6 @@ |
10 | 10 | import { TextComponentDefaultConfig, TextComponentLayout, TextComponentValue } from './config'; |
11 | 11 | import { SvgIcon } from '/@/components/Icon'; |
12 | 12 | import { dateUtil } from '/@/utils/dateUtil'; |
13 | - import { min } from 'lodash'; | |
14 | 13 | const props = defineProps({ |
15 | 14 | layout: { |
16 | 15 | type: Object as PropType<TextComponentLayout>, | ... | ... |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | id: string; |
16 | 16 | } |
17 | 17 | |
18 | - const emit = defineEmits(['submit', 'update', 'create', 'register']); | |
18 | + const emit = defineEmits(['update', 'create', 'register']); | |
19 | 19 | |
20 | 20 | const ROUTE = useRoute(); |
21 | 21 | |
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | }); |
65 | 65 | createMessage.success('创建成功'); |
66 | 66 | closeModal(); |
67 | - emit('submit'); | |
67 | + emit('create'); | |
68 | 68 | } catch (error) { |
69 | 69 | // createMessage.error('创建失败'); |
70 | 70 | } finally { | ... | ... |
... | ... | @@ -262,7 +262,7 @@ |
262 | 262 | |
263 | 263 | const newUpdateData = data.data.componentData[updateIndex]; |
264 | 264 | const originalData = unref(dataBoardList)[originalIndex]; |
265 | - dataBoardList.value[updateIndex] = { | |
265 | + dataBoardList.value[originalIndex] = { | |
266 | 266 | i: id, |
267 | 267 | w: originalData.w || DEFAULT_WIDGET_WIDTH, |
268 | 268 | h: originalData.h || DEFAULT_WIDGET_HEIGHT, |
... | ... | @@ -272,10 +272,10 @@ |
272 | 272 | height: originalData.height, |
273 | 273 | record: newUpdateData, |
274 | 274 | }; |
275 | - console.log(dataBoardList.value[updateIndex]); | |
275 | + | |
276 | 276 | updateSize(id, 0, 0, originalData.height || 0, originalData.width || 0); |
277 | 277 | |
278 | - // beginSendMessage(); | |
278 | + beginSendMessage(); | |
279 | 279 | } catch (error) { |
280 | 280 | } finally { |
281 | 281 | loading.value = false; |
... | ... | @@ -432,7 +432,7 @@ |
432 | 432 | <DataBindModal |
433 | 433 | @register="register" |
434 | 434 | @update="handleUpdateComponent" |
435 | - @submit="getDataBoardComponent" | |
435 | + @create="getDataBoardComponent" | |
436 | 436 | /> |
437 | 437 | <HistoryTrendModal @register="registerHistoryDataModal" /> |
438 | 438 | </section> | ... | ... |