From 8ea3ae78b075a5cd01b149bb993011114db5e34b Mon Sep 17 00:00:00 2001
From: sight <1453017105@qq.com>
Date: Mon, 29 Aug 2022 16:23:30 +0800
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(component):=20[space}=20?=
=?UTF-8?q?=E5=88=87=E6=8D=A2=E8=87=B3=20tsx?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 1 +
package/component/script/build.all.ts | 3 +-
package/component/script/build.es.ts | 5 +-
package/component/script/build.umd.ts | 3 +-
.../component/src/component/space/index.vue | 249 +++++++++---------
.../src/plugin/all-plugins.ts | 2 +
6 files changed, 142 insertions(+), 121 deletions(-)
diff --git a/package.json b/package.json
index d4340be0..bf44a22c 100644
--- a/package.json
+++ b/package.json
@@ -51,6 +51,7 @@
"@types/node": "^16.11.9",
"@types/uuid": "^8.3.4",
"@vitejs/plugin-vue": "^2.3.3",
+ "@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/compiler-sfc": "^3.2.37",
"@vue/server-renderer": "^3.2.37",
"less": "^4.1.3",
diff --git a/package/component/script/build.all.ts b/package/component/script/build.all.ts
index 28443e52..90574be7 100644
--- a/package/component/script/build.all.ts
+++ b/package/component/script/build.all.ts
@@ -1,5 +1,6 @@
import { UserConfigExport } from "vite";
import vue from "@vitejs/plugin-vue";
+import vueJsx from "@vitejs/plugin-vue-jsx";
import { resolve } from "path";
export default (): UserConfigExport => {
@@ -13,7 +14,7 @@ export default (): UserConfigExport => {
},
],
},
- plugins: [vue()],
+ plugins: [vue(), vueJsx],
build: {
cssCodeSplit: false,
outDir: "lib",
diff --git a/package/component/script/build.es.ts b/package/component/script/build.es.ts
index 27c16da6..0e516373 100644
--- a/package/component/script/build.es.ts
+++ b/package/component/script/build.es.ts
@@ -1,5 +1,6 @@
import { UserConfigExport } from "vite";
import vue from "@vitejs/plugin-vue";
+import vueJsx from "@vitejs/plugin-vue-jsx";
import { resolve } from "path";
import * as fs from "fs";
@@ -39,6 +40,8 @@ const matchModule: string[] = [
"scroll",
"radio",
"empty",
+ "dropdownMenu",
+ "dropdownMenuItem",
];
export default (): UserConfigExport => {
@@ -60,7 +63,7 @@ export default (): UserConfigExport => {
},
postcss: {},
},
- plugins: [vue()],
+ plugins: [vue(), vueJsx()],
build: {
cssCodeSplit: true,
emptyOutDir: true,
diff --git a/package/component/script/build.umd.ts b/package/component/script/build.umd.ts
index d7831622..cb334fe9 100644
--- a/package/component/script/build.umd.ts
+++ b/package/component/script/build.umd.ts
@@ -1,5 +1,6 @@
import { UserConfigExport } from "vite";
import vue from "@vitejs/plugin-vue";
+import vueJsx from "@vitejs/plugin-vue-jsx";
import { resolve } from "path";
export default (): UserConfigExport => {
@@ -13,7 +14,7 @@ export default (): UserConfigExport => {
},
],
},
- plugins: [vue()],
+ plugins: [vue(), vueJsx],
build: {
cssCodeSplit: false,
outDir: "umd",
diff --git a/package/component/src/component/space/index.vue b/package/component/src/component/space/index.vue
index afd7df79..48d64372 100644
--- a/package/component/src/component/space/index.vue
+++ b/package/component/src/component/space/index.vue
@@ -1,135 +1,148 @@
-
-
-
-
-
-
-
diff --git a/package/document-component/src/plugin/all-plugins.ts b/package/document-component/src/plugin/all-plugins.ts
index e195c53d..f0298640 100644
--- a/package/document-component/src/plugin/all-plugins.ts
+++ b/package/document-component/src/plugin/all-plugins.ts
@@ -1,4 +1,5 @@
import vue from "@vitejs/plugin-vue";
+import vueJsx from "@vitejs/plugin-vue-jsx";
import Markdown from "vite-plugin-md";
import container from "markdown-it-container";
import preWrapper from "./pre-wrapper";
@@ -17,6 +18,7 @@ const plugins = [
vue({
include: [/\.vue$/, /\.md$/],
}),
+ vueJsx(),
Markdown({
markdownItOptions: {
html: true,