@Entry
@Component
struct Index {
@State message: string = 'Hello World'
@State qidong: boolean = false
@State num: number = 0
onPageShow (): void {
this.qidong = true
console.log ( '页面触发', this.qidong )
animateTo ( {
duration: 2000,
iterations: -1,
curve:Curve.Linear
}, () => {
this.num = 360
} )
}
build () {
Row () {
Stack ( { alignContent: Alignment.Center } ) { //重叠居中
//最外层的圈
Column () {}
.width ( 150 )
.height ( 150 )
.backgroundColor ( 'rgba(0,0,0,0)' )
.opacity ( 0.1 ) //透明
.borderRadius ( 100 ) //圆角
.shadow ( { radius: 50, color: '#000000' } ) //阴影
.border ( { width: 1, color: '#ffffff', style: Border