<template>
  <div class="page-footer" :style="size">
    <el-button v-if="showConfirm" type="primary" @click="$emit('confirm')">确 认</el-button>
    <el-button @click="$emit('cancel')">取 消</el-button>
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'PageFooter',

  props: {
    showConfirm: Boolean,
    width: {
      type: [Number, String],
      default: "100%"
    }
  },

  computed: {
    size() {
      return {width: this.width};
    }
  },

  methods: {}
};
</script>

<style scoped lang="scss">
.page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
}
</style>
