From 9a5590f5d10e9a70b14443aa36116b3415e65181 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Mon, 19 Aug 2024 18:36:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Form/src/components/ApiSelect.vue | 2 +- .../Form/src/components/FormItem.vue | 7 ++-- src/hooks/component/useFormItem.ts | 11 ++++-- .../seaexport/detail/components/journal.vue | 1 + .../detail/components/storageSpace.vue | 2 +- .../seaexport/detail/modules/baseInfo.tsx | 12 +++--- .../seaexport/detail/modules/basicInfo.vue | 5 +-- .../seaexport/detail/modules/cargoInfo.vue | 1 - .../seaexport/detail/modules/rightContent.vue | 37 ++++++++++--------- src/views/system/print/api.ts | 17 +++++++-- src/views/system/print/columns.tsx | 12 +++++- .../system/print/components/temModal.vue | 26 +++++++++++-- 12 files changed, 89 insertions(+), 44 deletions(-) diff --git a/src/components/Form/src/components/ApiSelect.vue b/src/components/Form/src/components/ApiSelect.vue index 41778124..f44f3813 100644 --- a/src/components/Form/src/components/ApiSelect.vue +++ b/src/components/Form/src/components/ApiSelect.vue @@ -187,7 +187,7 @@ } function handleChange(_, ...args) { - // emit('change', _, ...args) + emit('change', _, ...args) emitData.value = args } const getPopupContainer = triggerNode => { diff --git a/src/components/Form/src/components/FormItem.vue b/src/components/Form/src/components/FormItem.vue index 6404729e..359d9dfe 100644 --- a/src/components/Form/src/components/FormItem.vue +++ b/src/components/Form/src/components/FormItem.vue @@ -151,7 +151,8 @@ ? rulesMessageJoinLabel : globalRulesMessageJoinLabel const defaultMsg = createPlaceholderMessage(component) + `${joinLabel ? label : ''}` - async function validator(rule: any, value: any) { + + function validator(rule: any, value: any) { const msg = rule.message || defaultMsg if (value === undefined || isNull(value)) { // 空值 @@ -186,12 +187,12 @@ */ if (getRequired) { if (!rules || rules.length === 0) { - // rules = [{ required: getRequired, validator }] + rules = [{ required: getRequired, validator }] } else { const requiredIndex: number = rules.findIndex((rule) => Reflect.has(rule, 'required')) if (requiredIndex === -1) { - // rules.push({ required: getRequired, validator }) + rules.push({ required: getRequired, validator }) } } } diff --git a/src/hooks/component/useFormItem.ts b/src/hooks/component/useFormItem.ts index 43f55240..903fa3e1 100644 --- a/src/hooks/component/useFormItem.ts +++ b/src/hooks/component/useFormItem.ts @@ -1,3 +1,8 @@ +/* + * @Desc: + * @Author: lijj + * @Date: 2024-05-13 09:06:51 + */ import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue' import { reactive, @@ -50,9 +55,9 @@ export function useRuleFormItem( if (isEqual(value, defaultState.value)) return innerState.value = value as T[keyof T] - nextTick(() => { - emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || [])) - }) + // nextTick(() => { + // emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || [])) + // }) }, }) diff --git a/src/views/operation/seaexport/detail/components/journal.vue b/src/views/operation/seaexport/detail/components/journal.vue index 2ab7a157..d12058e8 100644 --- a/src/views/operation/seaexport/detail/components/journal.vue +++ b/src/views/operation/seaexport/detail/components/journal.vue @@ -5,6 +5,7 @@ -->