<template>
  <span class="high_light">
    <span @click="handleCLick['detail']">{{ value }}</span>
  </span>
</template>
<script>
export default {
  name: 'HighLight',
  components: {
  },
  props: {
    value: {
      type: String || Number,
      default: '',
    },
    rowData: {
      type: Object,
      default: () => {
        return {};
      },
    },
    dialogTitle: {
      type: String,
      default: '',
    },
    action: {
      type: String, // detail (交易明细)
      default: '',
    },
  },
  data() {
    return {
      dcsDetailsDialogVisible: false,
      handleCLick: {
        'detail': () => {
          // console.log('this.rowData', this.rowData);

          // TODO 存在节点销毁失败和性能问题，插件后续优化
          this.$dcsDetailsDialog({
            title: this.dialogTitle,
            dealId: this.rowData?.dealId,
            product: this.rowData?.product,
            instrument: this.rowData?.instrument,
            onClose: () => {
              console.log('close decDetailsDialog');
              // 在这里处理取消事件
            },
          });
        },
      },
    };
  },
  methods: {

  },
};
</script>
<style lang="scss" scoped>
.high_light {
  cursor: pointer;
  color: #017BFF;
}
</style>
