v3-admin Documentation
website·Indexed 31 days ago
https://dev.trinapower.comA Vue 3 admin template featuring a comprehensive set of components and guides. It includes wrappers around antv for Table, Form, Modal, Drawer, and Tree components, as well as specialized tools like FlowChart (based on LogicFlow), CodeEditor, and Excel import/export. The documentation covers project setup with pnpm and Node.js, internationalization via I18n-ally, dark theme configuration, role-based access control, and deployment strategies.
What's inside v3-admin
- The v3-admin project is built on a modern frontend stack designed for immediate use (out-of-the-box). The core technologies include Vue 3, Pnpm, Vite, Pinia, and WindiCSS.
Overview of File Management Plugins
The system utilizes two primary plugins for file operations:
cordova-plugin-file: Used for reading and writing files on the local device.cordova-plugin-file-transfer: Used for uploading and downloading files between the device and a remote server.
Overview of npm (Node Package Manager)
npm is the default package manager for Node.js, installed automatically with the Node.js runtime. It facilitates JavaScript development by allowing developers to share and reuse code through packages (modules). Key capabilities include:
- Downloading third-party packages from the npm registry for local use.
- Installing command-line tools written by others.
- Publishing custom packages or CLI tools to the npm registry for public or private use.
- Managing project dependencies via the
package.jsonfile.
Overview of Border Radius Design Tokens
Therounded-*design tokens are used to control the border-radius of elements, allowing developers to apply consistent rounding to corners across the UI.Overview of Cordova File Management Plugins
The system utilizes two primary plugins for file operations:
cordova-plugin-file: Used for reading and writing files to the local device file system.cordova-plugin-file-transfer: Used for transferring files (uploading and downloading) between the device and a remote server.
Overview of v3-admin-template
v3-admin-templatev3-admin-template is an out-of-the-box backend solution for medium to large-scale projects. It is built using Vue 3.0, Vite, Ant-Design-Vue, and TypeScript. Key features include second-level encapsulated components, utility functions, hooks, dynamic menus, permission validation, and button-level permission control.Overview of git subtree
git subtree allows a repository to be embedded as a sub-repository within another. Version management for each repository remains relatively independent, making the sub-repository transparent to the end-user. A key feature is branch synchronization: when the main project branch is switched, the associated sub-repository also switches accordingly.Overview of the Xin Tian Fu Tong (新天富通) Agent Platform
Xin Tian Fu Tong (新天富通) is a one-stop digital service platform designed for Trina Solar agents. It aims to improve business management and expansion efficiency by providing digital tools to solve operational management issues. Key functional modules include: full-process quality management, financial submission audit management, order processing, warehousing and logistics management, inspection management, and after-sales management.Baidu Statistics Cordova Plugin Overview
Thecordova-plugin-baidumobstatplugin allows developers to integrate Baidu Statistics into Cordova applications for event analysis and page tracking. For full technical specifications and all available parameters, refer to the official Baidu documentation at https://mtj.baidu.com/static/userguide/book/ios/h5/cordova.html.Understand the MVH architectural pattern
The MVH pattern is used to separate concerns within a component's implementation into three distinct layers:
- Model (
*.ts): Responsible for data transformation and assembly. Use this layer for tasks such as formatting data for edit forms or handling data echoing/hydration. - Hook: Responsible for view-layer interaction logic. These are treated as utility functions and do not need to strictly follow standard Vue hook specifications. Use this layer for interaction logic, such as cascading dropdowns in a form.
- View (Template): Responsible exclusively for the presentation and display logic of the UI.
- Model (
Manage Git Hooks with Husky
v3-adminHusky is used to run linting checks locally before code is committed. Hooks are defined within the.huskydirectory. If a check fails, the commit will be blocked until the issues are resolved.Implement a Modal as a standalone component
v3-adminTo maintain clean architecture, it is recommended to define the Modal content as a separate single-file component. The component must wrap its content inBasicModaland bind$attrsto ensure props passed from the parent are applied to the modal.<template> <BasicModal v-bind="$attrs" title="Modal Title" :helpMessage="['Tip 1', 'Tip 2']"> Modal Info. </BasicModal> </template> <script lang="ts"> import { defineComponent } from 'vue'; import { BasicModal } from '/@/components/Modal'; export default defineComponent({ components: { BasicModal }, setup() { return {}; }, }); </script>