<template>
	<view>
		<button @click.stop="click"
      class="button"
			:class="{'my_btn_new_btn': position, 'my_btn_no_positon': !position, 'my_btn_disabled': my_btn_disabled}">
      <slot></slot>
      {{text}}
    </button>
	</view>
</template>

<script>
	export default {
		props: {
			text: {
				type: String,
				default: '新增'
			},
			position: {
				type: Boolean,
				default: true
			},
			my_btn_disabled: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {

			}
		},
		methods: {
			click() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss" scoped>
  .button{
    display: flex;
    justify-content: center;
    align-items: center;
  }
	.my_btn_new_btn {
		position: fixed;
		bottom: 0;
		left: 0;
		// z-index: 9999999;
		z-index: 1;
		width: 100%;
		border-radius: 0;
		color: #fff;
		height: 90rpx;
		line-height: 90rpx;
		background-color: $theme-oa-color;
	}

	.my_btn_no_positon {
		width: 100%;
		border-radius: 0;
		color: #fff;
		height: 90rpx;
		line-height: 90rpx;
		background-color: $theme-oa-color;
	}

	.my_btn_disabled {
		background-color: #666;
		color: #eee;
	}
</style>