MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / renderList

Function renderList

front/common.js:182–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180
181 // 渲染凭证列表
182 renderList() {
183 const list = document.getElementById(this.getElementId('CredsList'));
184 list.innerHTML = '';
185
186 const entries = Object.entries(this.filteredData);
187
188 if (entries.length === 0) {
189 const msg = this.totalCount === 0 ? '暂无凭证文件' : '当前筛选条件下暂无数据';
190 list.innerHTML = `<p style="text-align: center; color: #666;">${msg}</p>`;
191 document.getElementById(this.getElementId('PaginationContainer')).style.display = 'none';
192 return;
193 }
194
195 entries.forEach(([, credInfo]) => {
196 list.appendChild(createCredCard(credInfo, this));
197 });
198
199 document.getElementById(this.getElementId('PaginationContainer')).style.display =
200 this.getTotalPages() > 1 ? 'flex' : 'none';
201 this.updateBatchControls();
202 },
203
204 // 获取总页数
205 getTotalPages() {

Callers

nothing calls this directly

Calls 1

createCredCardFunction · 0.85

Tested by

no test coverage detected