perf: 优化数据结构

This commit is contained in:
kuaifan 2025-04-06 23:14:20 +08:00
parent 7b5867e2c0
commit 92dfea677b
3 changed files with 13 additions and 3 deletions

View File

@ -580,8 +580,9 @@ class ReportController extends AbstractController
return Base::retError("报告不存在或已被删除");
}
$reportTag = count($reportMsgs) > 1 ? 'li' : 'p';
$reportMsgs = array_map(function ($item) use ($reportTag) {
return "<{$reportTag}>{$item}</{$reportTag}>";
$reportAttr = $reportTag === 'li' ? ' data-list="ordered"' : '';
$reportMsgs = array_map(function ($item) use ($reportAttr, $reportTag) {
return "<{$reportTag}{$reportAttr}>{$item}</{$reportTag}>";
}, $reportMsgs);
if ($reportTag === 'li') {
array_unshift($reportMsgs, "<ol>");

View File

@ -93,7 +93,10 @@
<Option value="unread">{{ $L('标记未读') }}</Option>
<Option value="share">{{ $L('分享到消息') }}</Option>
</Select>
<Button :loading="loadIng > 0" type="primary" @click="selectClick" :disabled="selectAction=='' || selectIds.length==0">{{$L('执行')}}</Button>
<Button :loading="loadIng > 0" type="primary" @click="selectClick" :disabled="selectAction=='' || selectIds.length==0">
<span>{{$L('执行')}}</span>
<em v-if="selectIds.length > 0">({{selectIds.length}})</em>
</Button>
</div>
<!-- 分页 -->
<Page

View File

@ -607,6 +607,12 @@ body {
max-width: 200px;
margin-right: 3px;
}
.ivu-btn {
em {
font-style: normal;
padding-left: 2px;
}
}
}
.ivu-page {
padding: 0;