diff --git a/.editorconfig b/.editorconfig
index 0fdeb753..179aec6f 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -16,6 +16,3 @@ indent_size = 2
[*.md]
trim_trailing_whitespace = false
-
-[Makefile]
-indent_style = tab
diff --git a/.vscode/launch.json b/.vscode/launch.json
index c40dac83..d2e637e9 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,10 +1,14 @@
{
+ "$schema": "https://json.schemastore.org/launchsettings.json",
+ "version": "0.2.0",
"configurations": [
{
"type": "chrome", // chrome、edge
"name": "vben admin pro dev", // 调试的名称,可以自定义
"request": "launch",
"url": "http://localhost:5173",
+ "env": { "NODE_ENV": "development" },
+ "sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-antd/src"
}
]
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 39bce5fb..5d2fed45 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -60,7 +60,6 @@
},
"files.exclude": {
- "**/.editorconfig": true,
"**/.eslintcache": true,
"**/bower_components": true,
"**/.turbo": true,
diff --git a/apps/web-antd/src/bootstrap.ts b/apps/web-antd/src/bootstrap.ts
index 966b5891..8dab5652 100644
--- a/apps/web-antd/src/bootstrap.ts
+++ b/apps/web-antd/src/bootstrap.ts
@@ -1,6 +1,7 @@
import { createApp } from 'vue';
import '@vben/styles';
+import '@vben/styles/antd';
import { preferences } from '@vben-core/preferences';
import { loadMessages, setupI18n } from '#/locales';
diff --git a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
index 858d4b65..70c8925b 100644
--- a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
+++ b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
@@ -26,7 +26,7 @@ export async function perfectionist(): Promise {
vue: 'vue',
},
value: {
- vben: ['@vben*', '@vben/*', '@vben-core/*'],
+ vben: ['@vben*', '@vben/**/**', '@vben-core/**/**'],
vue: ['vue', 'vue-*', '@vue*'],
},
},
diff --git a/internal/tailwind-config/package.json b/internal/tailwind-config/package.json
index 41ca7ef2..7dd8cf1e 100644
--- a/internal/tailwind-config/package.json
+++ b/internal/tailwind-config/package.json
@@ -37,6 +37,8 @@
},
"./postcss": {
"types": "./src/postcss.config.ts",
+ "import": "./dist/postcss.config.mjs",
+ "require": "./dist/postcss.config.cjs",
"default": "./dist/postcss.config.mjs"
},
"./*": "./*"
diff --git a/packages/@core/shared/design-tokens/src/default/index.css b/packages/@core/shared/design-tokens/src/default/index.css
index 26116a33..afbfef20 100644
--- a/packages/@core/shared/design-tokens/src/default/index.css
+++ b/packages/@core/shared/design-tokens/src/default/index.css
@@ -1,5 +1,9 @@
/* https://gavin-yyc.github.io/colorconvert/ */
:root {
+ --font-geist-sans: 'geist-sans', -apple-system, blinkmacsystemfont, 'Segoe UI',
+ roboto, helvetica, arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
+ 'Segoe UI Symbol';
+
/* Default background color of ...etc */
--background: 0 0 100%;
--foreground: 210 6% 21%;
diff --git a/packages/@core/shared/design/build.config.ts b/packages/@core/shared/design/build.config.ts
deleted file mode 100644
index 7de447e2..00000000
--- a/packages/@core/shared/design/build.config.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { defineBuildConfig } from 'unbuild';
-
-export default defineBuildConfig({
- clean: true,
- declaration: true,
- entries: [
- {
- builder: 'mkdist',
- input: './src',
- loaders: ['sass'],
- outDir: './dist',
- pattern: ['index.scss'],
- },
- {
- builder: 'mkdist',
- input: './src',
- loaders: ['postcss'],
- outDir: './dist',
- pattern: ['tailwind.css'],
- },
- ],
-});
diff --git a/packages/@core/shared/design/package.json b/packages/@core/shared/design/package.json
index 10731c4c..55b2c198 100644
--- a/packages/@core/shared/design/package.json
+++ b/packages/@core/shared/design/package.json
@@ -11,25 +11,31 @@
"license": "MIT",
"type": "module",
"scripts": {
- "build": "pnpm unbuild",
- "prepublishOnly": "npm run build",
- "stub": "pnpm unbuild --stub"
+ "build": "pnpm vite build",
+ "prepublishOnly": "npm run build"
},
"files": [
"dist",
"src"
],
+ "main": "./dist/index.mjs",
+ "module": "./dist/index.mjs",
"exports": {
+ "./bem": {
+ "development": "./src/scss-bem/bem.scss",
+ "default": "./dist/bem.scss"
+ },
".": {
- "development": "./src/scss/index.scss",
- "default": "./dist/index.css"
- },
- "./tailwind": {
- "development": "./src/tailwind.css",
- "default": "./dist/tailwind.css"
- },
- "./global": {
- "default": "./src/scss/global.scss"
+ "types": "./src/index.ts",
+ "development": "./src/index.ts",
+ "default": "./dist/index.mjs"
+ }
+ },
+ "publishConfig": {
+ "exports": {
+ ".": {
+ "default": "./dist/index.mjs"
+ }
}
},
"dependencies": {
diff --git a/packages/styles/src/common/nprogress.css b/packages/@core/shared/design/src/css/nprogress.css
similarity index 100%
rename from packages/styles/src/common/nprogress.css
rename to packages/@core/shared/design/src/css/nprogress.css
diff --git a/packages/@core/shared/design/src/tailwind.css b/packages/@core/shared/design/src/css/tailwind.css
similarity index 100%
rename from packages/@core/shared/design/src/tailwind.css
rename to packages/@core/shared/design/src/css/tailwind.css
diff --git a/packages/@core/shared/design/src/index.scss b/packages/@core/shared/design/src/index.scss
deleted file mode 100644
index dd868403..00000000
--- a/packages/@core/shared/design/src/index.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import './scss/index';
diff --git a/packages/@core/shared/design/src/index.ts b/packages/@core/shared/design/src/index.ts
new file mode 100644
index 00000000..92c72f83
--- /dev/null
+++ b/packages/@core/shared/design/src/index.ts
@@ -0,0 +1,5 @@
+import './scss/index.scss';
+import './css/tailwind.css';
+import './css/nprogress.css';
+
+export {};
diff --git a/packages/@core/shared/design/src/scss/global.scss b/packages/@core/shared/design/src/scss-bem/bem.scss
similarity index 92%
rename from packages/@core/shared/design/src/scss/global.scss
rename to packages/@core/shared/design/src/scss-bem/bem.scss
index 83f4521c..2c8ec306 100644
--- a/packages/@core/shared/design/src/scss/global.scss
+++ b/packages/@core/shared/design/src/scss-bem/bem.scss
@@ -1,4 +1,4 @@
-@forward './common/constants.scss';
+@forward './constants.scss';
@mixin b($block) {
$B: $namespace + '-' + $block !global;
diff --git a/packages/@core/shared/design/src/scss/common/constants.scss b/packages/@core/shared/design/src/scss-bem/constants.scss
similarity index 100%
rename from packages/@core/shared/design/src/scss/common/constants.scss
rename to packages/@core/shared/design/src/scss-bem/constants.scss
diff --git a/packages/@core/shared/design/src/scss/common/base.scss b/packages/@core/shared/design/src/scss/base.scss
similarity index 96%
rename from packages/@core/shared/design/src/scss/common/base.scss
rename to packages/@core/shared/design/src/scss/base.scss
index 02009b2a..710ef63a 100644
--- a/packages/@core/shared/design/src/scss/common/base.scss
+++ b/packages/@core/shared/design/src/scss/base.scss
@@ -1,5 +1,4 @@
#app,
-.ant-app,
body,
html {
width: 100%;
@@ -7,10 +6,6 @@ html {
overscroll-behavior: none;
}
-.ant-app {
- color: inherit;
-}
-
*,
::after,
::before {
diff --git a/packages/@core/shared/design/src/scss/index.scss b/packages/@core/shared/design/src/scss/index.scss
index 7776baef..716c744f 100644
--- a/packages/@core/shared/design/src/scss/index.scss
+++ b/packages/@core/shared/design/src/scss/index.scss
@@ -1,4 +1,4 @@
/** css 样式重置 */
@import 'modern-normalize/modern-normalize.css';
-@import './common/base';
+@import './base';
@import './transition';
diff --git a/packages/@core/shared/design/vite.config.mts b/packages/@core/shared/design/vite.config.mts
new file mode 100644
index 00000000..a6c4c544
--- /dev/null
+++ b/packages/@core/shared/design/vite.config.mts
@@ -0,0 +1,7 @@
+import { defineConfig } from '@vben/vite-config';
+
+export default defineConfig({
+ vite: {
+ publicDir: 'src/scss-bem',
+ },
+});
diff --git a/packages/@core/ui-kit/menu-ui/src/components/normal-menu/normal-menu.vue b/packages/@core/ui-kit/menu-ui/src/components/normal-menu/normal-menu.vue
index 65c82ac0..2bad7197 100644
--- a/packages/@core/ui-kit/menu-ui/src/components/normal-menu/normal-menu.vue
+++ b/packages/@core/ui-kit/menu-ui/src/components/normal-menu/normal-menu.vue
@@ -58,7 +58,7 @@ function handleMouseenter(menu: MenuRecordRaw) {