Routing

Vue Router configuration

Routing

Route Configuration

Routes defined in src/router/index.ts:

  • Public routes - No authentication
  • Staff routes - Require authentication
  • Admin routes - Require admin role

Lazy Loading

Routes are lazy-loaded for code splitting:

const StaffContentView = () => import('../views/StaffContentView.vue')

Route Guards

  • Authentication check
  • Permission verification
  • Role-based access control
router.push('/staff/content')
router.push({ name: 'staff-content', query: { tab: 'news' } })