You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mixins.js 545B

1234567891011121314151617181920212223242526
  1. import { currentProfile } from '../services'
  2. const pidMixin = {
  3. props: {
  4. pid: {
  5. type: Number,
  6. required: true,
  7. validator: prop => typeof prop === 'number' || prop === null,
  8. },
  9. },
  10. }
  11. const profileMixin = {
  12. computed: {
  13. profile() {
  14. return currentProfile
  15. },
  16. isLoading() {
  17. return currentProfile.isLoading
  18. },
  19. isLoggedIn() {
  20. return currentProfile.isLoggedIn
  21. },
  22. },
  23. }
  24. export { pidMixin, profileMixin }