mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-05-12 19:16:47 +08:00
add eslint prettier unocss
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -1,14 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
|
||||
import { IconConfigProvider } from '@vicons/utils'
|
||||
import zhCn from 'element-plus/lib/locale/lang/zh-cn';
|
||||
import { IconConfigProvider } from '@vicons/utils';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Suspense>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<icon-config-provider size="18">
|
||||
<IconConfigProvider size="18">
|
||||
<RouterView />
|
||||
</icon-config-provider>
|
||||
</IconConfigProvider>
|
||||
</el-config-provider>
|
||||
</Suspense>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import axios from "axios";
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 添加番剧订阅
|
||||
* @param type 'new' 添加新番, ’old‘ 添加旧番
|
||||
* @param rss_link
|
||||
* @param rss_link
|
||||
*/
|
||||
const addBangumi = (type: string, rss_link: string) => {
|
||||
if(type === 'new') {
|
||||
function addBangumi(type: string, rss_link: string) {
|
||||
if (type === 'new') {
|
||||
return axios.post('api/v1/subscribe', { rss_link });
|
||||
} else if(type === 'old') {
|
||||
} else if (type === 'old') {
|
||||
return axios.post('api/v1/collection', { rss_link });
|
||||
} else {
|
||||
console.error('type错误, type应为 new 或 old');
|
||||
@@ -18,7 +17,7 @@ const addBangumi = (type: string, rss_link: string) => {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取AB存储的数据
|
||||
* 获取AB存储的数据
|
||||
*/
|
||||
const getABData = () => axios.get('api/v1/data');
|
||||
|
||||
@@ -28,8 +27,4 @@ const getABData = () => axios.get('api/v1/data');
|
||||
*/
|
||||
const removeRule = (name: string) => axios.get(`api/v1/removeRule/${name}`);
|
||||
|
||||
export {
|
||||
addBangumi,
|
||||
getABData,
|
||||
removeRule
|
||||
}
|
||||
export { addBangumi, getABData, removeRule };
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import axios from 'axios'
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 获取AB的日志
|
||||
* 获取AB的日志
|
||||
*/
|
||||
const getABLog = () => axios.get('api/v1/log');
|
||||
|
||||
/**
|
||||
* 重置 AB 的数据,程序会在下一轮检索中重新添加 RSS 订阅信息。
|
||||
* 重置 AB 的数据,程序会在下一轮检索中重新添加 RSS 订阅信息。
|
||||
*/
|
||||
const resetRule = () => axios.get('api/v1/resetRule');
|
||||
|
||||
export {
|
||||
getABLog,
|
||||
resetRule,
|
||||
}
|
||||
export { getABLog, resetRule };
|
||||
|
||||
57
src/auto-imports.d.ts
vendored
Normal file
57
src/auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
}
|
||||
32
src/components.d.ts
vendored
Normal file
32
src/components.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
ElAside: typeof import('element-plus/es')['ElAside']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
ShowResults: typeof import('./components/ShowResults.vue')['default']
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
title: string,
|
||||
results: object | null
|
||||
defineProps<{
|
||||
title: string;
|
||||
results: object | null;
|
||||
}>();
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const handleClose = () => {
|
||||
function handleClose() {
|
||||
dialogVisible.value = false;
|
||||
}
|
||||
const open = () => {
|
||||
function open() {
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
open,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -34,13 +34,13 @@ defineExpose({
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scope>
|
||||
.dia-log{
|
||||
.results{
|
||||
<style lang="scss" scope>
|
||||
.dia-log {
|
||||
.results {
|
||||
padding: 1em;
|
||||
line-height: 1.5;
|
||||
color: #fff;
|
||||
background: #333;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
18
src/main.ts
18
src/main.ts
@@ -1,14 +1,12 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import 'vue-global-api'
|
||||
import 'modern-normalize/modern-normalize.css'
|
||||
import { createApp } from 'vue';
|
||||
import { Icon } from '@vicons/utils';
|
||||
import router from './router';
|
||||
import { Icon } from '@vicons/utils'
|
||||
import App from './App.vue';
|
||||
|
||||
const app = createApp(App)
|
||||
import '@unocss/reset/tailwind-compat.css';
|
||||
import 'virtual:uno.css';
|
||||
|
||||
const app = createApp(App);
|
||||
app.component('Icon', Icon);
|
||||
|
||||
app.use(router)
|
||||
|
||||
app.mount('#app')
|
||||
app.use(router);
|
||||
app.mount('#app');
|
||||
|
||||
@@ -6,14 +6,10 @@ import YMenu from './YMenu.vue';
|
||||
<div class="app-layout">
|
||||
<el-container>
|
||||
<el-header class="header">
|
||||
<img
|
||||
src="@/assets/logo.png"
|
||||
alt="logo"
|
||||
class="logo"
|
||||
>
|
||||
<img src="@/assets/logo.png" alt="logo" class="logo" />
|
||||
</el-header>
|
||||
|
||||
<el-container style="overflow: hidden;">
|
||||
<el-container style="overflow: hidden">
|
||||
<el-aside width="auto">
|
||||
<YMenu />
|
||||
</el-aside>
|
||||
@@ -28,14 +24,14 @@ import YMenu from './YMenu.vue';
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scope>
|
||||
<style lang="scss" scope>
|
||||
.app-layout {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
|
||||
@media screen and (max-width: 980px){
|
||||
@media screen and (max-width: 980px) {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
@@ -51,4 +47,4 @@ import YMenu from './YMenu.vue';
|
||||
height: 70%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useRoute } from 'vue-router'
|
||||
import { Home, Debug, DocumentBlank } from '@vicons/carbon';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { Debug, DocumentBlank, Home } from '@vicons/carbon';
|
||||
import { useWindowSize } from '@vueuse/core';
|
||||
|
||||
const { fullPath } = useRoute();
|
||||
@@ -16,7 +16,7 @@ watchEffect(() => {
|
||||
} else {
|
||||
isCollapse.value = false;
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -26,7 +26,6 @@ watchEffect(() => {
|
||||
:collapse="isCollapse"
|
||||
router
|
||||
>
|
||||
|
||||
<el-menu-item index="/bangumi">
|
||||
<Icon>
|
||||
<Home />
|
||||
@@ -46,16 +45,15 @@ watchEffect(() => {
|
||||
</Icon>
|
||||
<template #title>日志</template>
|
||||
</el-menu-item>
|
||||
|
||||
</el-menu>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scope>
|
||||
<style lang="scss" scope>
|
||||
.app-menu {
|
||||
height: 100%;
|
||||
|
||||
.xicon {
|
||||
margin-right: .5em;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -3,32 +3,27 @@ import ShowResults from '@/components/ShowResults.vue';
|
||||
import { addBangumi } from '@/api/bangumi';
|
||||
|
||||
const props = defineProps<{
|
||||
type: string
|
||||
}>()
|
||||
type: string;
|
||||
}>();
|
||||
|
||||
const rssLink = ref('');
|
||||
const loading = ref(false);
|
||||
const dialog = ref();
|
||||
const dialogData = ref(null);
|
||||
|
||||
const add = async () => {
|
||||
async function add() {
|
||||
loading.value = true;
|
||||
const res = await addBangumi(props.type, rssLink.value);
|
||||
if (res){
|
||||
if (res) {
|
||||
loading.value = false;
|
||||
dialogData.value = res.data;
|
||||
dialog.value.open();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ShowResults
|
||||
ref="dialog"
|
||||
title="执行结果"
|
||||
:results="dialogData"
|
||||
/>
|
||||
<ShowResults ref="dialog" title="执行结果" :results="dialogData" />
|
||||
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
@@ -39,19 +34,13 @@ const add = async () => {
|
||||
</template>
|
||||
|
||||
<div class="card-con">
|
||||
<el-input
|
||||
v-model="rssLink"
|
||||
placeholder="请输入番剧的rss链接"
|
||||
>
|
||||
<el-input v-model="rssLink" placeholder="请输入番剧的rss链接">
|
||||
<template #append>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
@click="add"
|
||||
>订阅</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="add"
|
||||
>订阅</el-button
|
||||
>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -11,23 +11,15 @@ const dialog = ref();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ShowResults
|
||||
ref="dialog"
|
||||
title="执行结果"
|
||||
:results="dialogData"
|
||||
/>
|
||||
<ShowResults ref="dialog" title="执行结果" :results="dialogData" />
|
||||
|
||||
<div class="bangumi-data">
|
||||
<el-collapse
|
||||
accordion
|
||||
v-model="activeName"
|
||||
>
|
||||
|
||||
<el-collapse-item
|
||||
title="已订阅番剧"
|
||||
name="1"
|
||||
>
|
||||
<span class="tips">注: 目前只能管理 mikan 源, 如通过 api 添加其他来源的新番将 <b>不会</b> 出现在此处</span>
|
||||
<el-collapse v-model="activeName" accordion>
|
||||
<el-collapse-item title="已订阅番剧" name="1">
|
||||
<span class="tips"
|
||||
>注: 目前只能管理 mikan 源, 如通过 api 添加其他来源的新番将
|
||||
<b>不会</b> 出现在此处</span
|
||||
>
|
||||
<el-table
|
||||
:data="bangumiData.bangumi_info"
|
||||
stripe
|
||||
@@ -35,40 +27,22 @@ const dialog = ref();
|
||||
style="width: 100%"
|
||||
max-height="40vh"
|
||||
>
|
||||
<el-table-column
|
||||
prop="official_title"
|
||||
label="番名"
|
||||
min-width="250"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="season"
|
||||
label="季度"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="dpi"
|
||||
label="分辨率"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="subtitle"
|
||||
label="字幕"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="group"
|
||||
label="字幕组"
|
||||
/>
|
||||
<el-table-column prop="official_title" label="番名" min-width="250" />
|
||||
<el-table-column prop="season" label="季度" width="60" />
|
||||
<el-table-column prop="dpi" label="分辨率" />
|
||||
<el-table-column prop="subtitle" label="字幕" />
|
||||
<el-table-column prop="group" label="字幕组" />
|
||||
</el-table>
|
||||
</el-collapse-item>
|
||||
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scope>
|
||||
<style lang="scss" scope>
|
||||
.bangumi-data {
|
||||
.tips {
|
||||
line-height: 2;
|
||||
color: #F56C6C;
|
||||
color: #f56c6c;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import BangumiData from './components/BangumiData.vue'
|
||||
import AddBangumi from './components/AddBangumi.vue'
|
||||
import BangumiData from './components/BangumiData.vue';
|
||||
import AddBangumi from './components/AddBangumi.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -14,7 +14,6 @@ import AddBangumi from './components/AddBangumi.vue'
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
|
||||
<!-- S 添加新番 -->
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="8">
|
||||
<AddBangumi type="new" />
|
||||
@@ -26,15 +25,14 @@ import AddBangumi from './components/AddBangumi.vue'
|
||||
<AddBangumi type="old" />
|
||||
</el-col>
|
||||
<!-- E 添加旧番 -->
|
||||
|
||||
</el-row>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scope>
|
||||
<style lang="scss" scope>
|
||||
.el-row {
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
5
src/pages/config/index.vue
Normal file
5
src/pages/config/index.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>
|
||||
<div class="config"></div>
|
||||
</template>
|
||||
@@ -1,21 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import 'element-plus/es/components/message/style/css';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { resetRule } from '@/api/debug';
|
||||
import 'element-plus/es/components/message/style/css'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const loading = ref(false);
|
||||
const reset = async () => {
|
||||
async function reset() {
|
||||
const res = await resetRule();
|
||||
if (res.data === "Success") {
|
||||
if (res.data === 'Success') {
|
||||
ElMessage({
|
||||
message: '数据已重置, 建议重启容器',
|
||||
type: 'success',
|
||||
})
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
message: `错误: ${res.data}`,
|
||||
type: 'error',
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -23,7 +23,6 @@ const reset = async () => {
|
||||
<template>
|
||||
<section class="debug">
|
||||
<el-row :gutter="20">
|
||||
|
||||
<!-- S 重置数据 -->
|
||||
<el-col :xs="24" :sm="12" :lg="8">
|
||||
<el-card shadow="hover">
|
||||
@@ -34,20 +33,13 @@ const reset = async () => {
|
||||
</template>
|
||||
|
||||
<div class="card-con">
|
||||
<el-button
|
||||
type="danger"
|
||||
:loading="loading"
|
||||
@click="reset"
|
||||
>重置</el-button>
|
||||
<el-button type="danger" :loading="loading" @click="reset"
|
||||
>重置</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- E 重置数据 -->
|
||||
|
||||
</el-row>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scope>
|
||||
</style>
|
||||
@@ -4,12 +4,12 @@ import { getABLog } from '@/api/debug';
|
||||
const log = ref(null);
|
||||
const timer = ref<NodeJS.Timer | null>(null);
|
||||
|
||||
const getLog = async () => {
|
||||
async function getLog() {
|
||||
const res = await getABLog();
|
||||
log.value = res.data;
|
||||
}
|
||||
|
||||
const autoUpdate = () => {
|
||||
function autoUpdate() {
|
||||
timer.value = setInterval(getLog, 5000);
|
||||
}
|
||||
getLog();
|
||||
@@ -17,7 +17,7 @@ getLog();
|
||||
onMounted(autoUpdate);
|
||||
onUnmounted(() => {
|
||||
clearInterval(Number(timer.value));
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -26,7 +26,7 @@ onUnmounted(() => {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scope>
|
||||
<style lang="scss" scope>
|
||||
.log-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -38,4 +38,4 @@ onUnmounted(() => {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -4,6 +4,7 @@ const YLayout = () => import('../pages/YLayout.vue');
|
||||
const YBangumi = () => import('../pages/bangumi/index.vue');
|
||||
const YDebug = () => import('../pages/debug/index.vue');
|
||||
const YLog = () => import('../pages/journal/index.vue');
|
||||
const YConfig = () => import('../pages/config/index.vue');
|
||||
|
||||
const routes = [
|
||||
{
|
||||
@@ -13,23 +14,27 @@ const routes = [
|
||||
children: [
|
||||
{
|
||||
path: 'bangumi',
|
||||
component: YBangumi
|
||||
component: YBangumi,
|
||||
},
|
||||
{
|
||||
path: 'debug',
|
||||
component: YDebug
|
||||
component: YDebug,
|
||||
},
|
||||
{
|
||||
path: 'log',
|
||||
component: YLog
|
||||
}
|
||||
]
|
||||
component: YLog,
|
||||
},
|
||||
{
|
||||
path: 'config',
|
||||
component: YConfig,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes,
|
||||
})
|
||||
});
|
||||
|
||||
export default router;
|
||||
export default router;
|
||||
|
||||
6
src/vite-env.d.ts
vendored
6
src/vite-env.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
import type { DefineComponent } from 'vue';
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user