diff --git a/zh-cn/application-dev/reference/apis/js-apis-timer.md b/zh-cn/application-dev/reference/apis/js-apis-timer.md index 003c1f0c2544bbf65faa8a29b34b1227c9160eb9..8085456cf414c6b960aa2f6bc6a5ca003bc777f5 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-timer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-timer.md @@ -3,13 +3,6 @@ ## setTimeout -## 导入模块 - - -``` -import Time from '@ohos.Time'; -``` - setTimeout(handler[,delay[,…args]]): number 设置一个定时器,该定时器在定时器到期后执行一个函数。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md index 3cf21fa6c0375a06dfff3802f382298ec0738bb0..eae7d97a240058a8d676acd8bdb283bca0266a4b 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md @@ -1,6 +1,7 @@ # 形状裁剪 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** +> > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 @@ -21,6 +22,7 @@ ## 示例 ``` +// xxx.ets @Entry @Component struct ClipAndMaskExample { @@ -28,24 +30,24 @@ struct ClipAndMaskExample { Column({ space: 5 }) { Text('clip').fontSize(9).width('90%').fontColor(0xCCCCCC) // 用一个280px直径的圆对图像进行裁剪 - Image('/comment/bg.jpg') + Image($r('app.media.example')) .clip(new Circle({ width: 80, height: 80 })) .width('500px').height('280px') Row() { - Image('/comment/bg.jpg').width('500px').height('280px') + Image($r('app.media.example')).width('500px').height('280px') } .clip(true) .borderRadius(20) Text('mask').fontSize(9).width('90%').fontColor(0xCCCCCC) // 给图像添加了一个500px*280px的遮罩 - Image('/comment/bg.jpg') + Image($r('app.media.example')) .mask(new Rect({ width: '500px', height: '280px' }).fill(Color.Gray)) .width('500px').height('280px') // 给图像添加了一个280px*280px的圆遮罩 - Image('/comment/bg.jpg') + Image($r('app.media.example')) .mask(new Circle({ width: '280px', height: '280px' }).fill(Color.Gray)) .width('500px').height('281px') }