fix: 修复下载/访问记录弹窗内容不渲染(VModal+OverlayScrollbars 下 v-if 插入报错)
- RecordsDrawer 改用 v-show 常驻渲染,避免打开弹窗后动态插入节点触发 insertBefore 异常 - 版本 1.3.2
This commit is contained in:
@@ -201,13 +201,18 @@ watch(
|
||||
</VSpace>
|
||||
</div>
|
||||
|
||||
<VLoading v-if="loading" />
|
||||
<!--
|
||||
注意:Halo VModal 用 OverlayScrollbars 重排了弹窗内容 DOM,
|
||||
打开弹窗后再用 v-if 插入节点会触发 insertBefore 报错(内容丢失)。
|
||||
因此这里所有状态始终渲染,仅用 v-show 切换显隐。
|
||||
-->
|
||||
<VLoading v-show="loading" />
|
||||
<VEmpty
|
||||
v-else-if="records.length === 0"
|
||||
v-show="!loading && records.length === 0"
|
||||
:title="isLink ? '暂无访问记录' : '暂无下载记录'"
|
||||
:message="isLink ? '该链接还没有产生访问' : '该资源还没有产生下载'"
|
||||
/>
|
||||
<div v-else class="table-wrapper">
|
||||
<div v-show="!loading && records.length > 0" class="table-wrapper">
|
||||
<table class="records-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -244,7 +249,7 @@ watch(
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div v-if="total > 0" class="records-pagination">
|
||||
<div v-show="total > 0" class="records-pagination">
|
||||
<VPagination
|
||||
v-model:page="page"
|
||||
v-model:size="size"
|
||||
|
||||
Reference in New Issue
Block a user