From 5679cbbb630092a197d991cb41997a2d953261e9 Mon Sep 17 00:00:00 2001 From: Riku <risaku@163.com> Date: 星期三, 11 六月 2025 22:49:07 +0800 Subject: [PATCH] 动态溯源(待完成) --- src/views/sourcetrace/SourceTrace.vue | 50 +++++++++++++++++++++++++++----------------------- 1 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/views/sourcetrace/SourceTrace.vue b/src/views/sourcetrace/SourceTrace.vue index 5286e19..0a122c8 100644 --- a/src/views/sourcetrace/SourceTrace.vue +++ b/src/views/sourcetrace/SourceTrace.vue @@ -15,9 +15,14 @@ ref="scrollContentRef" style="display: flex; width: fit-content" > - <template v-for="(item, index) in streams" :key="index"> - <PollutedClueItem :item="item"></PollutedClueItem> - </template> + <TransitionGroup name="list"> + <div v-for="(item, index) in streams" :key="index"> + <PollutedClueItem + :item="item" + @showMarksAndPolygon="showMarksAndPolygon" + ></PollutedClueItem> + </div> + </TransitionGroup> </div> </el-scrollbar> </template> @@ -187,26 +192,6 @@ }); } -function formatPercentage(value) { - return Math.round(value * 100) + '%'; -} - -function formatDistanceType(value) { - switch (value) { - case 'TYPE1': - return '50绫�'; - case 'TYPE2': - return '50绫� - 500绫�'; - case 'TYPE3': - return '50绫� - 1鍏噷'; - case 'TYPE4': - return '50绫� - 2鍏噷'; - - default: - break; - } -} - /******************************************************************************************************************** */ /** @@ -339,3 +324,22 @@ margin-bottom: 4px; } </style> +<style> +.list-move, /* 瀵圭Щ鍔ㄤ腑鐨勫厓绱犲簲鐢ㄧ殑杩囨浮 */ +.list-enter-active, +.list-leave-active { + transition: all 0.5s ease; +} + +.list-enter-from, +.list-leave-to { + opacity: 0; + transform: translateX(30px); +} + +/* 纭繚灏嗙寮�鐨勫厓绱犱粠甯冨眬娴佷腑鍒犻櫎 + 浠ヤ究鑳藉姝g‘鍦拌绠楃Щ鍔ㄧ殑鍔ㄧ敾銆� */ +.list-leave-active { + position: absolute; +} +</style> \ No newline at end of file -- Gitblit v1.9.3