Skip to content

Commit

Permalink
remove @ alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankll committed Jul 30, 2023
1 parent b625aff commit 3354e1e
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
},
],
'no-var': 'error',
'no-console': process.env === 'development' ? 'warn' : 'error',
'no-console': 'error',
'no-debugger': process.env === 'development' ? 'warn' : 'error',
},
ignorePatterns: ['dist'],
Expand Down
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
</template>

<script setup lang="ts">
import AppProvider from '@/components/AppProvider.vue';
import RouterMain from '@/components/RouterMain.vue';
import AppProvider from './components/AppProvider.vue';
import RouterMain from './components/RouterMain.vue';
</script>
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/AppProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>

<script lang="ts" setup>
import { useAppStore } from '@/store';
import { useAppStore } from '../store';
import { darkTheme } from 'naive-ui';
const appStore = useAppStore();
Expand Down
2 changes: 1 addition & 1 deletion src/layout/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<script setup lang="ts">
import TheAside from './components/the-aside.vue';
import RouterMain from '@/components/RouterMain.vue';
import RouterMain from '../components/RouterMain.vue';
</script>

<style lang="scss" scoped>
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import App from './App.vue';
import router from './router';
import store from './store';

import '@/styles/normalize.css';
import '@/styles/theme.scss';
import './assets/styles/normalize.css';
import './assets/styles/theme.scss';

const app = createApp(App);

Expand Down
6 changes: 3 additions & 3 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const router = createRouter({
meta: {
keepAlive: false,
},
component: () => import('@/layout/index.vue'),
component: () => import('../layout/index.vue'),
redirect: '/home',
children: [
{
Expand All @@ -19,15 +19,15 @@ const router = createRouter({
meta: {
keepAlive: false,
},
component: () => import('@/views/home/index.vue'),
component: () => import('../views/home/index.vue'),
},
{
name: 'Setting',
path: '/setting',
meta: {
keepAlive: false,
},
component: () => import('@/views/setting/index.vue'),
component: () => import('../views/setting/index.vue'),
},
],
},
Expand Down
8 changes: 4 additions & 4 deletions src/views/setting/components/basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
</template>

<script setup lang="ts">
import lightImg from '@/assets/img/theme-light.png';
import darkImg from '@/assets/img/theme-dark.png';
import autoImg from '@/assets/img/theme-auto.png';
import { useAppStore } from '@/store';
import lightImg from '../../../assets/img/theme-light.png';
import darkImg from '../../../assets/img/theme-dark.png';
import autoImg from '../../../assets/img/theme-auto.png';
import { useAppStore } from '../../../store';
const appStore = useAppStore();
const activeType = ref(appStore.themeType);
const themeTypeList = ref([
Expand Down
9 changes: 3 additions & 6 deletions src/views/setting/index.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<template>
<div class="setting-container">
<n-tabs
type="line"
placement="left"
>
<n-tabs type="line" placement="left">
<n-tab-pane n-tab-pane name="Basic" tab="通用设置">
<basic-setting />
</n-tab-pane>
Expand All @@ -15,7 +12,7 @@
</template>

<script setup lang="ts">
import BasicSetting from './components/basic.vue'
import BasicSetting from './components/basic.vue';
</script>

<style lang="scss" scoped>
Expand All @@ -34,4 +31,4 @@ import BasicSetting from './components/basic.vue'
}
}
}
</style>
</style>
6 changes: 0 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import AutoImport from 'unplugin-auto-import/vite';
Expand Down Expand Up @@ -28,9 +27,4 @@ export default defineConfig({
resolvers: [NaiveUiResolver()],
}),
],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
});

0 comments on commit 3354e1e

Please sign in to comment.