diff --git a/apps/playground/eslint.config.js b/apps/playground/eslint.config.js
index 00330b02c..260f877c8 100644
--- a/apps/playground/eslint.config.js
+++ b/apps/playground/eslint.config.js
@@ -1,3 +1,3 @@
-import antdv from "@ant-design-vue/eslint-config"
+import antdv from '@ant-design-vue/eslint-config'
export default antdv()
diff --git a/apps/playground/package.json b/apps/playground/package.json
index 4dba3629d..031703856 100644
--- a/apps/playground/package.json
+++ b/apps/playground/package.json
@@ -7,6 +7,7 @@
"build": "vite build",
"dev": "vite",
"lint": "eslint . --fix",
+ "format": "prettier --write .",
"preview": "vite preview",
"tsc": "vue-tsc --noEmit"
},
@@ -14,13 +15,6 @@
"@floating-ui/vue": "^1.1.5",
"@heroicons/vue": "^2.1.5",
"@ant-design-vue/ui": "workspace:*",
- "@simonwep/pickr": "^1.9.1",
- "@trpc/client": "^11.0.0",
- "@trpc/server": "^11.0.0",
- "@wdns/vue-code-block": "^2.3.3",
- "clsx": "^2.1.1",
- "cookies": "^0.9.1",
- "uuid": "^10.0.0",
"vue": "^3.4.34",
"vue-router": "^4.4.0"
},
@@ -31,7 +25,6 @@
"@ant-design-vue/vite-config": "workspace:*",
"@ant-design-vue/tailwind-config": "workspace:*",
"@tailwindcss/vite": "^4.1.3",
- "@types/cookies": "^0.9.0",
"@types/node": "^20.0.0",
"@vitejs/plugin-vue": "^5.1.3",
"prettier-plugin-tailwindcss": "^0.6.11",
@@ -39,7 +32,6 @@
"typescript": "^5.8.2",
"vite": "^5.3.5",
"vite-plugin-dts": "^3.9.1",
- "vite-svg-loader": "^5.1.0",
"vue-tsc": "^3.0.3"
}
}
diff --git a/apps/playground/prettier.config.js b/apps/playground/prettier.config.js
index 9b2395e43..2f3358479 100644
--- a/apps/playground/prettier.config.js
+++ b/apps/playground/prettier.config.js
@@ -1,3 +1,3 @@
// @ts-check
-export { default } from "@ant-design-vue/prettier-config/tailwind";
+export { default } from '@ant-design-vue/prettier-config/tailwind'
diff --git a/apps/playground/src/components/HomePage.vue b/apps/playground/src/components/HomePage.vue
index 521a0fb64..e1cb021e6 100644
--- a/apps/playground/src/components/HomePage.vue
+++ b/apps/playground/src/components/HomePage.vue
@@ -2,7 +2,7 @@
diff --git a/apps/playground/src/components/TheBreadcrumbs.vue b/apps/playground/src/components/TheBreadcrumbs.vue
index 8e6fb5d91..2f5e0602a 100644
--- a/apps/playground/src/components/TheBreadcrumbs.vue
+++ b/apps/playground/src/components/TheBreadcrumbs.vue
@@ -1,11 +1,11 @@
-
+
-
diff --git a/apps/playground/src/composables/layout.ts b/apps/playground/src/composables/layout.ts
index a3fca44a0..15f286c56 100644
--- a/apps/playground/src/composables/layout.ts
+++ b/apps/playground/src/composables/layout.ts
@@ -1,4 +1,4 @@
-import type { InjectionKey, Ref } from 'vue';
+import type { InjectionKey, Ref } from 'vue'
import { inject, provide } from 'vue'
export interface LayoutOptions {
diff --git a/apps/playground/src/pages/flex/basic.vue b/apps/playground/src/pages/flex/basic.vue
index 32c06fccb..0c19184fb 100644
--- a/apps/playground/src/pages/flex/basic.vue
+++ b/apps/playground/src/pages/flex/basic.vue
@@ -13,7 +13,7 @@
:style="{ ...baseStyle, background: `${index % 2 ? '#1677ff' : '#1677ffbf'}` }"
/>
-
+
diff --git a/apps/playground/src/routes.ts b/apps/playground/src/routes.ts
index bab68a92c..d6723126f 100644
--- a/apps/playground/src/routes.ts
+++ b/apps/playground/src/routes.ts
@@ -1,4 +1,4 @@
-import type { RouteRecordRaw} from 'vue-router';
+import type { RouteRecordRaw } from 'vue-router'
import { RouterView } from 'vue-router'
import BasicLayout from './components/BasicLayout.vue'
import { h } from 'vue'
diff --git a/packages-config/eslint-config/src/index.ts b/packages-config/eslint-config/src/index.ts
index a7cd332a9..1f10d9431 100644
--- a/packages-config/eslint-config/src/index.ts
+++ b/packages-config/eslint-config/src/index.ts
@@ -11,10 +11,10 @@ import {
typescript,
vue,
} from "./configs"
-import { Config } from './types';
+import type { Config } from './types';
import { isPackageExists } from "local-pkg";
-import { Linter } from 'eslint';
-import { ConfigNames } from './typegen';
+import type { Linter } from 'eslint';
+import type { ConfigNames } from './typegen';
interface Options {
typescript?: boolean,
diff --git a/packages-config/prettier-config/config.d.ts b/packages-config/prettier-config/config.d.ts
index 2b8842184..ccc1ae765 100644
--- a/packages-config/prettier-config/config.d.ts
+++ b/packages-config/prettier-config/config.d.ts
@@ -1,4 +1,4 @@
-import { Config } from 'prettier'
+import type { Config } from 'prettier'
declare const e: Config
diff --git a/packages/ui/eslint.config.js b/packages/ui/eslint.config.js
index 00330b02c..260f877c8 100644
--- a/packages/ui/eslint.config.js
+++ b/packages/ui/eslint.config.js
@@ -1,3 +1,3 @@
-import antdv from "@ant-design-vue/eslint-config"
+import antdv from '@ant-design-vue/eslint-config'
export default antdv()
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 97b487156..1ea7508a3 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -21,6 +21,7 @@
"build:dev": "vite build --mode development",
"dev": "vite build --watch --mode development",
"lint": "eslint . --fix",
+ "format": "prettier --write .",
"tsc": "tsc --noEmit",
"tsg": "tsc --declaration --declarationMap --emitDeclarationOnly --noEmit false --outDir dist/types",
"test": "vitest"
diff --git a/packages/ui/prettier.config.js b/packages/ui/prettier.config.js
index 9b2395e43..2f3358479 100644
--- a/packages/ui/prettier.config.js
+++ b/packages/ui/prettier.config.js
@@ -1,3 +1,3 @@
// @ts-check
-export { default } from "@ant-design-vue/prettier-config/tailwind";
+export { default } from '@ant-design-vue/prettier-config/tailwind'
diff --git a/packages/ui/src/components/flex/Flex.vue b/packages/ui/src/components/flex/Flex.vue
index 4aeb22e50..fd7ca4637 100644
--- a/packages/ui/src/components/flex/Flex.vue
+++ b/packages/ui/src/components/flex/Flex.vue
@@ -1,40 +1,45 @@
-
+
diff --git a/packages/ui/src/components/flex/__tests__/index.test.ts b/packages/ui/src/components/flex/__tests__/index.test.ts
index 6e1fe3224..21f742e37 100644
--- a/packages/ui/src/components/flex/__tests__/index.test.ts
+++ b/packages/ui/src/components/flex/__tests__/index.test.ts
@@ -8,21 +8,21 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
+ })
- expect(wrapper.html()).toMatchSnapshot();
- });
+ expect(wrapper.html()).toMatchSnapshot()
+ })
it('Flex', () => {
const wrapper = mount(Flex, {
props: {
- justify: 'center'
+ justify: 'center',
},
slots: {
- default: `test
`
+ default: `test
`,
},
- });
-
+ })
+
const wrapper3 = mount(Flex, {
props: {
flex: '0 1 auto',
@@ -30,13 +30,13 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
+ })
- expect(wrapper.classes('ant-flex')).toBeTruthy();
- expect(wrapper.find('.ant-flex-justify-center')).toBeTruthy();
- expect(wrapper3.classes('ant-flex')).toBeTruthy();
- expect(wrapper3.element.style.flex).toBe('0 1 auto');
- });
+ expect(wrapper.classes('ant-flex')).toBeTruthy()
+ expect(wrapper.find('.ant-flex-justify-center')).toBeTruthy()
+ expect(wrapper3.classes('ant-flex')).toBeTruthy()
+ expect(wrapper3.element.style.flex).toBe('0 1 auto')
+ })
describe('Props: gap', () => {
it('support string', () => {
@@ -47,10 +47,10 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
- expect(wrapper.classes('ant-flex')).toBeTruthy();
- expect(wrapper.element.style.gap).toBe('inherit');
- });
+ })
+ expect(wrapper.classes('ant-flex')).toBeTruthy()
+ expect(wrapper.element.style.gap).toBe('inherit')
+ })
it('support number', () => {
const wrapper = mount(Flex, {
@@ -60,10 +60,10 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
- expect(wrapper.classes('ant-flex')).toBeTruthy();
- expect(wrapper.element.style.gap).toBe('100px');
- });
+ })
+ expect(wrapper.classes('ant-flex')).toBeTruthy()
+ expect(wrapper.element.style.gap).toBe('100px')
+ })
it('support preset size', () => {
const wrapper = mount(Flex, {
@@ -73,42 +73,42 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
+ })
- expect(wrapper.classes('ant-flex')).toBeTruthy();
- expect(wrapper.classes('ant-flex-gap-small')).toBeTruthy();
- });
- });
+ expect(wrapper.classes('ant-flex')).toBeTruthy()
+ expect(wrapper.classes('ant-flex-gap-small')).toBeTruthy()
+ })
+ })
it('Component work', () => {
const wrapper = mount(Flex, {
slots: {
- default: `test
`
+ default: `test
`,
},
- });
+ })
const wrapper2 = mount(Flex, {
props: {
- componentTag: 'span'
+ componentTag: 'span',
},
slots: {
- default: `test
`
+ default: `test
`,
},
- });
+ })
- expect(wrapper.find('.ant-flex').element.tagName).toBe('DIV');
- expect(wrapper2.find('.ant-flex').element.tagName).toBe('SPAN');
- });
+ expect(wrapper.find('.ant-flex').element.tagName).toBe('DIV')
+ expect(wrapper2.find('.ant-flex').element.tagName).toBe('SPAN')
+ })
it('when vertical=true should stretch work', () => {
const wrapper = mount(Flex, {
props: {
- vertical: true
+ vertical: true,
},
slots: {
- default: `test
`
+ default: `test
`,
},
- });
+ })
const wrapper2 = mount(Flex, {
props: {
@@ -118,11 +118,11 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
+ })
- expect(wrapper.find('.ant-flex-align-stretch')).toBeTruthy();
- expect(wrapper2.find('.ant-flex-align-center')).toBeTruthy();
- });
+ expect(wrapper.find('.ant-flex-align-stretch')).toBeTruthy()
+ expect(wrapper2.find('.ant-flex-align-center')).toBeTruthy()
+ })
it('wrap prop shouled support boolean', () => {
const wrapper = mount(Flex, {
@@ -132,7 +132,7 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
+ })
const wrapper2 = mount(Flex, {
props: {
@@ -141,9 +141,9 @@ describe('Flex', () => {
slots: {
default: `test
`,
},
- });
+ })
- expect(wrapper.classes('ant-flex-wrap-wrap')).toBeTruthy();
- expect(wrapper2.classes('ant-flex-wrap-wrap')).toBeTruthy();
+ expect(wrapper.classes('ant-flex-wrap-wrap')).toBeTruthy()
+ expect(wrapper2.classes('ant-flex-wrap-wrap')).toBeTruthy()
})
})
diff --git a/packages/ui/src/components/flex/index.ts b/packages/ui/src/components/flex/index.ts
index e0066d0b6..673694c59 100644
--- a/packages/ui/src/components/flex/index.ts
+++ b/packages/ui/src/components/flex/index.ts
@@ -2,7 +2,6 @@ import type { App, Plugin } from 'vue'
import Flex from './Flex.vue'
import './style/index.css'
-
export { default as Flex } from './Flex.vue'
export * from './meta'
diff --git a/packages/ui/src/components/flex/meta.ts b/packages/ui/src/components/flex/meta.ts
index 39fd00d1f..5294040bf 100644
--- a/packages/ui/src/components/flex/meta.ts
+++ b/packages/ui/src/components/flex/meta.ts
@@ -1,4 +1,4 @@
-import type { CSSProperties } from "vue"
+import type { CSSProperties } from 'vue'
type SizeType = 'small' | 'middle' | 'large' | undefined
diff --git a/packages/ui/src/components/flex/utils.ts b/packages/ui/src/components/flex/utils.ts
index d3de11011..8a1b7d83a 100644
--- a/packages/ui/src/components/flex/utils.ts
+++ b/packages/ui/src/components/flex/utils.ts
@@ -36,7 +36,7 @@ const genClsWrap = (prefixCls: string, props: FlexProps) => {
const wrapCls: Record = {}
flexWrapValues.forEach(cssKey => {
// Handle both boolean attribute (wrap="wrap") and string value (wrap="wrap")
- const isMatch = props.wrap === true && cssKey === 'wrap' || props.wrap === cssKey
+ const isMatch = (props.wrap === true && cssKey === 'wrap') || props.wrap === cssKey
wrapCls[`${prefixCls}-wrap-${cssKey}`] = isMatch
})
return wrapCls
diff --git a/packages/ui/src/components/theme/hook.ts b/packages/ui/src/components/theme/hook.ts
index 0ec8e98a8..c41d66818 100644
--- a/packages/ui/src/components/theme/hook.ts
+++ b/packages/ui/src/components/theme/hook.ts
@@ -1,4 +1,4 @@
-import type { InjectionKey} from 'vue';
+import type { InjectionKey } from 'vue'
import { inject, provide } from 'vue'
import type { ThemeProps } from './meta'
diff --git a/packages/ui/src/components/wave/Wave.vue b/packages/ui/src/components/wave/Wave.vue
index 7294d455c..1f4c173ea 100644
--- a/packages/ui/src/components/wave/Wave.vue
+++ b/packages/ui/src/components/wave/Wave.vue
@@ -18,15 +18,7 @@