diff --git a/src/components/common/filter-form/index.vue b/src/components/common/filter-form/index.vue index cb2e5d52..357d3e08 100644 --- a/src/components/common/filter-form/index.vue +++ b/src/components/common/filter-form/index.vue @@ -100,7 +100,7 @@ onBeforeMount(() => { // 获取到默认值 const old_defalut = new_dataInterface.value[item.form_name]; // 默认值不为空的时候,进行处理查看当前数据是否存在默认值数据 - if (old_defalut != '' && old_defalut != undefined && ['select', 'radio', 'checkout'].includes(item.type)) { + if (old_defalut !== '' && old_defalut !== undefined && ['select', 'radio', 'checkout'].includes(item.type)) { if (item.type == 'select' && +item?.config?.is_level == 1) { // 如果是级联的效果 const result = contains_value(options_list, item, [], item?.config?.children || ''); new_dataInterface.value[item.form_name] = result; diff --git a/src/components/model-custom/components/custom-dialog/index.vue b/src/components/model-custom/components/custom-dialog/index.vue index 9de4750c..29ff7763 100644 --- a/src/components/model-custom/components/custom-dialog/index.vue +++ b/src/components/model-custom/components/custom-dialog/index.vue @@ -121,7 +121,7 @@ watchEffect(() => { const staging_data : any = {}; pagination_data.value = { page: 1, - page_size: props?.config?.page_size || '', + page_size: props?.config?.page_size || undefined, data_total: 0, } const filter_form_config = props?.config?.filter_form_config || []; @@ -131,11 +131,11 @@ watchEffect(() => { filter_form_config.forEach((item: any) => { let value : number | string | Array = ''; if (item.type == 'checkbox' || item.type == 'select' && +item?.config?.is_multiple == 1) { // 多选 - value = item?.config?.default || []; + value = item?.config?.default ?? []; } else if ((item.type == 'input' && item?.config?.type == 'number') || item.type == 'switch') { // 数字/开关 - value = Number(item?.config?.default || 0); + value = Number(item?.config?.default ?? 0); } else { // 其他 - value = item?.config?.default || ''; + value = item?.config?.default ?? ''; } staging_data[item.form_name] = value; }) diff --git a/src/components/model-custom/model-custom-content.vue b/src/components/model-custom/model-custom-content.vue index 661ae7ef..76f762fa 100644 --- a/src/components/model-custom/model-custom-content.vue +++ b/src/components/model-custom/model-custom-content.vue @@ -325,11 +325,11 @@ const changeDataSource = (key: string) => { default_type_data.value?.filter_config?.filter_form_config.forEach((item: any) => { let value : number | string | Array = ''; if (item.type == 'checkbox' || (item.type == 'select' && +item?.config?.is_multiple == 1)) { // 多选 - value = item?.config?.default || []; + value = item?.config?.default ?? []; } else if ((item.type == 'input' && item?.config?.type == 'number') || item.type == 'switch') { // 数字/开关 - value = Number(item?.config?.default || 0); + value = Number(item?.config?.default ?? 0); } else { - value = item?.config?.default || ''; + value = item?.config?.default ?? ''; } staging_data[item.form_name] = value; })