fix: 空值合并与逻辑或混用加括号(models/alerts/kb 构建语法错误)
This commit is contained in:
@@ -68,7 +68,7 @@ const gridOptions: VxeTableGridOptions = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
query: async ({ page } = {}) => {
|
query: async ({ page } = {}) => {
|
||||||
const cur = page?.currentPage ?? 1;
|
const cur = page?.currentPage ?? 1;
|
||||||
const size = page?.pageSize ?? alerts.value.length || 10;
|
const size = page?.pageSize ?? (alerts.value.length || 10);
|
||||||
return {
|
return {
|
||||||
items: alerts.value.slice((cur - 1) * size, cur * size),
|
items: alerts.value.slice((cur - 1) * size, cur * size),
|
||||||
total: alerts.value.length,
|
total: alerts.value.length,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const gridOptions: VxeTableGridOptions = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
query: async ({ page } = {}) => {
|
query: async ({ page } = {}) => {
|
||||||
const cur = page?.currentPage ?? 1;
|
const cur = page?.currentPage ?? 1;
|
||||||
const size = page?.pageSize ?? docs.value.length || 10;
|
const size = page?.pageSize ?? (docs.value.length || 10);
|
||||||
return {
|
return {
|
||||||
items: docs.value.slice((cur - 1) * size, cur * size),
|
items: docs.value.slice((cur - 1) * size, cur * size),
|
||||||
total: docs.value.length,
|
total: docs.value.length,
|
||||||
|
|||||||
@@ -70,7 +70,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,
|
||||||
|
|||||||
Reference in New Issue
Block a user