提交 871ddf4d 编写于 作者: W wangmiaoliang

js-apis-effect.md

Signed-off-by: Nwangmiaoliang <wangmiaoliang@huawei.com>
Change-Id: I9296e749640ecf11c0f3e4bbf8c61de3b7760761
上级 14d6fc7e
......@@ -132,10 +132,11 @@ getMainColor(): Promise\<Color>;
**示例:**
```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.');
})
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册