60 lines
1013 B
Vue
Raw Normal View History

2023-08-04 11:33:43 +08:00
<template>
<view>
2023-08-04 12:04:32 +08:00
<button @click="click" :class="{'new_btn': position, 'no_positon': !position, 'disabled': 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
},
disabled:{
type: Boolean,
default: false
2023-08-04 11:33:43 +08:00
}
},
data(){
return{
}
},
methods:{
click(){
this.$emit('click')
}
}
}
</script>
<style lang="scss">
.new_btn{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
border-radius: 0;
color: #fff;
height: 90rpx;
line-height: 90rpx;
background-color: $theme-oa-color;
}
2023-08-04 12:04:32 +08:00
.no_positon{
width: 100%;
border-radius: 0;
color: #fff;
height: 90rpx;
line-height: 90rpx;
background-color: $theme-oa-color;
}
.disabled{
background-color: #666;
color: #eee;
}
2023-08-04 11:33:43 +08:00
</style>