Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import {
NPagination,
NSpace,
NTooltip,
NPopconfirm
NPopconfirm,
NSkeleton
} from 'naive-ui'
import {
defineComponent,
Expand All @@ -42,6 +43,7 @@ import TimingModal from './components/timing-modal'
import VersionModal from './components/version-modal'
import CopyModal from './components/copy-modal'
import type { Router } from 'vue-router'
import type { IDefinitionData } from './types'
import Search from '@/components/input-search'
import DependenciesModal from '@/views/projects/components/dependencies/dependencies-modal'
import totalCount from '@/utils/tableTotalCount'
Expand Down Expand Up @@ -144,6 +146,9 @@ export default defineComponent({
const { t } = useI18n()
const { loadingRef } = this

const showSkeleton =
loadingRef && (!this.tableData || this.tableData.length === 0)

return (
<NSpace vertical>
<Card>
Expand Down Expand Up @@ -184,16 +189,24 @@ export default defineComponent({
</Card>
<Card title={t('project.workflow.workflow_definition')}>
<NSpace vertical>
<NDataTable
loading={loadingRef}
rowKey={(row) => row.code}
columns={this.columns}
data={this.tableData}
striped
v-model:checked-row-keys={this.checkedRowKeys}
row-class-name='items'
scrollX={this.tableWidth}
/>
{showSkeleton ? (
<NSkeleton
height='40px'
repeat={Math.min(this.pageSize || 10, 10)}
sharp={false}
/>
) : (
<NDataTable
loading={loadingRef}
rowKey={(row: IDefinitionData) => row.code}
columns={this.columns}
data={this.tableData}
striped
v-model:checked-row-keys={this.checkedRowKeys}
row-class-name='items'
scrollX={this.tableWidth}
/>
Comment on lines 199 to 208
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table loading prop is now hard-coded to false, and the skeleton is only shown when tableData is empty. When loadingRef is true but there is existing data (common during search/pagination/refresh), the UI will show neither the skeleton nor a loading indicator, which undermines the goal of providing feedback during fetches. Consider passing loadingRef to NDataTable when tableData is non-empty (or adjusting the skeleton condition/clearing tableData before fetch) so users still get a loading signal.

Copilot uses AI. Check for mistakes.
)}
<NSpace justify='space-between'>
<NSpace>
<NTooltip>
Expand Down