index.vue 799 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <ui-editor-head class="header">
  3. <div class="main">
  4. <span class="title">{{ sysTitle }}</span>
  5. </div>
  6. <div class="control">
  7. <template v-if="isEdit">
  8. <ui-button width="105px" @click="leave">退出</ui-button>
  9. <ui-button
  10. width="105px"
  11. type="primary"
  12. class="save"
  13. v-if="isOld"
  14. @click="save"
  15. >
  16. 保存
  17. </ui-button>
  18. </template>
  19. </div>
  20. </ui-editor-head>
  21. </template>
  22. <script setup lang="ts">
  23. import { computed } from 'vue'
  24. import { isEdit, title, isOld, leave, save } from '@/store'
  25. const props = defineProps<{ title?: string }>()
  26. const sysTitle = computed(() => props.title || title.value)
  27. </script>
  28. <style lang="sass" scoped>
  29. @import './style.scss'
  30. </style>