未验证 提交 cf88e3de 编写于 作者: O openharmony_ci 提交者: Gitee

!15712 示例代码修复

Merge pull request !15712 from 冯泽悟/master
...@@ -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.
先完成此消息的编辑!
想要评论请 注册