Signed-off-by: kevin <kevin@lmve.net>

This commit is contained in:
2025-10-24 20:02:22 +08:00
parent 6d1c3b7c6a
commit ba0ce22be2
3 changed files with 24 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
export const myfuncs = {
test(){
console.log("Myfunc test");
},
}
+14 -2
View File
@@ -1,5 +1,17 @@
<script setup lang="ts"> <script setup lang="ts">
import {myfuncs} from '../myfunc.js';
myfuncs.test();
onload = () => {
console.log("Page loaded");
}
function test(){
console.log("Test function called");
document.body.setAttribute("data-bs-theme", "dark"); // 暗色模式
}
</script> </script>
<template> <template>
@@ -39,7 +51,7 @@
<div class="d-none d-md-flex"> <div class="d-none d-md-flex">
<div class="nav-item"> <div class="nav-item">
<a href="?theme=dark" class="nav-link px-0 hide-theme-dark" title="Enable dark mode" data-bs-toggle="tooltip" data-bs-placement="bottom"> <a @click="test" class="nav-link px-0 hide-theme-dark" title="Enable dark mode">
<!-- Download SVG icon from http://tabler.io/icons/icon/moon --> <!-- Download SVG icon from http://tabler.io/icons/icon/moon -->
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@@ -56,7 +68,7 @@
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
</svg> </svg>
</a> </a>
<a href="?theme=light" class="nav-link px-0 hide-theme-light" title="Enable light mode" data-bs-toggle="tooltip" data-bs-placement="bottom"> <a href="?theme=light" class="nav-link px-0 hide-theme-light" title="Enable light mode">
<!-- Download SVG icon from http://tabler.io/icons/icon/sun --> <!-- Download SVG icon from http://tabler.io/icons/icon/sun -->
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
+1
View File
@@ -8,6 +8,7 @@ import router from './router'
import '@tabler/core/dist/css/tabler.min.css' import '@tabler/core/dist/css/tabler.min.css'
import '@tabler/core/dist/css/tabler-vendors.min.css' import '@tabler/core/dist/css/tabler-vendors.min.css'
import '@tabler/core/dist/js/tabler.min.js'
const app = createApp(App) const app = createApp(App)