diff --git a/zh-cn/application-dev/reference/apis/js-apis-effect.md b/zh-cn/application-dev/reference/apis/js-apis-effect.md index ba25cf8e88d385a4d21c15cbfe608bba3cf59179..ad7609a9283c547a11eaf8ade3ab1486694984b6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-effect.md +++ b/zh-cn/application-dev/reference/apis/js-apis-effect.md @@ -132,10 +132,11 @@ getMainColor(): Promise\; **示例:** ```js -colorPicker.getMainColor().then(() => { - console.log('get main color succeeded.'); //符合条件则进入 +colorPicker.getMainColor().then(color => { + console.log('get main color succeeded.') + console.info("color[ARGB]=" + color.alpha "," + color.red + "," + color.green + "," + color.blue); }).catch(error => { - console.log('get main color failed.'); //不符合条件则进入 + console.log('get main color failed.'); }) ```