From c65851c78f318d4f57ee66692a4889edaaffaab2 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sun, 2 Feb 2025 12:09:49 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9C=B0=E5=9D=80=E6=8F=90=E7=A4=BA=EF=BC=88?= =?UTF-8?q?#302=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + README_zh.md | 1 + src/App.vue | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 17f40846..2a644f6b 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ npm install npm run dev ``` +Browser access: http://127.0.0.1:5173/ # 📚 Features diff --git a/README_zh.md b/README_zh.md index 310f85db..d4730155 100644 --- a/README_zh.md +++ b/README_zh.md @@ -26,6 +26,7 @@ npm install npm run dev ``` +浏览器访问:http://127.0.0.1:5173/ # 📚 功能列表 diff --git a/src/App.vue b/src/App.vue index b813bbc3..656eb2f5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -17,6 +17,7 @@ import { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage' import { deleteDiscardedDB } from '@/utils/database' import { isPC } from '@/utils/common' import type { Slide } from '@/types/slides' +import message from './utils/message' import api from '@/services' import Editor from './views/Editor/index.vue' @@ -38,6 +39,10 @@ if (import.meta.env.MODE !== 'development') { } onMounted(async () => { + if (location.hostname === 'localhost') { + message.error('请访问 http://127.0.0.1:5173/ 进入开发环境', { duration: 0 }) + return + } api.getFileData('slides').then((slides: Slide[]) => { slidesStore.setSlides(slides) })