
English
zhontai-ui-admin-app/
├── src/ # Source directory
│ ├── api/ # API interfaces (auto-generated)
│ │ ├── admin/ # Admin module APIs
│ │ ├── dev/ # Dev module APIs
│ │ └── demo/ # Demo module APIs
│ │
│ ├── components/ # Global components
│ │ ├── DemoBlock.vue # Demo display block (used in Demo pages)
│ │ ├── GlobalDialog.vue # Global dialog
│ │ ├── GlobalLoading.vue # Global loading indicator
│ │ ├── GlobalToast.vue # Global toast notification
│ │ ├── LoginForm.vue # Login form
│ │ ├── LoginPopup.vue # Login popup
│ │ ├── MyNavbar.vue # Custom navbar
│ │ ├── PrivacyPopup.vue # Privacy policy popup
│ │ ├── SliderCaptcha.vue # Slider captcha
│ │ └── SliderCaptchaPopup.vue # Slider captcha popup
│ │
│ ├── composables/ # Composables (exportable)
│ │ ├── types/ # Composable types
│ │ ├── useGlobalDialog.ts # Global dialog
│ │ ├── useGlobalLoading.ts # Global loading
│ │ ├── useGlobalToast.ts # Global toast
│ │ ├── useLoginPopup.ts # Login popup
│ │ ├── useManualTheme.ts # Manual theme toggle
│ │ ├── useTabbar.ts # Tabbar control
│ │ ├── useTeam.ts # Team related
│ │ └── useTheme.ts # Theme control
│ │
│ ├── hooks/ # Custom Hooks
│ │ ├── useAuth.ts # Permission control (for page element/feature control)
│ │ └── useI18nSync.ts # i18n language sync (follow system / manual switch)
│ │
│ ├── layouts/ # Layout components
│ │ ├── default.vue # Default layout
│ │ └── tabbar.vue # TabBar layout
│ │
│ ├── locale/ # i18n language packs
│ │ ├── index.ts # i18n instance creation and export
│ │ ├── zh-Hans.json # Simplified Chinese language pack
│ │ └── en.json # English language pack
│ │
│ ├── pages/ # Main business pages
│ │ ├── workbench/ # Workbench
│ │ ├── msg/ # Messages
│ │ └── mine/ # Me
│ │
│ ├── pages-core/ # Core pages (subpackage)
│ │ ├── login/ # Login page
│ │ ├── change-password/ # Change password page
│ │ ├── profile/ # Profile page
│ │ └── set/ # Settings page
│ │
│ ├── pages-demo/ # Demo pages
│ │
│ ├── pages-system/ # System pages (subpackage)
│ │ └── pkg/ # Package management
│ │ └── form/ # Package form page
│ │
│ ├── resolver/ # Component resolvers
│ │
│ ├── router/ # Router configuration
│ │ └── index.ts # Router instance and guards
│ │
│ ├── static/ # Static assets
│ │
│ ├── store/ # Pinia state management
│ │ ├── userStore.ts # User state
│ │ ├── themeStore.ts # Theme state
│ │ ├── manualThemeStore.ts # Manual theme state
│ │ └── persist.ts # Persistence plugin
│ │
│ ├── theme/ # Theme styles
│ │ ├── index.scss # Theme entry (imports base variables)
│ │ └── app.scss # App-level theme style overrides
│ │
│ ├── uni_modules/ # UniApp modules
│ │
│ ├── utils/ # Utility functions
│ │ ├── date.ts # Date utilities
│ │ ├── enum.ts # Enum definitions
│ │ └── index.ts # Utils entry point
│ │
│ ├── customize-tab-bar/ # Custom TabBar
│ │
│ ├── App.ku.vue # UniKu App entry
│ ├── App.vue # Application root component
│ ├── auto-imports.d.ts # Auto-import type declarations
│ ├── components.d.ts # Component type declarations
│ ├── env.d.ts # Environment variable types
│ ├── main.ts # Application entry
│ ├── manifest.json # UniApp configuration
│ ├── pages.json # Page routes config (auto-generated)
│ ├── shims.d.ts # Type declaration supplements
│ ├── theme.json # Theme variables
│ ├── uni.scss # Global style variables
│ └── uni-pages.d.ts # Page type declarations
│
├── .env.development # Development environment variables
├── .env.production # Production environment variables
├── .env.staging # Staging environment variables
├── alova.config.ts # Alova API code generation config
├── commitlint.config.js # Commitlint configuration
├── eslint.config.mjs # ESLint configuration
├── index.html # Entry HTML
├── manifest.config.ts # UniApp Manifest configuration
├── package.json # Project dependencies config
├── pages.config.ts # Global page configuration
├── pnpm-lock.yaml # Lock file
├── pnpm-workspace.yaml # Pnpm workspace config
├── tsconfig.base.json # TypeScript base config
├── tsconfig.json # TypeScript main config
├── uno.config.ts # UnoCSS configuration
└── vite.config.ts # Vite build configAPI interface directory, auto-generated from Swagger via alova. Contains three modules:
Global common components supporting easycom auto-registration:
| Component | Description |
|---|---|
| GlobalDialog | Global modal dialog, used with useGlobalDialog |
| GlobalLoading | Global loading overlay, used with useGlobalLoading |
| GlobalToast | Global toast notifications (Success/Error/Warning), used with useGlobalToast |
| LoginForm | Login form (username, password, captcha) |
| LoginPopup | Login popup wrapper for unauthenticated interception |
| MyNavbar | Custom navigation bar replacing native navbar |
| PrivacyPopup | Privacy policy popup shown on first launch |
| SliderCaptcha | Slider captcha for human verification |
| SliderCaptchaPopup | Slider captcha popup wrapper |
| DemoBlock | Demo page example display block container |
Vue 3 Composables for logic reuse. These functions are auto-imported by AutoImport, no manual import needed.
Custom hooks encapsulating core business logic:
| Hook | Description |
|---|---|
| useAuth | Permission control: for controlling page elements and features |
| useI18nSync | i18n language sync: follow system language, manual switch with persistence |
vue-i18n based internationalization configuration:
Pinia state management, including:
Main business pages using subpackage loading for performance optimization:
| Page | Description |
|---|---|
| login | Login page (username/password + captcha) |
| change-password | Change password page |
| profile | Profile view and edit |
| set | Settings page (language, theme, etc.) |
| Page | Description |
|---|---|
| pkg | Package management list |
| pkg/form | Package form (add/edit) |
Theme style configuration, SCSS variable system:
Based on @wot-ui/router route configuration, including:
The project uses UniApp's subpage loading strategy, splitting pages into multiple packages:
// Configuration in vite.config.ts
UniHelperPages({
subPackages: [
'src/pages-core', // Core pages subpackage
'src/pages-system', // System pages subpackage
],
})Subpackage advantages: