62 lines
1.1 KiB
Vue
Raw Normal View History

2023-08-04 11:33:43 +08:00
<template>
<view>
2023-08-04 17:49:55 +08:00
<button @click.stop="click" :class="{'my_btn_new_btn': position, 'my_btn_no_positon': !position, 'my_btn_disabled': my_btn_disabled}">{{text}}</button>
2023-08-04 11:33:43 +08:00
</view>
</template>
<script>
export default {
props: {
text: {
type: String,
default: '新增'
2023-08-04 12:04:32 +08:00
},
position:{
type: Boolean,
default: true
},
2023-08-04 17:43:13 +08:00
my_btn_disabled:{
2023-08-04 12:04:32 +08:00
type: Boolean,
default: false
2023-08-04 11:33:43 +08:00
}
},
data(){
return{
}
},
methods:{
click(){
this.$emit('click')
}
}
}
</script>
2023-08-04 17:43:13 +08:00
<style lang="scss" scoped>
.my_btn_new_btn{
2023-08-04 11:33:43 +08:00
position: fixed;
bottom: 0;
left: 0;
2023-08-04 17:49:55 +08:00
// z-index: 9999999;
2023-08-04 17:55:10 +08:00
z-index: 1;
2023-08-04 11:33:43 +08:00
width: 100%;
border-radius: 0;
color: #fff;
height: 90rpx;
line-height: 90rpx;
background-color: $theme-oa-color;
}
2023-08-04 17:43:13 +08:00
.my_btn_no_positon{
2023-08-04 12:04:32 +08:00
width: 100%;
border-radius: 0;
color: #fff;
height: 90rpx;
line-height: 90rpx;
background-color: $theme-oa-color;
}
2023-08-04 17:43:13 +08:00
.my_btn_disabled{
2023-08-04 12:04:32 +08:00
background-color: #666;
color: #eee;
}
2023-08-04 11:33:43 +08:00
</style>