Skip to content

Commit 18861b4

Browse files
authored
fix: 修复上传文档懒加载无法加载第二页 (#407)
1 parent b123f0f commit 18861b4

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

ui/src/views/dataset/component/ParagraphList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:size="paragraph_list.length"
55
:total="modelValue.length"
66
:page_size="page_size"
7-
v-model:current_page="current_page"
7+
v-bind:current_page="current_page"
88
@load="next()"
99
:loading="loading"
1010
>

ui/src/views/dataset/component/ParagraphPreview.vue

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<el-tabs v-model="activeName" class="paragraph-tabs">
3-
<template v-for="(item, index) in newData" :key="index">
3+
<template v-for="(item, index) in data" :key="index">
44
<el-tab-pane :label="item.name" :name="index">
55
<template #label>
66
<div class="flex-center">
@@ -21,35 +21,19 @@
2121
</el-tabs>
2222
</template>
2323
<script setup lang="ts">
24-
import { ref, onMounted, watch } from 'vue'
24+
import { ref } from 'vue'
2525
import { getImgUrl } from '@/utils/utils'
2626
import ParagraphList from './ParagraphList.vue'
2727
28-
const props = defineProps({
28+
defineProps({
2929
data: {
3030
type: Array<any>,
3131
default: () => []
3232
},
3333
isConnect: Boolean
3434
})
3535
36-
const emit = defineEmits(['update:data'])
37-
3836
const activeName = ref(0)
39-
40-
const newData = ref<any[]>([])
41-
42-
watch(
43-
() => props.data,
44-
(value) => {
45-
newData.value = value
46-
},
47-
{
48-
immediate: true
49-
}
50-
)
51-
52-
onMounted(() => {})
5337
</script>
5438
<style scoped lang="scss">
5539
.paragraph-tabs {

0 commit comments

Comments
 (0)