<template>
  <div>
    <iot-header :data='{
      title,
      right
    }'></iot-header>
  </div>
</template>
<script lang="ts">
import Vue from 'vue'
import { IotHeader, Icon } from '../../tunas'

export default Vue.extend({
  components: {
    IotHeader,
    Icon
  },
  data() {
    return {
      title: '标题挡在这里', // device-config 配置的 deviceInfo.title  也可以手动设置
      right: [{
        type: 'image',
        eventFunc: () => {
          alert('you clicked on me1 !')
        },
        content: 'https://img.alicdn.com/tfs/TB1yOtHB9zqK1RjSZFLXXcn2XXa-40-40.png'
      // }, {
      //   type: 'text',
      //   eventFunc: () => {
      //     alert('you clicked on me1 !')
      //   },
      //   content: '哈哈'
      }]
    }
  },
  methods: {
    onClick (type) {
      console.log(type)
    },
    onReady (obj) {
      console.log('ready', obj)
    }
  }
})
</script>
