VueVite后台启动器

light-vue3-starter — Vue 后台模板

作者 tommy44458

基于 Vue3、Vite 与 TypeScript 的后台启动模板,集成 Pinia、TailwindCSS、ElementPlus 和 MQTT 客户端,附带登录页与示例控制台页面。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

1 个预览视图
作者提供的预览
作者提供的预览

来自项目 README 的原始预览。

目前有 1 张原始预览,可打开完整图片查看设计细节。

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Vue3 + Vite + TypeScript 的后台启动模板,使用 `<script setup>` 单文件组件

02

集成 Pinia 状态管理、Vue Router 路由与 ElementPlus UI 组件库

03

样式层包含 TailwindCSS 与 Stylus,并使用 Stylelint 做样式检查

04

内置 mqtt-vue-hook,README 提供 MQTT 连接、订阅、发布与事件注册示例,支持 MQTTv5

05

ESLint 采用 Airbnb TypeScript 配置,配合 Prettier、EditorConfig 与 pre-commit 钩子

06

提供在线演示,登录账号与密码均为 tommy

模板详细介绍

light-vue3-starter 是一个面向后台管理界面的启动模板,作者描述为“A LIGHT Vue3 Starter Admin Template”。技术栈以 Vue3 与 Vite 为基础,使用 TypeScript 编写,采用 Vue3 `<script setup>` 单文件组件写法。状态管理使用 Pinia,路由使用 Vue Router,UI 组件库为 ElementPlus,样式方案包含 TailwindCSS 与 Stylus。

模板内置 MQTT 支持,README 说明其支持 MQTTv5,并通过 mqtt-vue-hook 提供连接、订阅、发布与事件注册的示例代码,可用于构建 IoT 设备控制系统。仓库提供在线演示,演示登录信息为账号 tommy、密码 tommy。

代码规范方面,模板使用 ESLint 配合 Airbnb TypeScript 配置,并包含 Stylelint、Prettier、EditorConfig 与 Git pre-commit 钩子,提交前执行 lint 检查。README 也给出了关闭代码规范检查的方式:在 src/ 目录下分别添加 .eslintignore 与 .stylelintignore。

安装与运行使用 yarn:yarn install 安装依赖,yarn dev 启动开发,yarn build 构建,yarn lint 与 yarn lint:style 分别执行 ESLint 与 Stylelint 检查。项目采用 MIT 许可,可免费使用、修改、商用和分发该版本代码,但需保留版权声明与许可声明;演示图片、字体、图标等第三方素材需另行核对各自许可。

VueVite后台启动器

适合你的项目吗?

适用场景

  • 需要快速搭建 Vue3 后台管理界面的项目起步
  • 需要在前端接入 MQTT 与 IoT 设备通信的控制台类应用
  • 希望采用 TypeScript 与 Airbnb 代码规范约束团队协作的前端项目
  • 需要 ElementPlus 与 TailwindCSS 组合进行界面开发的后台系统

适合人群

  • 熟悉 Vue3 与 TypeScript、希望直接使用现成后台骨架的开发者
  • 需要前端 MQTT 客户端示例、用于设备控制或数据订阅的项目
  • 接受 Airbnb 代码规范并愿意使用 ESLint、Stylelint、Prettier 的团队
  • 需要 MIT 许可下可自由修改与商用的启动模板的个人或组织

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    使用 yarn 安装依赖:yarn install

  2. 2

    开发模式运行:yarn dev;构建:yarn build

  3. 3

    代码检查:yarn lint(ESLint)与 yarn lint:style(Stylelint)

  4. 4

    演示登录账号为 tommy,密码为 tommy

  5. 5

    如需关闭代码规范检查,可在 src/ 目录下分别添加 .eslintignore 与 .stylelintignore

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 该模板为起步脚手架,用于帮助开发者开始基于 Vue3、Pinia、TailwindCSS、ElementPlus、MQTT 与 TypeScript 的开发,并非可直接上线的完整成品应用。
  • MQTT 功能需连接外部 MQTT Broker(如 ws/wss/mqtt 协议的主机与端口),使用前须自行准备并承担相应服务成本。
  • 在线演示使用固定账号 tommy、密码 tommy,仅为演示用途,不可作为生产环境认证方案。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

This template should help get you started developing with Vue3, Pinia, TailwindCSS, ElementPlus, Mqtt and TypeScript in Vite.

README 原文

Also, this template also supports MQTTv5 so that it can easily become a control system for IoT devices.

README 原文

Account: tommy Password: tommy

README 原文
https://github.com/tommy44458/light-vue3-starter/blob/main/LICENSEhttps://github.com/tommy44458/light-vue3-starter/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 77 / 100
技术栈
Vue · Vite
网站类型
后台 · 启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2024-02-11
截图检查日期
2026-10-03

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Vue。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: 81ea18191b39acfd16d08b5e96a6af99139785f9b15404984d07e71c727ea25f

2026-10-03T18:57:06.161Z

来源文件 / 仓库
# A LIGHT Vue3 Starter Admin Template.

<p align="center">
    <img src="https://img.shields.io/badge/-Vue3-34495e?logo=vue.j" />
    <img src="https://img.shields.io/badge/-Vite4-646cff?logo=vite&logoColor=white" />
    <img src="https://img.shields.io/badge/-TypeScript-blue?logo=typescript&logoColor=white" />
    <img src="https://img.shields.io/badge/-Pinia-yellow?logo=picpay&logoColor=white" />
	<img src="https://img.shields.io/badge/-Tailwindcss-blue?logo=TailwindCSS&logoColor=white">
    <img src="https://img.shields.io/badge/-ESLint-4b32c3?logo=eslint&logoColor=white" />
    <img src="https://img.shields.io/badge/-Prettier-ef9421?logo=Prettier&logoColor=white">
	<img src="https://img.shields.io/badge/-ElementPlus-blue?logo=ElementPlus&logoColor=white">
	<img src="https://app.codacy.com/project/badge/Grade/e18438ee8e404b43aad89f506934f048"/>
<p>


This template should help get you started developing with Vue3, Pinia, TailwindCSS, ElementPlus, Mqtt and TypeScript in Vite. The template uses Vue3 `<script setup>` SFCs. Also, this template also supports MQTTv5 so that it can easily become a control system for IoT devices.

![image](https://github.com/tommy44458/light-vue3-starter/blob/main/src/assets/demo_page1.png)

### Check out the [Online DEMO](https://light-vue3-starter-tommy44458.vercel.app/).

![image](https://github.com/tommy44458/light-vue3-starter/blob/main/src/assets/demo_login.png)
```sh
// login info
Account: tommy
Password: tommy
```

## This starter template includes:

-   [Vue 3](https://vuejs.org/guide/introduction.html)
-   [Vite](https://vitejs.dev/guide/)
-   [Pinia](https://pinia.vuejs.org/)
-   [TailwindCSS](https://tailwindcss.com/)
-   [Vue Router](https://github.com/vuejs/router)
-   [ElementPlus UI](https://element-plus.org/en-US/)
-   [Stylus](https://github.com/stylus/stylus)
-   [Stylelint](https://github.com/stylelint/stylelint)
-   [Eslint](https://eslint.org/)
-   [eslint-config-airbnb-typescript](https://github.com/iamturns/eslint-config-airbnb-typescript)
-   [mqtt-vue-hook](https://github.com/tommy44458/mqtt-vue-hook)

## Collaboration-code specification
Many tech teams generally use [Airbnb](https://github.com/airbnb/javascript) to constrain code specifications at present.
- Through `pre-commit` to implement  lint check,unit test,code formatting,etc.。 
- Combined with the VsCode(formatting automatically when saving:editor.formatOnSave: true)
- Combined with the Git hooks(execute before commit:pre-commit => yarn lint)
- IDE configuration(`.editorconfig`),ESLint configuration(`.eslintrc.js` 和 `.eslintignore`),StyleLint configuration(`.stylelintrc`, `.stylelintignore`),for details, please refer to the corresponding configuration file。  

Close code specification 
add `.eslintignore`  and  `.stylelintignore`  to `src/`  directory respectively to ignore 

## Recommended IDE Setup

-   [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

## Support MQTT client
	
#### *.ts
``` ts
// protocol = 'wss', 'ws', 'mqtt', ...
// host = ip or domain
// port = 8083, 1883, ...
import { useMQTT } from 'mqtt-vue-hook'
const mqttHook = useMQTT()

mqttHook.connect(`${protocol}://${host}:${port}`, {
    clean: false,
    keepalive: 60,
    clientId: `mqtt_client_${Math.random().toString(16).substring(2, 10)}`,
    connectTimeout: 4000,
})
```
	
#### views/console/ConsolePage1.vue
	
``` vue
<script setup lang="ts">
import { useMQTT } from 'mqtt-vue-hook'

const mqttHook = useMQTT()

const form = reactive({
	// ...data
})

const mqttSubscribe = () => {
	mqttHook.subscribe(['+/vue3/starter/console/page1'], 1)

	// if receive mes from '+/vue3/starter/console/page1' before excute callback function.
	mqttHook.registerEvent(
		'+/vue3/starter/console/page1',
		// callback funtion
		(topic: string, message: string) => {
			const mesJson = JSON.parse(message.toString())
			ElNotification({
				title: `MQTT TOPIC: ${topic}`,
				message: mesJson,
				type: 'info',
			})
		},
		'key',
	)
}

const onPublish = () => {
	mqttHook.publish(
		'tommy44458/vue3/starter/console/page1',
		JSON.stringify({
			// ...form.data
		}),
	)
}

onMounted(() => {
	mqttSubscribe()
})

onUnmounted(() => {
	// remove Event by topic and key
	mqttHook.unRegisterEvent('+/vue3/starter/console/page1', 'key')
	mqttHook.unSubscribe('+/vue3/starter/console/page1')
})
```

## Getting Started

#### Install

```sh
yarn install
```

#### Dev

```sh
yarn dev
```

#### Build

```sh
yarn build
```

#### Syntax check

```sh
// eslint
yarn lint
// stylelint
yarn lint:style
```
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。