fix: 修复管理端前端 lint 与构建问题

- 收敛 easyflow-ui-admin 的 lint、格式和类型问题

- 修正 demo 页面与管理端前端构建失败点

- 验证 pnpm lint 与 pnpm build 均已通过
This commit is contained in:
2026-04-05 21:39:13 +08:00
parent bb72e19c84
commit 7e7c236c2a
240 changed files with 5151 additions and 4701 deletions

View File

@@ -7,7 +7,7 @@ import type { AlertProps, BeforeCloseScope, PromptProps } from './alert';
import { h, nextTick, ref, render } from 'vue';
import { useSimpleLocale } from '@easyflow-core/composables';
import { Input, EasyFlowRenderContent } from '@easyflow-core/shadcn-ui';
import { EasyFlowRenderContent, Input } from '@easyflow-core/shadcn-ui';
import { isFunction, isString } from '@easyflow-core/shared/utils';
import Alert from './alert.vue';

View File

@@ -177,7 +177,10 @@ async function handleOpenChange(val: boolean) {
<div class="m-4 min-h-[30px]">
<EasyFlowRenderContent :content="content" render-br />
</div>
<EasyFlowLoading v-if="loading && contentMasking" :spinning="loading" />
<EasyFlowLoading
v-if="loading && contentMasking"
:spinning="loading"
/>
</AlertDialogDescription>
<div
class="flex items-center justify-end gap-x-2"

View File

@@ -18,6 +18,10 @@ import {
} from '@easyflow-core/composables';
import { X } from '@easyflow-core/icons';
import {
EasyFlowButton,
EasyFlowHelpTooltip,
EasyFlowIconButton,
EasyFlowLoading,
Separator,
Sheet,
SheetClose,
@@ -26,10 +30,6 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
EasyFlowButton,
EasyFlowHelpTooltip,
EasyFlowIconButton,
EasyFlowLoading,
VisuallyHidden,
} from '@easyflow-core/shadcn-ui';
import { ELEMENT_ID_MAIN_CONTENT } from '@easyflow-core/shared/constants';
@@ -184,11 +184,16 @@ const getForceMount = computed(() => {
<SheetContent
:append-to="getAppendTo"
:class="
cn('flex w-[520px] flex-col overflow-hidden border border-[hsl(var(--glass-border))/0.18] bg-[hsl(var(--glass-tint))/0.84] shadow-[var(--shadow-float)] supports-[backdrop-filter]:bg-[hsl(var(--glass-tint))/0.62]', drawerClass, {
'!w-full': isMobile || placement === 'bottom' || placement === 'top',
'max-h-[100vh]': placement === 'bottom' || placement === 'top',
hidden: isClosed,
})
cn(
'flex w-[520px] flex-col overflow-hidden border border-[hsl(var(--glass-border))/0.18] bg-[hsl(var(--glass-tint))/0.84] shadow-[var(--shadow-float)] supports-[backdrop-filter]:bg-[hsl(var(--glass-tint))/0.62]',
drawerClass,
{
'!w-full':
isMobile || placement === 'bottom' || placement === 'top',
'max-h-[100vh]': placement === 'bottom' || placement === 'top',
hidden: isClosed,
},
)
"
:modal="modal"
:open="state?.isOpen"
@@ -223,7 +228,7 @@ const getForceMount = computed(() => {
v-if="closable && closeIconPlacement === 'left'"
as-child
:disabled="submitting"
class="data-[state=open]:bg-[hsl(var(--surface-contrast-soft))/0.92] ml-[2px] cursor-pointer rounded-full opacity-84 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none"
class="opacity-84 ml-[2px] cursor-pointer rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-[hsl(var(--surface-contrast-soft))/0.92]"
>
<slot name="close-icon">
<EasyFlowIconButton>
@@ -264,7 +269,7 @@ const getForceMount = computed(() => {
v-if="closable && closeIconPlacement === 'right'"
as-child
:disabled="submitting"
class="data-[state=open]:bg-[hsl(var(--surface-contrast-soft))/0.92] ml-[2px] cursor-pointer rounded-full opacity-84 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none"
class="opacity-84 ml-[2px] cursor-pointer rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-[hsl(var(--surface-contrast-soft))/0.92]"
>
<slot name="close-icon">
<EasyFlowIconButton>

View File

@@ -105,7 +105,11 @@ export function useEasyFlowDrawer<
const Drawer = defineComponent(
(props: DrawerProps, { attrs, slots }) => {
return () =>
h(EasyFlowDrawer, { ...props, ...attrs, drawerApi: extendedApi }, slots);
h(
EasyFlowDrawer,
{ ...props, ...attrs, drawerApi: extendedApi },
slots,
);
},
// eslint-disable-next-line vue/one-component-per-file
{

View File

@@ -23,9 +23,9 @@ export function setDefaultModalProps(props: Partial<ModalProps>) {
Object.assign(DEFAULT_MODAL_PROPS, props);
}
export function useEasyFlowModal<TParentModalProps extends ModalProps = ModalProps>(
options: ModalApiOptions = {},
) {
export function useEasyFlowModal<
TParentModalProps extends ModalProps = ModalProps,
>(options: ModalApiOptions = {}) {
// Modal一般会抽离出来所以如果有传入 connectedComponent则表示为外部调用与内部组件进行连接
// 外部的Modal通过provide/inject传递api