Q: Solving the white screen and unresponsive button problems in a quick app When my quick app was opened, a white screen displayed for a while before in-app content appeared. The buttons also needed a while to respond to a tap event.
Below is the code used:


<template>
  <!-- Only one root node is allowed in template. -->
  <div class="container">
    <input type="button" value=" generate" onclick="write" />
    <input type="button" value="delete" onclick="remove" />
  </div>
</template>

<style>
  .container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: red;
  }
</style>

<script>
  import file from '@system.file'
  import prompt from '@system.prompt';
  module.exports = {
    data: {
      componentData: {},
      arr: [],
      file: '',
      fileuri: '',
    },
    onInit() {
    },
    onReady() {
      this.write()
    },
    write() {
      console.log("handling success 11222111");
      for (let i = 0; i < 10000; i++) {
        file.writeText({
          uri: 'internal://cache/test/test' + i + '.txt',
          text: 'nihaadpafsafa fsafass faf  sfsa sf',
          encoding: 'UTF-8',
          success: function () {
            console.log('success');
          },
        })
      }
      console.log("handling success 11111");
      prompt.showToast({
        message: '10,000 files written.',
        duration:"2000",
      })
    },
    remove() {
      file.list({
        uri: "internal://cache/test/",
        success: function (data) {
          console.log(data)
          for (let i = 0; i < 1000; i++) {
            console.log("message", data.fileList[i].uri);
            file.delete({
              uri: data.fileList[i].uri,
              success: function (data) {
                console.log("hjj handling success");
              },
              fail: function (data, code) {
                console.log("handling fail, code=" + code + data);
              }
            })
          }
        },
        fail: function (data, code) {
          console.log("handling fail, code=" + code);
        }
      })
      prompt.showToast({
        message: '10,000 files deleted.',
        duration:"2000",
      })
    }
  }
</script>


While running the code, it showing blank screen. Please help me to solve this issue.
Please find the attached image : [![See Image][1]][1]
[1]: https://i.stack.imgur.com/Xu190.png
