提交 d989d7bd 编写于 作者: M m0_60155232

Tue Sep 12 12:02:00 CST 2023 inscode

上级 7a093d7e
run = "npm i && npm run dev"
language = "node"
[deployment]
build = "npm i && npm run build"
......@@ -8,3 +9,6 @@ run = "npm run preview"
PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}"
XDG_CONFIG_HOME = "/root/.config"
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
[debugger]
program = "main.js"
......@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<title>Web开发常用工具</title>
</head>
<body>
<div id="app"></div>
......
......@@ -7,8 +7,10 @@
"preview": "vite preview --port 4173"
},
"dependencies": {
"element-plus": "^2.3.12",
"guess": "^1.0.2",
"vue": "^3.2.37"
"vue": "^3.2.37",
"vue-router": "^4.2.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.0.1",
......
<script setup>
import HelloWorld from './components/HelloWorld.vue'
import TheWelcome from './components/TheWelcome.vue'
import { ref } from 'vue'
const activeIndex = ref('/');
const handleSelect = (key,keyPath) => {
console.log(key, keyPath)
}
</script>
<template>
<header>
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<div id="container">
<!-- 导航 -->
<div id="nav_box">
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" :router='true'>
<el-menu-item index="/">UUID生成</el-menu-item>
<el-sub-menu index="2">
<template #title>加密工具</template>
<el-menu-item index="/about">MD5</el-menu-item>
<el-menu-item index="2-2">SHA256</el-menu-item>
</el-sub-menu>
<el-menu-item index="3">二维码生成</el-menu-item>
<el-menu-item index="4">IP查询</el-menu-item>
<el-menu-item index="5">DNS解析</el-menu-item>
<el-menu-item index="6">摩斯密码生成</el-menu-item>
</el-menu>
</div>
</header>
<main>
<TheWelcome />
</main>
<!-- 路由出口-功能区 -->
<div>
<router-view></router-view>
</div>
</div>
</template>
<style scoped>
header {
line-height: 1.5;
}
.logo {
display: block;
margin: 0 auto 2rem;
}
@media (min-width: 1024px) {
header {
......
import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createRouter, createWebHistory } from 'vue-router'
// 导入路由识图
import MD5 from "./views/MD5.vue"
import QRCode from "./views/QRCode.vue"
import './assets/main.css'
// 路由配置
const routes = [
{ path: '/', component: MD5 },
{ path: '/about', component: QRCode },
]
createApp(App).mount('#app')
// 创建路由实例
const router = createRouter({
history: createWebHistory(),
routes,
})
createApp(App)
.use(ElementPlus)
.use(router)
.mount('#app')
<template>
MD5
</template>
\ No newline at end of file
<template>
QRCode
</template>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册