mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-12 09:05:39 +00:00
fix: fix start action button in ActionDetailsView.vue
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import Pagination from '../components/Pagination.vue'
|
||||
import Section from 'picocrank/vue/components/Section.vue'
|
||||
@@ -155,6 +155,16 @@ async function fetchAction() {
|
||||
}
|
||||
}
|
||||
|
||||
function resetState() {
|
||||
action.value = null
|
||||
actionTitle.value = 'Action Details'
|
||||
logs.value = []
|
||||
totalCount.value = 0
|
||||
currentPage.value = 1
|
||||
searchText.value = ''
|
||||
loading.value = true
|
||||
}
|
||||
|
||||
function clearSearch() {
|
||||
searchText.value = ''
|
||||
}
|
||||
@@ -218,6 +228,16 @@ onMounted(() => {
|
||||
fetchAction()
|
||||
fetchActionLogs()
|
||||
})
|
||||
|
||||
watch(
|
||||
() => route.params.actionId,
|
||||
() => {
|
||||
resetState()
|
||||
fetchAction()
|
||||
fetchActionLogs()
|
||||
},
|
||||
{ immediate: false }
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user