From 6b5cbba7cd7adabd4945b157531ada5be7910e26 Mon Sep 17 00:00:00 2001
From: hxr <1490493387@qq.com>
Date: Sun, 22 Oct 2023 00:03:41 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E6=96=B0=E5=A2=9E=20jsx/t?=
=?UTF-8?q?sx=20=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Former-commit-id: a7e79341d7e4c6d89b64e733834810e92b295bd6
---
package.json | 1 +
src/layout/components/Sidebar/Item.vue | 41 ++++++++++++++++++++++++++
tsconfig.json | 8 +++--
vite.config.ts | 3 ++
4 files changed, 50 insertions(+), 3 deletions(-)
create mode 100644 src/layout/components/Sidebar/Item.vue
diff --git a/package.json b/package.json
index a5656e2..f3ff4f3 100644
--- a/package.json
+++ b/package.json
@@ -77,6 +77,7 @@
"@types/stompjs": "^2.3.5",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
+ "@vitejs/plugin-vue-jsx": "^3.0.2",
"autoprefixer": "^10.4.14",
"commitizen": "^4.3.0",
"cz-git": "^1.6.1",
diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue
new file mode 100644
index 0000000..f4fb60e
--- /dev/null
+++ b/src/layout/components/Sidebar/Item.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
diff --git a/tsconfig.json b/tsconfig.json
index abfa0a4..8b8c16d 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -6,7 +6,6 @@
"moduleResolution": "node",
"strict": true,
"noLib": false,
- "jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -19,7 +18,11 @@
"types": ["vite/client", "unplugin-icons/types/vue"],
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"allowSyntheticDefaultImports": true /* 允许默认导入 */,
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
+
+ "jsx": "preserve",
+ "jsxFactory": "h",
+ "jsxFragmentFactory": "Fragment"
},
"include": [
"src/**/*.ts",
@@ -29,5 +32,4 @@
"vite.config.ts"
],
"exclude": ["node_modules", "dist", "**/*.js"]
- // "references": [{ "path": "./tsconfig.node.json" }]
}
diff --git a/vite.config.ts b/vite.config.ts
index 2032da4..a017e17 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -13,6 +13,8 @@ import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
import { viteMockServe } from "vite-plugin-mock";
+import vueJsx from "@vitejs/plugin-vue-jsx";
+
import UnoCSS from "unocss/vite";
import path from "path";
@@ -67,6 +69,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
},
plugins: [
vue(),
+ vueJsx(),
UnoCSS({
hmrTopLevelAwait: false,
}),