+
-
+
-
+
diff --git a/ui/src/index.ts b/ui/src/index.ts
index 8ed87ce..08bb83a 100644
--- a/ui/src/index.ts
+++ b/ui/src/index.ts
@@ -1,18 +1,22 @@
-import { definePlugin } from "@halo-dev/console-shared";
-import { markRaw } from "vue";
-import SourcesTab from "./components/SourcesTab.vue";
+import { VLoading } from '@halo-dev/components'
+import { definePlugin } from '@halo-dev/console-shared'
+import 'uno.css'
+import { defineAsyncComponent } from 'vue'
export default definePlugin({
extensionPoints: {
- "plugin:self:tabs:create": () => {
+ 'plugin:self:tabs:create': () => {
return [
{
- label: "订阅源列表",
- id: "sources",
- component: markRaw(SourcesTab),
- permissions: ["*"],
+ label: '订阅源列表',
+ id: 'sources',
+ component: defineAsyncComponent({
+ loader: () => import('./components/SourcesTab.vue'),
+ loadingComponent: VLoading,
+ }),
+ permissions: ['*'],
},
- ];
+ ]
},
},
-});
+})
diff --git a/ui/tsconfig.app.json b/ui/tsconfig.app.json
deleted file mode 100644
index c6d5513..0000000
--- a/ui/tsconfig.app.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "extends": "@vue/tsconfig/tsconfig.dom.json",
- "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
- "exclude": ["src/**/__tests__/*"],
- "compilerOptions": {
- "baseUrl": ".",
- "composite": true,
- "noImplicitAny": false,
- "paths": {
- "@/*": ["./src/*"]
- },
- "noStrictGenericChecks": true,
- "ignoreDeprecations": "5.0",
- "types": ["unplugin-icons/types/vue"]
- }
-}
diff --git a/ui/tsconfig.json b/ui/tsconfig.json
index 100cf6a..0d0152e 100644
--- a/ui/tsconfig.json
+++ b/ui/tsconfig.json
@@ -1,14 +1,16 @@
{
- "files": [],
- "references": [
- {
- "path": "./tsconfig.node.json"
- },
- {
- "path": "./tsconfig.app.json"
- },
- {
- "path": "./tsconfig.vitest.json"
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
+ "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
+ "exclude": ["src/**/__tests__/*"],
+ "compilerOptions": {
+ "baseUrl": ".",
+ "composite": true,
+ "noImplicitAny": false,
+ "paths": {
+ "@/*": ["./src/*"]
+ },
+ "ignoreDeprecations": "5.0",
+ "types": ["unplugin-icons/types/vue"]
}
- ]
-}
+ }
+
\ No newline at end of file
diff --git a/ui/tsconfig.node.json b/ui/tsconfig.node.json
deleted file mode 100644
index d3c1dff..0000000
--- a/ui/tsconfig.node.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "@tsconfig/node18/tsconfig.json",
- "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "types": ["node"]
- }
-}
diff --git a/ui/tsconfig.vitest.json b/ui/tsconfig.vitest.json
deleted file mode 100644
index d080d61..0000000
--- a/ui/tsconfig.vitest.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "./tsconfig.app.json",
- "exclude": [],
- "compilerOptions": {
- "composite": true,
- "lib": [],
- "types": ["node", "jsdom"]
- }
-}
diff --git a/ui/uno.config.ts b/ui/uno.config.ts
index e2f7da6..582efbb 100644
--- a/ui/uno.config.ts
+++ b/ui/uno.config.ts
@@ -1,5 +1,5 @@
-import { defineConfig, presetUno, transformerCompileClass, transformerDirectives } from "unocss";
+import { defineConfig, presetWind3, transformerCompileClass } from 'unocss'
export default defineConfig({
- presets: [presetUno()],
- transformers: [transformerDirectives(), transformerCompileClass()],
-});
+ presets: [presetWind3()],
+ transformers: [transformerCompileClass()],
+})
diff --git a/ui/vite.config.ts b/ui/vite.config.ts
deleted file mode 100644
index b293b0e..0000000
--- a/ui/vite.config.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import Vue from "@vitejs/plugin-vue";
-import UnoCSS from "unocss/vite";
-import { fileURLToPath, URL } from "url";
-import { defineConfig } from "vite";
-
-export default defineConfig({
- plugins: [
- Vue(),
- UnoCSS({
- mode: "vue-scoped",
- configFile: "./uno.config.ts",
- }),
- ],
- resolve: {
- alias: {
- "@": fileURLToPath(new URL("./src", import.meta.url)),
- },
- },
- define: {
- "process.env": process.env,
- },
- build: {
- outDir: "build/dist",
- emptyOutDir: true,
- lib: {
- entry: "src/index.ts",
- name: "PluginFeed",
- formats: ["iife"],
- fileName: () => "main.js",
- },
- rollupOptions: {
- external: [
- "vue",
- "vue-router",
- "@vueuse/core",
- "@vueuse/components",
- "@vueuse/router",
- "@halo-dev/shared",
- "@halo-dev/components",
- "@halo-dev/api-client",
- "@halo-dev/richtext-editor",
- "axios",
- ],
- output: {
- globals: {
- vue: "Vue",
- "vue-router": "VueRouter",
- "@vueuse/core": "VueUse",
- "@vueuse/components": "VueUse",
- "@vueuse/router": "VueUse",
- "@halo-dev/console-shared": "HaloConsoleShared",
- "@halo-dev/components": "HaloComponents",
- "@halo-dev/api-client": "HaloApiClient",
- "@halo-dev/richtext-editor": "RichTextEditor",
- axios: "axios",
- },
- extend: true,
- },
- },
- },
-});