|
@@ -28,7 +28,7 @@ import {
|
|
renderSlot
|
|
renderSlot
|
|
} from 'vue'
|
|
} from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
import { useI18n } from 'vue-i18n'
|
|
-import { NButton, NIcon, NTooltip } from 'naive-ui'
|
|
|
|
|
|
+import { dateEnGB, NButton, NIcon, NTooltip } from 'naive-ui'
|
|
import { queryLog } from '@/service/modules/log'
|
|
import { queryLog } from '@/service/modules/log'
|
|
import {
|
|
import {
|
|
DownloadOutlined,
|
|
DownloadOutlined,
|
|
@@ -68,6 +68,7 @@ export default defineComponent({
|
|
const textareaHeight = computed(() =>
|
|
const textareaHeight = computed(() =>
|
|
logContentBox.value ? logContentBox.value.clientHeight : 0
|
|
logContentBox.value ? logContentBox.value.clientHeight : 0
|
|
)
|
|
)
|
|
|
|
+ const contentRef = ref()
|
|
|
|
|
|
const boxRef = reactive({
|
|
const boxRef = reactive({
|
|
width: '',
|
|
width: '',
|
|
@@ -113,10 +114,13 @@ export default defineComponent({
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
window.$message.warning(t('project.workflow.no_more_log'))
|
|
window.$message.warning(t('project.workflow.no_more_log'))
|
|
}, 1000)
|
|
}, 1000)
|
|
- textareaLog.value.innerHTML = t('project.workflow.no_log')
|
|
|
|
|
|
+ textareaLog.value.innerHTML =
|
|
|
|
+ contentRef.value || t('project.workflow.no_log')
|
|
} else {
|
|
} else {
|
|
isDataRef.value = true
|
|
isDataRef.value = true
|
|
- textareaLog.value.innerHTML = res || t('project.workflow.no_log')
|
|
|
|
|
|
+ contentRef.value = res
|
|
|
|
+ textareaLog.value.innerHTML =
|
|
|
|
+ contentRef.value || t('project.workflow.no_log')
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
textareaLog.value.scrollTop = 2
|
|
textareaLog.value.scrollTop = 2
|
|
}, 800)
|
|
}, 800)
|
|
@@ -178,30 +182,28 @@ export default defineComponent({
|
|
/**
|
|
/**
|
|
* up
|
|
* up
|
|
*/
|
|
*/
|
|
- const onUp = _.debounce(
|
|
|
|
|
|
+ const onUp = _.throttle(
|
|
function () {
|
|
function () {
|
|
loadingIndex.value = loadingIndex.value - 1
|
|
loadingIndex.value = loadingIndex.value - 1
|
|
showLog()
|
|
showLog()
|
|
},
|
|
},
|
|
1000,
|
|
1000,
|
|
{
|
|
{
|
|
- leading: false,
|
|
|
|
- trailing: true
|
|
|
|
|
|
+ trailing: false
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|
|
/**
|
|
/**
|
|
* down
|
|
* down
|
|
*/
|
|
*/
|
|
- const onDown = _.debounce(
|
|
|
|
|
|
+ const onDown = _.throttle(
|
|
function () {
|
|
function () {
|
|
loadingIndex.value = loadingIndex.value + 1
|
|
loadingIndex.value = loadingIndex.value + 1
|
|
showLog()
|
|
showLog()
|
|
},
|
|
},
|
|
1000,
|
|
1000,
|
|
{
|
|
{
|
|
- leading: false,
|
|
|
|
- trailing: true
|
|
|
|
|
|
+ trailing: false
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|