fix: ?? 与 || 混用加括号(193d561 同款语法,C2 构建修复)
This commit is contained in:
@@ -65,7 +65,7 @@ const gridOptions: VxeTableGridOptions = {
|
|||||||
query: async ({ page } = {}) => {
|
query: async ({ page } = {}) => {
|
||||||
// page 可能缺省(分页未就绪的首次查询),兜底返回全量
|
// page 可能缺省(分页未就绪的首次查询),兜底返回全量
|
||||||
const cur = page?.currentPage ?? 1;
|
const cur = page?.currentPage ?? 1;
|
||||||
const size = page?.pageSize ?? models.value.length || 10;
|
const size = page?.pageSize ?? (models.value.length || 10);
|
||||||
return {
|
return {
|
||||||
items: models.value.slice((cur - 1) * size, cur * size),
|
items: models.value.slice((cur - 1) * size, cur * size),
|
||||||
total: models.value.length,
|
total: models.value.length,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const gridOptions: VxeTableGridOptions = {
|
|||||||
query: async ({ page } = {}) => {
|
query: async ({ page } = {}) => {
|
||||||
// page 可能缺省(分页未就绪的首次查询),兜底返回全量
|
// page 可能缺省(分页未就绪的首次查询),兜底返回全量
|
||||||
const cur = page?.currentPage ?? 1;
|
const cur = page?.currentPage ?? 1;
|
||||||
const size = page?.pageSize ?? rows.value.length || 10;
|
const size = page?.pageSize ?? (rows.value.length || 10);
|
||||||
return {
|
return {
|
||||||
items: rows.value.slice((cur - 1) * size, cur * size),
|
items: rows.value.slice((cur - 1) * size, cur * size),
|
||||||
total: rows.value.length,
|
total: rows.value.length,
|
||||||
|
|||||||
Reference in New Issue
Block a user