fix: 修复管理端前端 lint 与构建问题
- 收敛 easyflow-ui-admin 的 lint、格式和类型问题 - 修正 demo 页面与管理端前端构建失败点 - 验证 pnpm lint 与 pnpm build 均已通过
This commit is contained in:
@@ -3,7 +3,11 @@ import { computed, toRaw, unref, watch } from 'vue';
|
||||
|
||||
import { useSimpleLocale } from '@easyflow-core/composables';
|
||||
import { EasyFlowExpandableArrow } from '@easyflow-core/shadcn-ui';
|
||||
import { cn, isFunction, triggerWindowResize } from '@easyflow-core/shared/utils';
|
||||
import {
|
||||
cn,
|
||||
isFunction,
|
||||
triggerWindowResize,
|
||||
} from '@easyflow-core/shared/utils';
|
||||
|
||||
import { COMPONENT_MAP } from '../config';
|
||||
import { injectFormProps } from '../use-form-context';
|
||||
|
||||
@@ -2,8 +2,8 @@ import type { Component } from 'vue';
|
||||
|
||||
import type {
|
||||
BaseFormComponentType,
|
||||
FormCommonConfig,
|
||||
EasyFlowFormAdapterOptions,
|
||||
FormCommonConfig,
|
||||
} from './types';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { Recordable } from '@easyflow-core/typings';
|
||||
|
||||
import type { ExtendedFormApi, EasyFlowFormProps } from './types';
|
||||
import type { EasyFlowFormProps, ExtendedFormApi } from './types';
|
||||
|
||||
// import { toRaw, watch } from 'vue';
|
||||
import { nextTick, onMounted, watch } from 'vue';
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { ComponentPublicInstance } from 'vue';
|
||||
|
||||
import type { Recordable } from '@easyflow-core/typings';
|
||||
|
||||
import type { FormActions, FormSchema, EasyFlowFormProps } from './types';
|
||||
import type { EasyFlowFormProps, FormActions, FormSchema } from './types';
|
||||
|
||||
import { isRef, toRaw } from 'vue';
|
||||
|
||||
@@ -55,7 +55,7 @@ export class FormApi {
|
||||
public form = {} as FormActions;
|
||||
isMounted = false;
|
||||
|
||||
public state: null | EasyFlowFormProps = null;
|
||||
public state: EasyFlowFormProps | null = null;
|
||||
stateHandler: StateHandler;
|
||||
|
||||
public store: Store<EasyFlowFormProps>;
|
||||
@@ -68,7 +68,7 @@ export class FormApi {
|
||||
// 最后一次点击提交时的表单值
|
||||
private latestSubmissionValues: null | Recordable<any> = null;
|
||||
|
||||
private prevState: null | EasyFlowFormProps = null;
|
||||
private prevState: EasyFlowFormProps | null = null;
|
||||
|
||||
constructor(options: EasyFlowFormProps = {}) {
|
||||
const { ...storeState } = options;
|
||||
|
||||
@@ -15,7 +15,12 @@ import {
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@easyflow-core/shadcn-ui';
|
||||
import { cn, isFunction, isObject, isString } from '@easyflow-core/shared/utils';
|
||||
import {
|
||||
cn,
|
||||
isFunction,
|
||||
isObject,
|
||||
isString,
|
||||
} from '@easyflow-core/shared/utils';
|
||||
|
||||
import { toTypedSchema } from '@vee-validate/zod';
|
||||
import { useFieldError, useFormValues } from 'vee-validate';
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
import type { CustomRenderType } from '../types';
|
||||
|
||||
import {
|
||||
FormLabel,
|
||||
EasyFlowHelpTooltip,
|
||||
EasyFlowRenderContent,
|
||||
FormLabel,
|
||||
} from '@easyflow-core/shadcn-ui';
|
||||
import { cn } from '@easyflow-core/shared/utils';
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ export { setupEasyFlowForm } from './config';
|
||||
|
||||
export type {
|
||||
BaseFormComponentType,
|
||||
ExtendedFormApi,
|
||||
EasyFlowFormProps,
|
||||
FormSchema as EasyFlowFormSchema,
|
||||
ExtendedFormApi,
|
||||
} from './types';
|
||||
|
||||
export * from './use-easyflow-form';
|
||||
|
||||
@@ -12,12 +12,12 @@ export type FormLayout = 'horizontal' | 'inline' | 'vertical';
|
||||
|
||||
export type BaseFormComponentType =
|
||||
| 'DefaultButton'
|
||||
| 'PrimaryButton'
|
||||
| 'EasyFlowCheckbox'
|
||||
| 'EasyFlowInput'
|
||||
| 'EasyFlowInputPassword'
|
||||
| 'EasyFlowPinInput'
|
||||
| 'EasyFlowSelect'
|
||||
| 'PrimaryButton'
|
||||
| (Record<never, never> & string);
|
||||
|
||||
type Breakpoints = '2xl:' | '3xl:' | '' | 'lg:' | 'md:' | 'sm:' | 'xl:';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import type {
|
||||
BaseFormComponentType,
|
||||
ExtendedFormApi,
|
||||
EasyFlowFormProps,
|
||||
ExtendedFormApi,
|
||||
} from './types';
|
||||
|
||||
import { defineComponent, h, isReactive, onBeforeUnmount, watch } from 'vue';
|
||||
|
||||
import { useStore } from '@easyflow-core/shared/store';
|
||||
|
||||
import { FormApi } from './form-api';
|
||||
import EasyFlowUseForm from './easyflow-use-form.vue';
|
||||
import { FormApi } from './form-api';
|
||||
|
||||
export function useEasyFlowForm<
|
||||
T extends BaseFormComponentType = BaseFormComponentType,
|
||||
|
||||
@@ -2,12 +2,16 @@ import type { ZodRawShape } from 'zod';
|
||||
|
||||
import type { ComputedRef } from 'vue';
|
||||
|
||||
import type { ExtendedFormApi, FormActions, EasyFlowFormProps } from './types';
|
||||
import type { EasyFlowFormProps, ExtendedFormApi, FormActions } from './types';
|
||||
|
||||
import { computed, unref, useSlots } from 'vue';
|
||||
|
||||
import { createContext } from '@easyflow-core/shadcn-ui';
|
||||
import { isString, mergeWithArrayOverride, set } from '@easyflow-core/shared/utils';
|
||||
import {
|
||||
isString,
|
||||
mergeWithArrayOverride,
|
||||
set,
|
||||
} from '@easyflow-core/shared/utils';
|
||||
|
||||
import { useForm } from 'vee-validate';
|
||||
import { object, ZodIntersection, ZodNumber, ZodObject, ZodString } from 'zod';
|
||||
|
||||
Reference in New Issue
Block a user