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

!1901 处理完成:#I4VO4P 更新 js-apis-commonEvent.md 及 js-components-canvas-image.md

Merge pull request !1901 from ester.zhou/TR-1719
......@@ -169,9 +169,9 @@ Publishes a common event with given attributes. This method uses a callback to r
```js
// Attributes of a common event.
var options = {
code: 0; // Result code of the common event
data: "initial data";// Result data of the common event
isOrdered: true; // The common event is an ordered one.
code: 0, // Result code of the common event
data: "initial data",// Result data of the common event
isOrdered: true // The common event is an ordered one.
}
// Callback for common event publication
function PublishCallBack(err) {
......
......@@ -89,7 +89,7 @@
export default {
onShow(){
const el =this.$refs.canvas
var ctx = this.$element('drawImage').getContext('2d');
var ctx =el.getContext('2d');
var img = new Image();
img.src = 'common/images/example.jpg';
img.onload = function() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册