#星计划# 鸿蒙 HarmonyOS Arkts ArkUI 彩色旋转线条 加载中 原创

特创码农
发布于 2024-1-20 19:54
3083浏览
0收藏

#星计划# 鸿蒙 HarmonyOS Arkts ArkUI 彩色旋转线条 加载中-鸿蒙开发者社区

    @Entry
    @Component
    struct Index {
      @State num : number = 0
      @State numZ : number = 100
      @State twonum : number = 90
      @State twonumZ : number = 90
      @State treenum : number = 180
      @State treenumZ : number = 90
      @State formnum : number = 270
      @State formnumZ : number = 270
      onPageShow (): void {
        console.log ( '页面触发')
        animateTo ( {
          duration: 2000,
          iterations: -1,
          curve:Curve.Linear
        }, () => {
          this.num = 360
          this.numZ=470
          this.twonum = 450
          this.twonumZ = 470
          this.treenum = 480
          this.treenumZ = 450
          this.formnum = 610
          this.formnumZ = 630
        } )
 
      }
 
      build() {
      Stack(){
        //一
       Row(){}
       .width(190)
       .height(190)
       .border({width:{bottom:8},color:'rgb(255, 141, 249)',style:BorderStyle.Solid})
       .borderRadius(90)
       .rotate ( {
         x: 50,
         y: 0,
         z: this.numZ,
         angle: this.num,
         centerX:80,
         centerY:80,
       } )
        //二
        Row(){}
        .width(190)
        .height(190)
        .border({width:{bottom:8},color:'rgb(255, 65, 106)',style:BorderStyle.Solid})
        .borderRadius(90)
        .rotate ( {
          x: 20,
          y: 50,
          z: this.twonumZ,
          angle: this.twonum,
          centerX:80,
          centerY:80,
        } )
        //三
        Row(){}
        .width(190)
        .height(190)
        .border({width:{bottom:8},color:'rgb(0, 255, 255)',style:BorderStyle.Solid})
        .borderRadius(90)
        .rotate ( {
          x: 40,
          y: 150,
          z: this.treenumZ,
          angle: this.treenum,
          centerX:80,
          centerY:80,
        } )
        //四
        Row(){}
        .width(190)
        .height(190)
        .border({width:{bottom:8},color:'rgb(252, 183, 55)',style:BorderStyle.Solid})
        .borderRadius(90)
        .rotate ( {
          x: 70,
          y: 0,
          z: this.formnumZ,
          angle: this.formnum,
          centerX:80,
          centerY:80,
        } )
        Row(){
          Text('加载中...')
            .fontColor(Color.White)
        }
     }
     .width('100%')
     .height('100%')
     .backgroundColor('#212121')
      }
    }
 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.

亲爱的读者:

首先,我要感谢您抽出宝贵的时间阅读这篇文章。我深知,您的每一分每一秒都是宝贵的。为此,我在创作这篇文章时付出了巨大的努力,力求为您提供最具价值的内容。

这篇文章汇聚了我多年的经验与心得,我深信,其中的信息将对您的生活或工作有所启发。如果您觉得这篇文章对您有所裨益,那么,我诚邀您给予一定的赞赏。这份微薄的费用,对您来说可能只是举手之劳,但对我而言,却是极大的鼓励和支持。

我始终坚信,知识的分享是一种力量。因此,我笔耕不辍,希望通过文字与您共同成长。您的每一次支持,都是对我最大的鼓舞,也激发了我创作更多优质内容的热情。

如果您愿意为我加油打气,诚邀您给予一定的赞赏。同时,您的反馈和建议对我而言意义非凡,期待与您在评论区交流心得。

再次感谢您的阅读与支持!愿您一切安好,技术超标。

#星计划# 鸿蒙 HarmonyOS Arkts ArkUI 彩色旋转线条 加载中-鸿蒙开发者社区

再次感谢您的阅读和支持!

最诚挚的问候, “特创码农

©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
收藏
回复
举报
回复
    相关推荐