role.js 320 B

12345678910111213141516171819
  1. import { mapGetters } from 'vuex'
  2. export default {
  3. computed: {
  4. ...mapGetters(['isOperator', 'isGroupAdmin'])
  5. },
  6. render (h) {
  7. return h(
  8. this.isOperator
  9. ? 'Designer'
  10. : this.isGroupAdmin
  11. ? 'Manager'
  12. : 'Viewer',
  13. {
  14. props: this.$attrs
  15. }
  16. )
  17. }
  18. }