UNPKG

@opentiny/tiny-toolkit-pro

Version:

TinyPro Vue:开箱即用、前后端分离的 Vue 后台管理模板

13 lines (11 loc) 445 B
import { IsOptional } from 'class-validator'; import { Transform} from 'class-transformer'; import * as process from "process"; export class PaginationQueryDto { @IsOptional() @Transform(value => isNaN(Number(value)) ? 1 : Number(value)) page?: number = Number(process.env.PAGITION_PAGE); @IsOptional() @Transform(value => isNaN(Number(value)) ? 10 : Number(value)) limit?: number = Number(process.env.PAGITION_PAGE); }