<template>
  <div class="demo-message-loading">
    <ui-button @click="handleClick">
      提示加载中
    </ui-button>
  </div>
</template>

<script>
import { Button } from "amumu-ui"
import { message } from "amumu-ui/src/factory"

export default {
  components: {
    "ui-button": Button,
  },
  methods: {
    handleClick() {
      const vm = message.loading("加载中...")

      setTimeout(() => {
        vm.close()
      }, 3000)
    },
  },
}
</script>
