<template>
  <div class="h100 w100">
    <zgh-header :title="$route.name"></zgh-header>
    <div class="common-top mainBox">
      <!------------强大的分割线-------------->
      <button class="common-btn mg20" @click="showToast">Toast</button>
      <div class="highlight mgB30">
        <div class="wp fs14">
          <p>
            显示：this.$toast.show()
          </p>
          <p>
            隐藏：this.$Toast.close()
          </p>
          <pre>
            <code class="hljs language-html">
    <h3 class="bold fs16">本例用法：</h3>
              {{code | htmlDecode}}
            </code>
          </pre>
          <h3 class="bold color3 textC pdB20">options参数说明</h3>
          <zgh-table :tbody="tbody"></zgh-table>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

  export default {
    data() {
      return {
        n: 0,
        tbody: [
          {name: 'message', explain: '提示文字', type: 'String', default: ''},
          {name: 'isMaskClick', explain: '点击遮罩是否隐藏', type: 'Boolean', default: 'false'},
          {name: 'styles', explain: '新增自定义样式', type: 'Object', default: ''},
          {name: 'onHide', explain: '隐藏Toast', type: 'Function', default: ''},
          {name: 'onShow', explain: '显示Toast', type: 'Function', default: ''}
        ],
        code: `this.$toast.show()`
      }
    },
    computed: {},
    mounted() {
    },
    methods: {
      showToast() {
        this.$toast({message:'功能完功能完善中...'})
      }
    }
  }
</script>

<style lang="less" scoped>
  @import url("../../assets/config.less");

  a {
    display: block;
    text-align: center;
    .lh(70);
  }
</style>
