提交 20b6f88b 编写于 作者: F fengzewu

fix code

Signed-off-by: Nfengzewu <fengzewu@huawei.com>
上级 283b8557
......@@ -947,8 +947,18 @@ createImageSource(uri: string): ImageSource
**示例:**
```js
let context = featureAbility.getContext();
let path = context.getCacheDir() + "test.jpg";
//Stage模型
const context = getContext(this);
const path = context.getCacheDir() + "/test.jpg";
const imageSourceApi = image.createImageSource(path);
```
```js
//FA模型
import featureAbility from '@ohos.ability.featureAbility';
const context = featureAbility.getContext();
const path = context.getCacheDir() + "/test.jpg";
const imageSourceApi = image.createImageSource(path);
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册