diff --git a/apps/web-antd/src/components/description/description.vue b/apps/web-antd/src/components/description/description.vue deleted file mode 100644 index ec5e220e..00000000 --- a/apps/web-antd/src/components/description/description.vue +++ /dev/null @@ -1,77 +0,0 @@ - - diff --git a/apps/web-antd/src/components/description/index.ts b/apps/web-antd/src/components/description/index.ts deleted file mode 100644 index 745e7550..00000000 --- a/apps/web-antd/src/components/description/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as Description } from './description.vue'; -export type * from './types'; diff --git a/apps/web-antd/src/components/description/types.d.ts b/apps/web-antd/src/components/description/types.d.ts deleted file mode 100644 index c5120b8e..00000000 --- a/apps/web-antd/src/components/description/types.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { CollapseContainerOptions } from '@/components/Container'; -import type { DescriptionsProps } from 'ant-design-vue/es/descriptions'; - -import type { CSSProperties, VNode } from 'vue'; - -export interface DescItem { - labelMinWidth?: number; - contentMinWidth?: number; - labelStyle?: CSSProperties; - field: string; - label: JSX.Element | string | VNode; - // Merge column - span?: number; - show?: (...arg: any) => boolean; - // render - render?: ( - val: any, - data: Recordable, - ) => Element | JSX.Element | number | string | undefined | VNode; - component: string; - componentProps?: any; - children?: DescItem[]; -} - -export interface DescriptionProps extends DescriptionsProps { - // Whether to include the collapse component - useCollapse?: boolean; - /** - * item configuration - * @type DescItem - */ - schema: DescItem[]; - /** - * 数据 - * @type object - */ - data: Recordable; - /** - * Built-in CollapseContainer component configuration - * @type CollapseContainerOptions - */ - collapseOptions?: CollapseContainerOptions; -} - -export interface DescInstance { - setDescProps(descProps: Partial): void; -} - -export type Register = (descInstance: DescInstance) => void; - -/** - * @description: - */ -export type UseDescReturnType = [Register, DescInstance]; diff --git a/apps/web-antd/src/components/form/component-map.ts b/apps/web-antd/src/components/form/component-map.ts deleted file mode 100644 index ecaf9cd3..00000000 --- a/apps/web-antd/src/components/form/component-map.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { CustomComponentType } from './types'; - -import type { Component } from 'vue'; - -import { capitalizeFirstLetter, kebabToCamelCase } from '@vben/utils'; - -const componentMap = new Map(); -// import.meta.glob() 直接引入所有的模块 Vite 独有的功能 -const modules = import.meta.glob('./components/**/*.vue', { eager: true }); -// 加入到路由集合中 -Object.keys(modules).forEach((key) => { - if (!key.includes('-ignore')) { - const mod = (modules as any)[key].default || {}; - // ./components/ApiDict.vue - // 获取ApiDict - const compName = key.replace('./components/', '').replace('.vue', ''); - componentMap.set(capitalizeFirstLetter(kebabToCamelCase(compName)), mod); - } -}); - -export function add(compName: string, component: Component) { - componentMap.set(compName, component); -} - -export function del(compName: string) { - componentMap.delete(compName); -} -/** - * 注册组件 - * @param components - */ -export const registerComponent = (components: any) => { - componentMap.forEach((value, key) => { - components[key] = value as Component; - }); -}; -export { componentMap }; diff --git a/apps/web-antd/src/components/form/components/api-checkbox-group.vue b/apps/web-antd/src/components/form/components/api-checkbox-group.vue deleted file mode 100644 index 41e53679..00000000 --- a/apps/web-antd/src/components/form/components/api-checkbox-group.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/form/components/api-dict.vue b/apps/web-antd/src/components/form/components/api-dict.vue deleted file mode 100644 index 109760ac..00000000 --- a/apps/web-antd/src/components/form/components/api-dict.vue +++ /dev/null @@ -1,54 +0,0 @@ - - diff --git a/apps/web-antd/src/components/form/components/api-radio-group.vue b/apps/web-antd/src/components/form/components/api-radio-group.vue deleted file mode 100644 index da2ace23..00000000 --- a/apps/web-antd/src/components/form/components/api-radio-group.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/form/components/api-select.vue b/apps/web-antd/src/components/form/components/api-select.vue deleted file mode 100644 index ee02d1b7..00000000 --- a/apps/web-antd/src/components/form/components/api-select.vue +++ /dev/null @@ -1,163 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/form/components/api-tree-select.vue b/apps/web-antd/src/components/form/components/api-tree-select.vue deleted file mode 100644 index 776ce772..00000000 --- a/apps/web-antd/src/components/form/components/api-tree-select.vue +++ /dev/null @@ -1,140 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/form/index.ts b/apps/web-antd/src/components/form/index.ts deleted file mode 100644 index 750820af..00000000 --- a/apps/web-antd/src/components/form/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as ApiCheckboxGroup } from './components/api-checkbox-group.vue'; -export { default as ApiDict } from './components/api-dict.vue'; -export { default as ApiRadioGroup } from './components/api-radio-group.vue'; -export { default as ApiSelect } from './components/api-select.vue'; -export { default as ApiTreeSelect } from './components/api-tree-select.vue'; diff --git a/apps/web-antd/src/components/form/types/index.d.ts b/apps/web-antd/src/components/form/types/index.d.ts deleted file mode 100644 index e60e17e0..00000000 --- a/apps/web-antd/src/components/form/types/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type CustomComponentType = - | 'ApiCheckboxGroup' - | 'ApiDict' - | 'ApiRadioGroup' - | 'ApiSelect' - | 'ApiTreeSelect'; diff --git a/apps/web-antd/src/components/view/component-map.ts b/apps/web-antd/src/components/view/component-map.ts deleted file mode 100644 index f0a1b2a8..00000000 --- a/apps/web-antd/src/components/view/component-map.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Component } from 'vue'; - -import { toPascalCase } from '#/util/tool'; - -const componentMap = new Map(); -// import.meta.glob() 直接引入所有的模块 Vite 独有的功能 -const modules = import.meta.glob('./components/**/*.vue', { eager: true }); -// 加入到路由集合中 -Object.keys(modules).forEach((key) => { - if (!key.includes('-ignore')) { - const mod = (modules as any)[key].default || {}; - // ./components/ApiDict.vue - // 获取ApiDict - const compName = key.replace('./components/', '').replace('.vue', ''); - componentMap.set(toPascalCase(compName), mod); - } -}); - -export function add(compName: string, component: Component) { - componentMap.set(compName, component); -} - -export function del(compName: string) { - componentMap.delete(compName); -} - -export { componentMap }; diff --git a/apps/web-antd/src/components/view/components/api-checkbox-group.vue b/apps/web-antd/src/components/view/components/api-checkbox-group.vue deleted file mode 100644 index dbca93f9..00000000 --- a/apps/web-antd/src/components/view/components/api-checkbox-group.vue +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/apps/web-antd/src/components/view/components/api-dict.vue b/apps/web-antd/src/components/view/components/api-dict.vue deleted file mode 100644 index d4ec0df6..00000000 --- a/apps/web-antd/src/components/view/components/api-dict.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/view/components/api-radio-group.vue b/apps/web-antd/src/components/view/components/api-radio-group.vue deleted file mode 100644 index dbca93f9..00000000 --- a/apps/web-antd/src/components/view/components/api-radio-group.vue +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/apps/web-antd/src/components/view/components/api-select.vue b/apps/web-antd/src/components/view/components/api-select.vue deleted file mode 100644 index de417747..00000000 --- a/apps/web-antd/src/components/view/components/api-select.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/view/components/api-tree-select.vue b/apps/web-antd/src/components/view/components/api-tree-select.vue deleted file mode 100644 index c581a06e..00000000 --- a/apps/web-antd/src/components/view/components/api-tree-select.vue +++ /dev/null @@ -1,95 +0,0 @@ - - -