<template>
    <div class="ht-base-modal-prompt-demo">
        <ht-base-button @click="instance('info')">信息</ht-base-button>
        <ht-base-button @click="instance('success')">成功</ht-base-button>
        <ht-base-button @click="instance('warning')">警告</ht-base-button>
        <ht-base-button @click="instance('error')">失败</ht-base-button>
    </div>
</template>

<script>
  export default {
    name: 'HtBaseModalPromptDemo',
      methods: {
          instance (type) {
              const title = '这是一条通知消息';
              const title2 = '这是一条成功消息';
              const title3 = '这是一条警告消息';
              const title4 = '这是一条错误消息';
              const content = '<p>这里是一些消息详情这里是一些消息详情这里是一些消息详情这里是一些消息详情这里是一些消息详…</p>';
              switch (type) {
                  case 'info':
                      this.$HtBaseModal.info({
                          title: title,
                          content: content
                      });
                      break;
                  case 'success':
                      this.$HtBaseModal.success({
                          title: title2,
                          content: content
                      });
                      break;
                  case 'warning':
                      this.$HtBaseModal.warning({
                          title: title3,
                          content: content
                      });
                      break;
                  case 'error':
                      this.$HtBaseModal.error({
                          title: title4,
                          content: content
                      });
                      break;
              }
          }
      }
  }
</script>
<style>
    .ht-base-modal-prompt-demo {

    }
</style>

