Carson 1 éve
szülő
commit
6d972bbf24

+ 2 - 11
.vitepress/config.mts

@@ -117,19 +117,10 @@ export default defineConfig({
     envDir: "../",
     ssr: {
       // SSG Vue-i18n workaround
-      noExternal: [/vue-i18n/],
-    },
-    build: {
-      rollupOptions: {
-        external: ['path-browserify'] // 排除特定模块
-      }
+      noExternal: [/vue-i18n/, 'element-plus'],
     },
     plugins: [
-      VueI18nPlugin({
-        /* options */
-        // locale messages resource pre-compile option
-        // include: resolve(dirname(fileURLToPath(import.meta.url)), './path/to/src/locales/**'),
-      }),
+      VueI18nPlugin({}),
       Icons({
         compiler: "vue3",
         customCollections: {

+ 8 - 4
components/Edit/AppendModal.vue

@@ -30,8 +30,10 @@ const rules = reactive<FormRules<typeof formData>>({
       trigger: "change",
     },
     {
-      pattern: /[^\\/:"*?<>|]/, message: '有非法字符: \\/:"*?<>|', trigger: 'change'
-    }
+      pattern: /[^\\/:"*?<>|]/,
+      message: '有非法字符: \\/:"*?<>|',
+      trigger: "change",
+    },
   ],
 });
 
@@ -59,13 +61,15 @@ watch(
 );
 </script>
 <template>
-  <el-dialog v-model="show">
+  <el-dialog width="400px" v-model="show">
     <el-form ref="form$" :model="formData" :rules="rules">
       <el-form-item label="是否文件夹" prop="isDir">
         <el-switch v-model="formData.isDir" inline-prompt></el-switch>
       </el-form-item>
       <el-form-item :label="formData.isDir ? '文件夹名' : '文件名'" prop="filename">
-        <el-input v-model="formData.filename"> </el-input>
+        <el-input v-model="formData.filename">
+          <template v-if="!formData.isDir" #append>.md</template>
+        </el-input>
       </el-form-item>
       <el-form-item>
         <el-button

+ 1 - 1
components/HomeCard/HomeCardTitle.vue

@@ -2,7 +2,7 @@
 import { ArrowRightBold } from "@element-plus/icons-vue";
 const props = withDefaults(
   defineProps<{
-    showArrow: boolean;
+    showArrow?: boolean;
   }>(),
   { showArrow: false }
 );

+ 0 - 1
components/HomeContent.vue

@@ -1,5 +1,4 @@
 <script setup lang="ts">
-import { ref } from "vue";
 import Search from "./Search/index.vue";
 import HomeCard from "./HomeCard";
 import HomeSection from "./HomeSection.vue";

+ 1 - 1
pages/zh-HK/index.md

@@ -7,4 +7,4 @@ layout: home
 import HomeContent from '@/components/HomeContent.vue'
 </script>
 
-<HomeContent />
+<HomeContent key="zh-HK" />

+ 1 - 1
utils/sideBar.ts

@@ -10,7 +10,7 @@ const trimSuffix = (str) => {
 
 const filterLocaleContents = (contents, prefix, sortMap) => {
   return contents!
-    .filter((cont) => cont.Key!.startsWith(prefix))
+    .filter((cont) => cont.Key!.startsWith(prefix) && cont.Key !== `${prefix}index.md`)
     .map((cont) => {
       return {
         ...cont,