修改结构

This commit is contained in:
闵宪瑞 2025-01-07 16:06:23 +08:00
parent 769eb676d2
commit 8bf6270833
11 changed files with 5279 additions and 4408 deletions

View File

@ -1,12 +0,0 @@
dist
.husky
.gitee
.github
.vscode
LICENSE
.gitignore
netlify.toml
CHANGELOG.md
node_modules
renovate.json
.devcontainer

View File

@ -1,35 +0,0 @@
{
"root": true, //
"env": {
"node": true,
"es2021": true,
"browser": true //
},
"parser": "vue-eslint-parser",
"parserOptions": {
"ecmaVersion": "latest",
"parser": "@typescript-eslint/parser",
"ecmaFeatures": {
"jsx": true // jsx
}
},
"plugins": ["prettier"],
"extends": [
"@unocss",
"eslint:recommended", //
"plugin:vue/vue3-recommended", // vue sfc
"prettier",
"./presets/eslint/.eslintrc-auto-import.json"
],
"rules": {
//
"vue/multi-word-component-names": "off",
// prettier
"prettier/prettier": "error",
// 使 var let const
"no-var": "error"
},
"globals": {
"defineOptions": true
}
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

View File

@ -128,5 +128,8 @@
"not ie <= 11", "not ie <= 11",
"Android >= 4.0", "Android >= 4.0",
"iOS >= 8" "iOS >= 8"
] ],
"dependencies": {
"element-plus": "^2.9.2"
}
} }

9171
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

16
src/api/user.ts Normal file
View File

@ -0,0 +1,16 @@
/**
*
* @param data
*/
export function login(data: any) {
}
/**
*
* @param data
*/
export function register(data: any) {
}

View File

@ -1,52 +0,0 @@
<script setup lang="ts">
defineProps<{ msg: string }>()
const visits = useVisits()
const { t } = useI18n()
</script>
<template>
<div class="mt-10 flex flex-col items-center space-y-7">
<h1 class="text-4xl">{{ msg }}</h1>
<Counter />
<p>
{{ t('edit') }}
<code>components/HelloWorld.vue</code> {{ t('to test HMR') }}
</p>
<p>
{{ t('test.module') }}
</p>
<p>
{{ t('check out') }}
<a href="https://github.com/dishait/tov-template" target="_blank">
tov-template </a
>, {{ t('the official Tov + Vue + Vite template') }}
</p>
<p class="read-the-docs">
{{ t('The total number of views is') }}
<span class="text-gray-800" dark="text-gray-300">{{ visits ?? 0 }}</span>
</p>
</div>
</template>
<style scoped>
.read-the-docs {
color: #888;
font-size: 1.2rem;
animation: slide-up 0.5s ease-out;
}
@keyframes slide-up {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
</style>

View File

@ -1,16 +0,0 @@
<script lang="ts" setup>
defineOptions({
name: 'Counter',
})
const counter = createCounter()
</script>
<template>
<button
class="inline-block cursor-pointer rounded from-pink-500 via-red-500 to-yellow-500 bg-gradient-to-r px-8 py-2 text-sm text-white font-medium transition !border-0 !outline-none"
hover="scale-110 shadow-xl"
@click="counter.inc()"
>
{{ counter.count }}
</button>
</template>

View File

@ -5,9 +5,10 @@ import 'virtual:unocss-devtools'
// 你自定义的 css // 你自定义的 css
import './styles/main.css' import './styles/main.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue' import App from './App.vue'
const app = createApp(App) const app = createApp(App)
app.use(ElementPlus)
app.mount('#app') app.mount('#app')

29
src/pages/login.vue Normal file
View File

@ -0,0 +1,29 @@
<template>
<div class="login-container">
</div>
</template>
<script setup lang="ts">
</script>
<style scoped>
.login-container{
width: 100%;
height: 100vh;
background-image: url('/e36341619bf8f04dcbdc6b01105a85a.png')
}
</style>
<route lang="json">
{
"meta": {
"layout": "notFound"
}
}
</route>