<template>
  <Node
    :title="config.nodeName"
    :content="content"
    placeholder="流程结束"
    :header-bgc="headerBgc"
    :is-end="isEnd"
    @insertNode="handleInsertNode"
  />
</template>

<script>
import Node from './Node.vue';
//结束节点
export default {
  name: 'EndNode',
  components: {
    Node
  },
  props: {
    config: {
      type: Object,
      default: () => ({})
    }
  },
  computed: {
    isEnd() {
      if (this.config.showClose) {
        return !this.config.showClose;
      }
      return true;
    },
    content() {
      return '流程结束';
    },
    headerBgc() {
      return '#878fa4';
    },
  },
  methods: {
    handleInsertNode(type) {
      this.$emit('insertNode', type)
    }
  }
};
</script>

<style scoped></style>
