All files / src/shared/ui SplitWorkbench.vue

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79                  18x 6x     6x     6x                                                                                                                            
<script setup lang="ts">
withDefaults(defineProps<{
  label?: string;
}>(), {
  label: "事务工作台",
});
</script>
 
<template>
  <section class="split-workbench" :aria-label="label">
    <aside class="split-workbench__rail">
      <slot name="rail" />
    </aside>
    <section class="split-workbench__queue">
      <slot name="queue" />
    </section>
    <section class="split-workbench__detail">
      <slot name="detail" />
    </section>
  </section>
</template>
 
<style scoped>
.split-workbench {
  --split-workbench-rail: clamp(13rem, 16vw, 15rem);
  --split-workbench-queue: clamp(23rem, 34vw, 32rem);
 
  min-width: 0;
  min-height: calc(100vh - var(--admin-shell-header-height));
  display: grid;
  grid-template-columns:
    var(--split-workbench-rail)
    var(--split-workbench-queue)
    minmax(30rem, 1fr);
  background: var(--pj-surface-default);
}
 
.split-workbench__rail,
.split-workbench__queue,
.split-workbench__detail {
  min-width: 0;
}
 
.split-workbench__rail,
.split-workbench__queue {
  border-right: 1px solid var(--pj-border-subtle);
}
 
@media (max-width: 72rem) {
  .split-workbench {
    grid-template-columns: minmax(12.5rem, 0.72fr) minmax(22rem, 1.28fr);
  }
 
  .split-workbench__detail {
    grid-column: 1 / -1;
    border-top: 1px solid var(--pj-border-subtle);
  }
}
 
@media (max-width: 48rem) {
  .split-workbench {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
  }
 
  .split-workbench__rail,
  .split-workbench__queue,
  .split-workbench__detail {
    grid-column: auto;
    border-right: 0;
  }
 
  .split-workbench__queue,
  .split-workbench__detail {
    border-top: 1px solid var(--pj-border-subtle);
  }
}
</style>