DEV Community

HarmonyOS
HarmonyOS

Posted on

[Sports Watch][API 6] How to add the loading animation effect to the motion table?

Read the original article:[Sports Watch][API 6] How to add the loading animation effect to the motion table?

Add the following code to the hml file

<image-animator if="{{ meds == null }}" images="{{ loaderFrames }}" duration="800ms" style="width : 128px; height : 128px;" />Copy codeCopy code
Enter fullscreen mode Exit fullscreen mode

And also add following code to js file

export default {
    data: {
        loaderFrames: [
            {src: "/common/l/000.png"}, {src: "/common/l/045.png"}, {src: "/common/l/090.png"}, {src: "/common/l/135.png"},
            {src: "/common/l/180.png"}, {src: "/common/l/225.png"}, {src: "/common/l/270.png"}, {src: "/common/l/315.png"}

        ],
    }
Enter fullscreen mode Exit fullscreen mode

Written by Aycanur Ucar

Top comments (0)