dv.js 374 B

123456789101112131415161718192021
  1. import {
  2. Access,
  3. State
  4. } from '@/constant'
  5. export default {
  6. computed: {
  7. canEdit () {
  8. return this.accessSet.has(Access.MANAGE_CALENDAR)
  9. }
  10. },
  11. render (h) {
  12. const canEdit = this.canEdit
  13. return h(canEdit ? 'Designer' : 'Viewer', {
  14. props: {
  15. ...this.$attrs,
  16. status: canEdit ? State.READY : State.RESOLVED
  17. }
  18. })
  19. }
  20. }