diff --git a/apps/web-antd/src/components/action-buttons/action-buttons.vue b/apps/web-antd/src/components/action-buttons/action-buttons.vue new file mode 100644 index 00000000..e9063692 --- /dev/null +++ b/apps/web-antd/src/components/action-buttons/action-buttons.vue @@ -0,0 +1,74 @@ + + + diff --git a/apps/web-antd/src/components/action-buttons/action-icon.ts b/apps/web-antd/src/components/action-buttons/action-icon.ts new file mode 100644 index 00000000..faf6bd9f --- /dev/null +++ b/apps/web-antd/src/components/action-buttons/action-icon.ts @@ -0,0 +1,20 @@ +export enum IconEnum { + ADD = 'ant-design:plus-outlined', + ADD_FOLD = 'ant-design:folder-add-outlined', + AUTH = 'ant-design:safety-certificate-outlined', + DELETE = 'ant-design:delete-outlined', + DOWNLOAD = 'ant-design:cloud-download-outlined', + EDIT = 'clarity:note-edit-line', + EXPORT = 'ant-design:vertical-align-bottom-outlined', + IMPORT = 'ant-design:vertical-align-top-outlined', + LOG = 'ant-design:exception-outlined', + PASSWORD = 'ant-design:key-outlined', + PREVIEW = 'ant-design:eye-outlined', + RESET = 'ant-design:sync-outlined', + SEARCH = 'ant-design:search-outlined', + SEND = 'ant-design:send-outlined', + SETTING = 'ant-design:setting-outlined', + TEST = 'ant-design:deployment-unit-outlined', + UPLOAD = 'ant-design:cloud-upload-outlined', + VIEW = 'ant-design:file-search-outlined', +} diff --git a/apps/web-antd/src/components/action-buttons/index.ts b/apps/web-antd/src/components/action-buttons/index.ts new file mode 100644 index 00000000..1e577ce1 --- /dev/null +++ b/apps/web-antd/src/components/action-buttons/index.ts @@ -0,0 +1,3 @@ +export { default as ActionButtons } from './action-buttons.vue'; +export * from './action-icon'; +export type * from './types'; diff --git a/apps/web-antd/src/components/action-buttons/types.d.ts b/apps/web-antd/src/components/action-buttons/types.d.ts new file mode 100644 index 00000000..ad901758 --- /dev/null +++ b/apps/web-antd/src/components/action-buttons/types.d.ts @@ -0,0 +1,11 @@ +import type { ButtonProps, TooltipProps } from 'ant-design-vue'; + +export interface ActionItem extends ButtonProps { + color?: 'error' | 'success' | 'warning'; + preIcon?: string; + postIcon?: string; + label: string; + auth?: string | string[]; + tooltip?: string | TooltipProps; + ifShow?: ((...args: any[]) => boolean) | boolean; +}