<template>
	<!-- <view class="bottomBtn" :class="{'btnContent': btnArr.length === 1}"> -->
	<view class="bottomBtn">
		<view v-for="(item, index) in btnArr" :key="index" class="btns">
			<u-button class="widthBtn" :class="item.style" :type="item.type" @click='handleClick(item)'>
				{{item.text}}
			</u-button>
		</view>
	</view>
</template>

<script>
	// 配置按钮数组，需要事件必须用getBtnHandle,配置way回调方法，在父组件调用way事件
export default {
  name: "BottomBtn",
  props: {
    btnArr: {
      type: Array,
      default () {
      	return []
      }
    },
  },
  methods: {
	handleClick(row) {
		this.$emit('getBtnHandle',row)
	}
  },
};
</script>
<style scoped>
.bottomBtn {
  width: 100%;
  position: fixed;
  display: flex;
  bottom: 0;
  left: 0;
  z-index: 10;
  height: 140rpx;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  padding: 0 10rpx;
  /* .u-btn {
    flex: 1;
  } */
   .btns {
    flex: 1;
    margin-right: 10rpx;
   }
}
.btnContent{
	justify-content: space-around;
}
/* .widthBtn{
  width: 300rpx ;
} */
</style>