Skip to content

Commit

Permalink
feat(dev): 开发环境添加虚拟控制台 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
j10ccc authored Oct 3, 2024
1 parent 6dc6fd6 commit ac5941c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"@vicons/fluent": "^0.11.0",
"@vitejs/plugin-vue": "^1.9.3",
"typescript": "^4.4.3",
"vconsole": "^3.15.1",
"vite": "^2.6.4",
"vue-tsc": "^0.3.0"
}
}
}
8 changes: 8 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'vfonts/Lato.css'
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import VConsole from 'vconsole'
import { routes } from './routes'

// 设置前端路由
Expand All @@ -14,3 +15,10 @@ const router = createRouter({
const app = createApp(App)
app.use(router)
app.mount('#app')

if (import.meta.env.DEV) {
setTimeout(() => {
new VConsole();
console.warn("DEV 环境下 VConsole 启动")
})
}
37 changes: 37 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.17.3.tgz"
integrity sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==

"@babel/runtime@^7.17.2":
version "7.25.7"
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.25.7.tgz#7ffb53c37a8f247c8c4d335e89cdf16a2e0d0fb6"
integrity sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==
dependencies:
regenerator-runtime "^0.14.0"

"@babel/types@^7.6.1", "@babel/types@^7.9.6":
version "7.17.0"
resolved "https://registry.npmmirror.com/@babel/types/-/types-7.17.0.tgz"
Expand Down Expand Up @@ -382,6 +389,16 @@ constantinople@^4.0.1:
"@babel/parser" "^7.6.0"
"@babel/types" "^7.6.1"

copy-text-to-clipboard@^3.0.1:
version "3.2.0"
resolved "https://registry.npmmirror.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz#0202b2d9bdae30a49a53f898626dcc3b49ad960b"
integrity sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==

core-js@^3.11.0:
version "3.38.1"
resolved "https://registry.npmmirror.com/core-js/-/core-js-3.38.1.tgz#aa375b79a286a670388a1a363363d53677c0383e"
integrity sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==

css-line-break@^2.1.0:
version "2.1.0"
resolved "https://registry.npmmirror.com/css-line-break/-/css-line-break-2.1.0.tgz"
Expand Down Expand Up @@ -762,6 +779,11 @@ magic-string@^0.30.0:
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

mutation-observer@^1.0.3:
version "1.0.3"
resolved "https://registry.npmmirror.com/mutation-observer/-/mutation-observer-1.0.3.tgz#42e9222b101bca82e5ba9d5a7acf4a14c0f263d0"
integrity sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA==

naive-ui@^2.19.9:
version "2.25.2"
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.25.2.tgz"
Expand Down Expand Up @@ -953,6 +975,11 @@ react-is@^17.0.1:
resolved "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

regenerator-runtime@^0.14.0:
version "0.14.1"
resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==

request-light@^0.5.4:
version "0.5.7"
resolved "https://registry.npmmirror.com/request-light/-/request-light-0.5.7.tgz"
Expand Down Expand Up @@ -1054,6 +1081,16 @@ utrie@^1.0.2:
dependencies:
base64-arraybuffer "^1.0.2"

vconsole@^3.15.1:
version "3.15.1"
resolved "https://registry.npmmirror.com/vconsole/-/vconsole-3.15.1.tgz#569a8ab15f353259527bbcf004f02946b4482cff"
integrity sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==
dependencies:
"@babel/runtime" "^7.17.2"
copy-text-to-clipboard "^3.0.1"
core-js "^3.11.0"
mutation-observer "^1.0.3"

vdirs@^0.1.4, vdirs@^0.1.7:
version "0.1.7"
resolved "https://registry.npmmirror.com/vdirs/-/vdirs-0.1.7.tgz"
Expand Down

0 comments on commit ac5941c

Please sign in to comment.