<template>
  <div ref="withScopeId">
    <div>page</div>
    <p>{{ $t('name', ['Jack', 'Job']) }}</p>
    <p @click="onTest">{{ $t('home') }}</p>
    <el-input
      v-model="input"
      placeholder="请输入内容"
    />
    <!-- <WrapRole /> -->
    <!-- <HelloWorld/> -->
    <!-- <role /> -->
  </div>
</template>

<script>
// import hoc from '../../utils/hoc';
// import Role from './role.vue';
// const hocc = hoc();
// const WrapRole = hoc(Role);
import ScopeIdMixin from '@/layouts/mixin/ScopeIdMixin';
export default {
  name: 'Page',
  components: {
    // WrapRole,
    // Role,
  },
  mixins: [ScopeIdMixin],
  props: {
    options: Object,
  },
  // computed: {
  //   loadOptions() {
  //     // const { extraData = {} } = this.$route.meta || {};
  //     // const params = filterOptions(transformOptions(extraData));
  //     // return this.options || this.loadOptions;
  //   },
  // },
  data() {
    return {
      input: '',
    };
  },
  created() {
    this.getData();
  },
  mounted() {
    // console.log('----load--------1111', this.$route);
    // const { scopeId } = this.loadOptions;
    // this.getData();
    // Eui.Ipc.addSubscribes(
    //   {
    //     'test:message': (e, data) => {
    //       console.log('---test---message', data)
    //     }
    //   },
    //   { scopeId },
    // );
  },
  methods: {
    // @log(),
    getData: function() {
      console.log('获取数据');
    },
    onTest: function() {
      // console.log('------acopr---1111', this.loadOptions.scopeId)
      // Eui.Ipc.send('test:message', 2)
    },
  },
};
</script>
