header.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <el-row type="flex" class="header-wrapper-0e7a058e" justify="space-between">
  3. <el-col :span="12">
  4. <span class="title">
  5. <span v-if="subTitle" class="header-hover" @click="$router.push({ path: address})">{{ title + '/' }}</span>
  6. <span v-else>{{ title }}</span>
  7. <span class="subTitle">{{ subTitle }}</span>
  8. </span>
  9. <slot name="input" />
  10. </el-col>
  11. <el-col :span="12" class="right-wrapper test">
  12. <slot name="content" class="important-222" />
  13. </el-col>
  14. </el-row>
  15. </template>
  16. <script type="text/javascript">
  17. export default {
  18. name: '',
  19. props: {
  20. title: {
  21. type: String,
  22. required: false,
  23. default: () => ''
  24. },
  25. subTitle: { type: String, required: false, default: () => '' },
  26. address: { type: String, required: false, default: () => '' }
  27. }
  28. }
  29. </script>
  30. <style lang="less">
  31. .header-wrapper-0e7a058e {
  32. background-color: #ffffff;
  33. border-radius: 0 0 6px 6px;
  34. box-shadow: 0 0 11px #eef0f5;
  35. height: 60px;
  36. margin-bottom: 10px;
  37. .el-col {
  38. padding: 15px 30px;
  39. font-size: 14px;
  40. .header-hover:hover {
  41. color: #409eff;
  42. cursor: pointer;
  43. }
  44. .title {
  45. color: rgba(102, 102, 102, 1);
  46. line-height: 2;
  47. .subTitle {
  48. color: rgba(51, 51, 51, 1);
  49. margin-right: 25px;
  50. }
  51. }
  52. }
  53. .right-wrapper {
  54. text-align: right;
  55. >* {
  56. display: inline-block !important;
  57. margin-left: 10px;
  58. }
  59. }
  60. }
  61. </style>