diff --git a/packages/s2-vue/package.json b/packages/s2-vue/package.json
index f1268f178e..a3ceeed591 100644
--- a/packages/s2-vue/package.json
+++ b/packages/s2-vue/package.json
@@ -64,7 +64,6 @@
"@vue/shared": "^3.3.4",
"@vue/tsconfig": "^0.4.0",
"ant-design-vue": "^3.2.20",
- "vite-svg-loader": "^3.6.0",
"vue": "^3.3.4",
"vue-tsc": "^2.1.6"
},
diff --git a/packages/s2-vue/playground/App.vue b/packages/s2-vue/playground/App.vue
index cac67f2291..da7a38a60e 100644
--- a/packages/s2-vue/playground/App.vue
+++ b/packages/s2-vue/playground/App.vue
@@ -521,15 +521,20 @@ const fieldMap = {
const partDrillDown: PartDrillDown = {
drillConfig: {
dataSet: [
+ {
+ name: '客户性别',
+ value: 'sex2',
+ type: 'location',
+ },
{
name: '销售渠道',
value: 'channel',
type: 'text',
},
{
- name: '客户性别',
- value: 'sex',
- type: 'text',
+ name: '客户性别111',
+ value: 'sex1',
+ type: 'date',
},
],
},
diff --git a/packages/s2-vue/src/components/drill-down/index.vue b/packages/s2-vue/src/components/drill-down/index.vue
index dec31507ed..eee32f16a9 100644
--- a/packages/s2-vue/src/components/drill-down/index.vue
+++ b/packages/s2-vue/src/components/drill-down/index.vue
@@ -11,9 +11,9 @@ import type { SelectInfo } from 'ant-design-vue/lib/menu/src/interface';
import { isEmpty } from 'lodash';
import type { Key } from 'ant-design-vue/lib/_util/type';
import type { ChangeEvent } from 'ant-design-vue/lib/_util/EventInterface';
-import LocationIcon from '../../svg/location-icon.svg?component';
-import TextIcon from '../../svg/text-icon.svg?component';
-import CalendarIcon from '../../svg/calendar-icon.svg?component';
+import LocationIcon from '../../icons/location-icon.vue';
+import TextIcon from '../../icons/text-icon.vue';
+import CalendarIcon from '../../icons/calendar-icon.vue';
import {
initDrillDownEmits,
initDrillDownProps,
@@ -136,9 +136,9 @@ export default defineComponent({
:class="`${DRILL_DOWN_PRE_CLASS}-menu-item`"
>
-
-
-
+
+
+
{{ option?.name }}
diff --git a/packages/s2-vue/src/icons/calendar-icon.vue b/packages/s2-vue/src/icons/calendar-icon.vue
new file mode 100644
index 0000000000..ebeeaccc2e
--- /dev/null
+++ b/packages/s2-vue/src/icons/calendar-icon.vue
@@ -0,0 +1,22 @@
+
+
+
+
diff --git a/packages/s2-vue/src/icons/location-icon.vue b/packages/s2-vue/src/icons/location-icon.vue
new file mode 100644
index 0000000000..152d0c6cf0
--- /dev/null
+++ b/packages/s2-vue/src/icons/location-icon.vue
@@ -0,0 +1,22 @@
+
+
+
+
diff --git a/packages/s2-vue/src/icons/text-icon.vue b/packages/s2-vue/src/icons/text-icon.vue
new file mode 100644
index 0000000000..9fabdeb2c3
--- /dev/null
+++ b/packages/s2-vue/src/icons/text-icon.vue
@@ -0,0 +1,22 @@
+
+
+
+
diff --git a/packages/s2-vue/src/svg/calendar-icon.svg b/packages/s2-vue/src/svg/calendar-icon.svg
deleted file mode 100644
index 84ebfceba7..0000000000
--- a/packages/s2-vue/src/svg/calendar-icon.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/packages/s2-vue/src/svg/location-icon.svg b/packages/s2-vue/src/svg/location-icon.svg
deleted file mode 100644
index 49a9c711f8..0000000000
--- a/packages/s2-vue/src/svg/location-icon.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/packages/s2-vue/src/svg/text-icon.svg b/packages/s2-vue/src/svg/text-icon.svg
deleted file mode 100644
index af3a86d533..0000000000
--- a/packages/s2-vue/src/svg/text-icon.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/packages/s2-vue/vite.config.ts b/packages/s2-vue/vite.config.ts
index 96aa0fd4c0..fee8f107a4 100644
--- a/packages/s2-vue/vite.config.ts
+++ b/packages/s2-vue/vite.config.ts
@@ -4,7 +4,6 @@ import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import path from 'path';
import { UserConfig, defineConfig } from 'vite';
-import svgLoader from 'vite-svg-loader';
import { getBaseConfig } from '../../build.config.base.mjs';
const { getViteConfig, isDevMode } = getBaseConfig();
@@ -19,12 +18,6 @@ export default defineConfig({
port: 5050,
name: 's2-vue',
libName: 'S2Vue',
- plugins: [
- vue(),
- svgLoader({
- defaultImport: 'component',
- }),
- vueJsx(),
- ] as UserConfig['plugins'],
+ plugins: [vue(), vueJsx()] as UserConfig['plugins'],
}),
} as UserConfig);
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 53a941f36e..dcba27089e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -495,9 +495,6 @@ importers:
ant-design-vue:
specifier: ^3.2.20
version: 3.2.20(vue@3.4.27(typescript@5.4.5))
- vite-svg-loader:
- specifier: ^3.6.0
- version: 3.6.0
vue:
specifier: ^3.3.4
version: 3.4.27(typescript@5.4.5)
@@ -13247,9 +13244,6 @@ packages:
peerDependencies:
vite: ^2.6.0 || 3 || 4
- vite-svg-loader@3.6.0:
- resolution: {integrity: sha512-bZJffcgCREW57kNkgMhuNqeDznWXyQwJ3wKrRhHLMMzwDnP5jr3vXW3cqsmquRR7VTP5mLdKj1/zzPPooGUuPw==}
-
vite@4.5.2:
resolution: {integrity: sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==}
engines: {node: ^14.18.0 || >=16.0.0}
@@ -30029,11 +30023,6 @@ snapshots:
- rollup
- supports-color
- vite-svg-loader@3.6.0:
- dependencies:
- '@vue/compiler-sfc': 3.4.27
- svgo: 2.8.0
-
vite@4.5.2(@types/node@20.14.2)(less@4.1.3)(lightningcss@1.22.1)(sass@1.77.4)(terser@5.31.1):
dependencies:
esbuild: 0.18.20