| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <div class="btn1-bg">
- <div class="name-bottom" v-if="show">
- <div class="btn-left" @click="leftclick">{{lefttitle}}</div>
- <div class="btn-right" @click="rightclick">{{righttitle}}</div>
- <div class="clear"></div>
- </div>
- <div class="name-bottom1" v-if="!show">
- <div class="btn-title" @click="titleclick">{{title}}</div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: '',
- props: {
- lefttitle: {
- type: String,
- default: '取消',
- require: true
- },
- righttitle: {
- type: String,
- default: '确认',
- require: true
- },
- title: {
- type: String,
- default: '确认',
- require: true
- },
- show: {
- type: Boolean,
- default: false,
- require: true
- }
- },
- data () {
- return {
- }
- },
- components: {},
- computed: {},
- beforeMount () {},
- mounted () {},
- methods: {
- leftclick () {
- this.$emit('leftclick')
- },
- rightclick () {
- this.$emit('rightclick')
- },
- titleclick () {
- this.$emit('titleclick')
- }
- },
- watch: {}
- }
- </script>
- <style lang='less' scoped>
- .btn1-bg {
- .name-bottom {
- height: 1rem;
- background: #fff;
- position: fixed;
- bottom: 0;
- width: 100%;
- border-top: 0.02rem solid #ccc;
- z-index: 100;
- .btn-left {
- height: 0.6rem;
- border: 0.02rem solid #cccccc;
- font-size: 0.28rem;
- text-align: center;
- line-height: 0.6rem;
- border-radius: 0.3rem;
- float: left;
- color: #4c4c4c;
- width: 3.4rem;
- margin-top: 0.2rem;
- margin-left: 0.2rem;
- }
- .btn-right {
- height: 0.64rem;
- font-size: 0.28rem;
- text-align: center;
- line-height: 0.64rem;
- border-radius: 0.3rem;
- float: right;
- background:#28cd5e;
- color: #fff;
- width: 3.44rem;
- margin-top: 0.2rem;
- margin-right: 0.2rem;
- }
- }
- .name-bottom1 {
- height: 1rem;
- background: #fff;
- position: fixed;
- bottom: 0;
- width: 100%;
- z-index: 100;
- // border-top: 0.02rem solid #ccc;
- box-sizing: border-box;
- padding: 0.2rem 0.2rem;
- .btn-title {
- // height: 0.64rem;
- font-size: 0.28rem;
- text-align: center;
- line-height: 0.64rem;
- border-radius: 0.3rem;
- background: #28cd5e;
- color: #fff;
- width: 100%;
- }
- }
- }
- </style>
|