Overview
The Vite Naive Template is a starter template built on Vite 5.x, TypeScript, Vue 3.4, Naive UI, Pinia, UnoCSS, and Unplugin Auto Import. It is designed to provide a clean and efficient framework for building B-end admin prototypes with Naive UI. The template includes features such as modular code management with Pinia, route authentication, dark mode support with UnoCSS, and automatic component importing with Unplugin. It is constantly updated to incorporate the latest technology stack.
Features
- Vite 5 + Vue 3.4 + TypeScript: The template is built using the latest versions of Vite, Vue, and TypeScript.
- UI Framework: Naive UI 2.x: The template utilizes the Naive UI 2.x framework for the user interface.
- State Management: Pinia: Pinia is integrated into the template to provide modular code management.
- Unit Testing Framework: Vitest: The template includes Vitest, a unit testing framework.
- Automatic Component Importing: Unplugin Auto Import: Unplugin Auto Import is built-in, allowing for automatic importing of components.
- Atomic Styles and Icon Importing: UnoCSS + Iconify: The template includes UnoCSS and Iconify for atomic style inlining and automatic icon importing.
- ESlint and Stylelint: ESlint and Stylelint are pre-configured in the template for linting purposes.
- Axios Integration: The template includes a pre-configured Axios instance for making HTTP requests, which can be used with Pinia Actions.
- IconFont Component: The template includes a custom
<IconFont />component for easy use of IconFont icons. - Plugin Integration:
$ModalXxxxPlugin: The template includes a service-style plugin for convenient plugin usage. - Route Authentication: Route authentication is pre-packaged in the template, and Nprogress is integrated for progress tracking. Authentication can be modified by editing the
permission.tsfile. - Modular Component Development Environment: The template provides a modular component development environment with separate directories for page components, route components, styles, etc.
- Complete Business Process Abstraction: The template abstracts a complete business process involving three core pages: login, list, and detail. This saves configuration time and allows developers to focus on writing their own business code.
Installation
To install the Vite Naive Template, follow these steps:
Install the necessary node dependencies in all packages.
npm installRun the application in the local development environment.
npm run dev
Summary
The Vite Naive Template is a powerful starter template for building B-end admin prototypes using Vite, TypeScript, and Vue with Naive UI. It offers a range of features including modular code management, route authentication, automatic component importing, and more. The template is designed to be lightweight and highly efficient, allowing developers to focus on their own business code. With regular updates to incorporate the latest technology stack, the Vite Naive Template provides a solid foundation for building practical business applications.