<template>
	<!-- <view class="bottomBtn" :class="{'btnContent': btnArr.length === 1}"> -->
	<view class="bottomBtn">
		<view v-for="(item, index) in btnArr" :key="index">
			<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 {
  position: fixed;
  display: flex;
  bottom: 0;
  left: 0;
  z-index: 10;
  width: 750rpx;
  height: 140rpx;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  .u-btn {
    width: 300rpx ;
  }
}
.btnContent{
	justify-content: space-around;
}
.widthBtn{
	width: 300rpx ;
}
</style>