<template>
  <div class="demo-notification-basic">
    <ui-button @click="handleInfo">
      显示通知
    </ui-button>
    <ui-button @click="handleVnode">
      包含Vnode的通知
    </ui-button>
  </div>
</template>

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

export default {
  components: {
    "ui-button": Button,
  },
  data() {
    return {
      visible: false,
    }
  },
  methods: {
    handleInfo() {
      notification({
        title: "通知",
        message: "通知内容。",
      })
    },
    handleVnode() {
      const h = this.$createElement
      notification({
        title: "通知内容为Vnode",
        message: h("a", null, [h("em", null, "Vnode ")]),
      })
    },
  },
}
</script>
