From aca6d7555358e5a3d341d4344e7c4bc4fcd37b87 Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 10 Aug 2023 15:05:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dprops=E7=AE=80=E5=86=99?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/constants.js b/src/constants.js index 31612cc..d33d830 100644 --- a/src/constants.js +++ b/src/constants.js @@ -136,7 +136,9 @@ export function parsePropsDeclaration(options) { options.default = options.hasOwnProperty('default') ? options.default : getDefaultValue(options.type) - options.attribute = true + options.attribute = options.hasOwnProperty('attribute') + ? options.attribute + : true return options }