| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- const n = `<template>
- <div :class="['s-footer-tool-bar', { 'is-fixed': fixed }]">
- <div class="s-footer-tool-bar-left">
- <slot name="extra">{{ extra }}</slot>
- </div>
- <div class="s-footer-tool-bar-right">
- <slot />
- </div>
- </div>
- </template>
- <script setup>
- defineOptions({ name: 'SFooterToolBar' })
- defineProps({
- // 左区内容(无 #extra 插槽时生效)
- extra: {
- type: [String, Object],
- default: ''
- },
- // 是否贴底固定
- fixed: {
- type: Boolean,
- default: true
- }
- })
- <\/script>
- <style lang="less" scoped>
- .s-footer-tool-bar {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 56px;
- padding: 0 24px;
- box-sizing: border-box;
- background: var(--s-bg-color-container);
- border-top: 1px solid var(--s-border-color-split);
- box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.03);
- &.is-fixed {
- position: fixed;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 9;
- }
- .s-footer-tool-bar-left {
- flex: 1;
- min-width: 0;
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .s-footer-tool-bar-right {
- flex: none;
- display: flex;
- align-items: center;
- gap: 8px;
- margin-left: 16px;
- }
- }
- </style>
- `;
- export {
- n as default
- };
|