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