| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <div class="bottomFixed">
- <div class="btn-list" v-if="btnList">
- <slot></slot>
- </div>
- <div class="btn" v-else>
- <slot></slot>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'FixedButton',
- props: {
- btnList: {
- type: Boolean,
- default: false
- }
- }
- };
- </script>
- <style lang="less">
- .bottomFixed {
- height: 60px;
- .btn-list {
- position: fixed;
- background-color: #fff;
- left: 0;
- right: 0;
- bottom: 0;
- padding: 8px 10px;
- z-index: 99;
- box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
- display: flex;
- align-items: center;
- ._van-button {
- width: 50%;
- box-sizing: border-box;
- padding: 0 6px;
- }
- .van-button {
- height: 40px;
- }
- }
- .btn {
- position: fixed;
- background-color: #fff;
- left: 0;
- right: 0;
- bottom: 0;
- padding: 8px 68px;
- z-index: 99;
- box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
- .van-button {
- height: 44px;
- }
- }
- }
- </style>
|