fix: 空值合并与逻辑或混用加括号(models/alerts/kb 构建语法错误)

This commit is contained in:
2026-08-06 14:57:09 +08:00
parent cd7d4fd118
commit 193d5618be
3 changed files with 3 additions and 3 deletions
@@ -68,7 +68,7 @@ const gridOptions: VxeTableGridOptions = {
proxy: {
query: async ({ page } = {}) => {
const cur = page?.currentPage ?? 1;
const size = page?.pageSize ?? alerts.value.length || 10;
const size = page?.pageSize ?? (alerts.value.length || 10);
return {
items: alerts.value.slice((cur - 1) * size, cur * size),
total: alerts.value.length,
@@ -21,7 +21,7 @@ const gridOptions: VxeTableGridOptions = {
proxy: {
query: async ({ page } = {}) => {
const cur = page?.currentPage ?? 1;
const size = page?.pageSize ?? docs.value.length || 10;
const size = page?.pageSize ?? (docs.value.length || 10);
return {
items: docs.value.slice((cur - 1) * size, cur * size),
total: docs.value.length,
@@ -70,7 +70,7 @@ const gridOptions: VxeTableGridOptions = {
query: async ({ page } = {}) => {
// page 可能缺省(分页未就绪时的首次查询),兜底返回全量
const cur = page?.currentPage ?? 1;
const size = page?.pageSize ?? models.value.length || 10;
const size = page?.pageSize ?? (models.value.length || 10);
return {
items: models.value.slice((cur - 1) * size, cur * size),
total: models.value.length,