diff --git a/packages/taro-cli/src/doctor/configSchema.ts b/packages/taro-cli/src/doctor/configSchema.ts index 202ffa036edd..5f77ecc33927 100644 --- a/packages/taro-cli/src/doctor/configSchema.ts +++ b/packages/taro-cli/src/doctor/configSchema.ts @@ -3,7 +3,7 @@ import * as Joi from 'joi' const schema = Joi.object().keys({ projectName: Joi.string().required(), date: Joi.date(), - designWidth: Joi.number().integer().positive(), + designWidth: Joi.alternatives(Joi.number().integer().positive(), Joi.function()), deviceRatio: Joi.object().pattern(Joi.number(), Joi.number()), sourceRoot: Joi.string().required(), outputRoot: Joi.string().required(),