提交 2ce44d69 编写于 作者: W wangshuainan

修改docs文档"

Signed-off-by: Nwangshuainan <wangshuainan1@huawei.com>
上级 369e833b
...@@ -41,8 +41,8 @@ Canvas(context?: CanvasRenderingContext2D) ...@@ -41,8 +41,8 @@ Canvas(context?: CanvasRenderingContext2D)
@Entry @Entry
@Component @Component
struct CanvasExample { struct CanvasExample {
private settings: RenderingContextSettings = new RenderingContextSettings(true); private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...@@ -52,8 +52,8 @@ struct CanvasExample { ...@@ -52,8 +52,8 @@ struct CanvasExample {
.backgroundColor('#ffff00') .backgroundColor('#ffff00')
.onReady(() => { .onReady(() => {
this.context.fillRect(0, 30, 100, 100) this.context.fillRect(0, 30, 100, 100)
}); })
}; }
.width('100%') .width('100%')
.height('100%') .height('100%')
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册