header.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div class="header">
  3. <div class="nav">
  4. <el-button type="primary" plain>返回</el-button>
  5. </div>
  6. <div class="draw-operate">
  7. <div v-for="group in groups">
  8. <el-icon class="operate" v-for="fn in group" @click="fn()">
  9. {{ funds.describes.get(fn)?.name }}
  10. </el-icon>
  11. </div>
  12. </div>
  13. <div class="saves">
  14. <el-button type="primary" plain>保存</el-button>
  15. <el-button type="primary" plain>导出</el-button>
  16. <el-button>图纸</el-button>
  17. </div>
  18. </div>
  19. </template>
  20. <script lang="ts" setup>
  21. import { useHeaderFunds } from './funds.ts'
  22. const funds = useHeaderFunds()
  23. const groups = [
  24. [funds.revoke, funds.recover],
  25. [funds.clear, funds.rotate, funds.full],
  26. [funds.aiImport, funds.setBGImage, funds.gotoVR],
  27. ]
  28. </script>
  29. <style lang="scss" scoped>
  30. @use 'element-plus/theme-chalk/src/common/var';
  31. .header {
  32. background-color: var.$color-primary;
  33. display: flex;
  34. align-items: center;
  35. padding: 10px;
  36. justify-content: space-between;
  37. }
  38. .draw-operate {
  39. text-align: center;
  40. color: #fff;
  41. display: flex;
  42. align-items: center;
  43. > div:not(:last-child) {
  44. padding-right: 10px;
  45. margin-right: 10px;
  46. border-right: 1px solid #fff;
  47. }
  48. i {
  49. width: auto;
  50. margin: 0 5px;
  51. }
  52. }
  53. </style>/