<template>
  <div>
    <button @click="showDialog">点击显示 Dialog</button>
    <Dialog :data="data" v-on:handClick="handClick">
      <icon icon="icon-back"></icon>
      would you like to grow?
    </Dialog>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
import { Dialog, Icon } from '../../tunas'

export default Vue.extend({
  components: {
    Dialog,
    Icon
  },

  data() {
    return {
      data: {
        show: false,
        minHeight: '60px',
      }
    }
  },

  methods: {
    handClick(val) {
      console.log('返回数据', val)
    },
    showDialog(v) {
      this.data.show = true
      // this.$dialog({
      //   minHeight: '60px',
      //   text: '定时修改失败<br/>请检查设备是否在线22',
      // })
    }
  }
})
</script>
