提交 7b6eef3e 编写于 作者: F fengzewu

fix code

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