dv.js 349 B

1234567891011121314151617
  1. import { mapGetters } from 'vuex'
  2. import { State } from '@/constant'
  3. export default {
  4. computed: {
  5. ...mapGetters(['isOperator'])
  6. },
  7. render (h) {
  8. const canEdit = this.isOperator
  9. return h(canEdit ? 'Designer' : 'Viewer', {
  10. props: {
  11. ...this.$attrs,
  12. status: canEdit ? void 0 : State.RESOLVED
  13. }
  14. })
  15. }
  16. }