John Niang
2021-02-07 c81d48e734b09217fa42df2358e616a970006eab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<template>
  <div :class="`${prefixCls}__header`">
    <BasicTitle :helpMessage="helpMessage">
      <template v-if="title">
        {{ title }}
      </template>
      <template v-else>
        <slot name="title"></slot>
      </template>
    </BasicTitle>
 
    <div :class="`${prefixCls}__action`">
      <slot name="action"></slot>
      <BasicArrow v-if="canExpan" top :expand="show" @click="$emit('expand')" />
    </div>
  </div>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import { BasicArrow, BasicTitle } from '/@/components/Basic';
  import { propTypes } from '/@/utils/propTypes';
 
  export default defineComponent({
    components: { BasicArrow, BasicTitle },
    inheritAttrs: false,
    props: {
      prefixCls: propTypes.string,
      helpMessage: propTypes.string,
      title: propTypes.string,
      show: propTypes.bool,
      canExpan: propTypes.bool,
    },
    emits: ['expand'],
  });
</script>