Skip to content

Commit

Permalink
feat: about & ui
Browse files Browse the repository at this point in the history
  • Loading branch information
AxyLm committed Jul 31, 2022
1 parent 53f8002 commit 4f8015b
Show file tree
Hide file tree
Showing 7 changed files with 4,380 additions and 3,012 deletions.
59 changes: 28 additions & 31 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Vue Debug for Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
},
{
"type": "firefox",
"request": "launch",
"name": "Vue Debug for Firefox",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/src",
"pathMappings": [
{
"url": "webpack:///src/",
"path": "${webRoot}/"
}
]
}
]
}
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Vue Debug for Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
},
{
"type": "chrome",
"request": "launch",
"name": "Vue Debug for Chrome",
"url": "http://localhost:5173",
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
}
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@varlet/ui": "^1.27.18",
"@vueuse/core": "^8.4.2",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
26 changes: 23 additions & 3 deletions src/layout/Index.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
<template>
<div class="layout">
<lHeader></lHeader>
<router-view></router-view>

<div class="p-20 text-center">
<img src="/src/assets/logo.svg" class="mb-20 inline w-60" alt="" />
<div>
<router-view></router-view>
</div>
<div class="mt-10 text-lg">
<router-link to="/home">
<span
><sup>{{ str }}</sup> Home</span
>
</router-link>
<router-link to="/about" class="ml-8">
<span
><sup class="sub">{{ str }}</sup> Abount</span
>
</router-link>
</div>
</div>
<!-- <Footer></Footer> -->
</div>
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const str = '</>';
</script>
<script lang="ts">
import lHeader from '~/layout/Header.vue';
import { defineComponent } from 'vue';
Expand Down
13 changes: 7 additions & 6 deletions src/views/About/index.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<template>
<div class="pt-20 text-center">
<div>
<span class="text-xl">About</span>

<p class="text-md">孟春之月 - 律之太簇 </p>

<ul>
<!-- <li><a href="https://varlet.gitee.io/varlet-ui/#/zh-CN/home">varlet-ui</a></li> -->
</ul>
</div>
</template>
<script lang="ts">
export default {
name: 'About',
};
</script>
26 changes: 8 additions & 18 deletions src/views/Home/Index.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
<script setup lang="ts">
import { ref } from 'vue-demi';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const str = '</>';
const count = ref(0);
</script>

<template>
<div class="p-20 text-center">
<img src="/src/assets/logo.svg" class="mb-20 inline w-60" alt="" />

<div>
<span class="fm1 text-5xl">{{ t('helloWorld') }}</span>
</div>
<div class="mt-10 text-lg">
<router-link to="/home">
<span
><sup>{{ str }}</sup> Home</span
>
</router-link>
<router-link to="/about" class="ml-8">
<span
><sup class="sub">{{ str }}</sup> Abount</span
>
</router-link>
</div>
<div>
<span class="fm1 text-5xl">{{ t('helloWorld') }}</span>
</div>
<p class="mt-5">
<var-button @click="count++">{{ count }} 主要按钮</var-button>
</p>
</template>

<style lang="less">
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as path from 'path';
import Icons from 'unplugin-icons/vite';
import Components from 'unplugin-vue-components/vite';
import IconsResolver from 'unplugin-icons/resolver';
import { VarletUIResolver } from 'unplugin-vue-components/resolvers';

// https://vitejs.dev/config/
export default defineConfig({
Expand Down Expand Up @@ -46,10 +47,9 @@ export default defineConfig({
Components({
resolvers: [
IconsResolver({
// to avoid naming conflicts
// a prefix can be specified for icons
prefix: 'icon',
}),
VarletUIResolver(),
],
dts: 'src/components.d.ts',
}),
Expand Down
Loading

0 comments on commit 4f8015b

Please sign in to comment.