Commit ff9477d7 by wusiyi

fix: 修复placeholder不展示bug

parent 027ce30b
...@@ -214,7 +214,7 @@ const editId = ref<number>() ...@@ -214,7 +214,7 @@ const editId = ref<number>()
const createConditionItem = (): SortingPortCondition => ({ const createConditionItem = (): SortingPortCondition => ({
conditionType: '', conditionType: '',
operator: '', operator: '',
conditionValue: undefined, conditionValue: [],
}) })
const createDefaultForm = (): IsortingInfo => ({ const createDefaultForm = (): IsortingInfo => ({
...@@ -238,7 +238,7 @@ const getAvailableConditionTypes = (currentIndex: number) => { ...@@ -238,7 +238,7 @@ const getAvailableConditionTypes = (currentIndex: number) => {
} }
const handleConditionTypeChange = (item: SortingPortCondition) => { const handleConditionTypeChange = (item: SortingPortCondition) => {
item.conditionValue = undefined item.conditionValue = []
item.operator = 'in' item.operator = 'in'
} }
...@@ -280,7 +280,9 @@ const formatConditionsForForm = (conditions: SortingPortCondition[]) => ...@@ -280,7 +280,9 @@ const formatConditionsForForm = (conditions: SortingPortCondition[]) =>
conditionValue: conditionValue:
typeof item.conditionValue === 'string' typeof item.conditionValue === 'string'
? item.conditionValue.split(',').filter(Boolean) ? item.conditionValue.split(',').filter(Boolean)
: item.conditionValue, : Array.isArray(item.conditionValue)
? item.conditionValue
: [],
})) }))
const addConditionItem = () => { const addConditionItem = () => {
...@@ -415,7 +417,6 @@ defineExpose({ open }) ...@@ -415,7 +417,6 @@ defineExpose({ open })
:deep(.el-select__selection) { :deep(.el-select__selection) {
flex-wrap: nowrap; flex-wrap: nowrap;
overflow: hidden;
} }
:deep(.el-select__selected-item) { :deep(.el-select__selected-item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment