diff --git a/scripts/vite-demo-plugin.ts b/scripts/vite-demo-plugin.ts
deleted file mode 100644
index b564494e09..0000000000
--- a/scripts/vite-demo-plugin.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-const fileRegex = /demo\.tsx$/
-
-export default function viteDemoPlugin() {
- return {
- name: 'viteDemoPlugin',
- configureServer(server) {
- server.middlewares.use((req, res, next) => {
- // custom handle request...
- if (req.url.indexOf('demo.scss') > -1) {
- req.redirect(req.url.replace('demo.scss', 'demo.module.scss'))
- }
- next()
- })
- },
- transform(src, id) {
- if (fileRegex.test(id)) {
- return {
- code: src,
- map: null, // 如果可行将提供 source map
- }
- }
- },
- }
-}
diff --git a/src/packages/icon/demo.tsx b/src/packages/icon/demo.tsx
index 62768ff75e..0a75229afb 100644
--- a/src/packages/icon/demo.tsx
+++ b/src/packages/icon/demo.tsx
@@ -1,37 +1,48 @@
import React from 'react'
import { Icon } from './icon'
+import Cell from '../cell'
+import CellGroup from '../cellgroup'
import icons from '@/styles/font/iconfont.json'
+
const IconDemo = () => {
return (
<>
基础用法
-
-
+
+
+
+ |
图片链接
-
+
+
+ |
图标颜色
-
-
-
+
+
+
+
+ |
图标大小
-
-
-
+
+
+
+
+ |
基础图标
-
+
{icons.glyphs.map((item) => {
return (
- -
+
{item.name}
- |
+
)
})}
-
+
>
)
diff --git a/vite.config.build.es.ts b/vite.config.build.es.ts
deleted file mode 100644
index 435b301e0b..0000000000
--- a/vite.config.build.es.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { defineConfig } from 'vite'
-import path from 'path'
-import config from './package.json'
-import configPkg from './src/config.json'
-import reactRefresh from '@vitejs/plugin-react-refresh'
-
-const banner = `/*!
-* ${config.name} v${config.version} ${new Date()}
-* (c) 2021 @jdf2e.
-* Released under the MIT License.
-*/`
-let input: any = {}
-configPkg.nav.map((item) => {
- item.packages.forEach((element) => {
- let { name, show, type, exportEmpty } = element as any
- if (show || exportEmpty) {
- input[name] = `./src/packages/${name.toLowerCase()}/index.ts`
- }
- })
-})
-const resolve = path.resolve
-// https://vitejs.dev/config/
-export default defineConfig({
- resolve: {
- alias: [{ find: '@', replacement: resolve(__dirname, './src') }],
- },
- plugins: [reactRefresh()],
- build: {
- emptyOutDir: false,
- rollupOptions: {
- input,
- // 请确保外部化那些你的库中不需要的依赖
- external: ['react', 'react-dom'],
- output: {
- banner,
- dir: path.resolve(__dirname, './dist/packages/_es'),
- entryFileNames: '[name].js',
- },
- },
- lib: {
- entry: '',
- name: 'index',
- formats: ['es'],
- },
- },
-})