@@ -149,7 +149,7 @@ const handleSelectionChange = (val: any[]) => {
149149 const arr = fieldList .value .filter (selectable )
150150 const ids = arr .map ((ele : any ) => ele .id )
151151 multipleSelectionAll .value = [
152- ... multipleSelectionAll .value .filter ((ele ) => ! ids .includes (ele .id )),
152+ ... multipleSelectionAll .value .filter ((ele : any ) => ! ids .includes (ele .id )),
153153 ... val ,
154154 ]
155155 isIndeterminate .value = ! (val .length === 0 || val .length === arr .length )
@@ -222,7 +222,7 @@ const rules = {
222222const saveHandler = () => {
223223 termFormRef .value .validate ((res : any ) => {
224224 if (res ) {
225- const arr = [... pageForm .value .other_words .filter ((ele ) => !! ele ), pageForm .value .word ]
225+ const arr = [... pageForm .value .other_words .filter ((ele : any ) => !! ele ), pageForm .value .word ]
226226 if (arr .length !== new Set (arr ).size ) {
227227 return ElMessage .error (t (' professional.cannot_be_repeated' ))
228228 }
@@ -252,6 +252,9 @@ const editHandler = (row: any) => {
252252 pageForm .value .id = null
253253 if (row ) {
254254 pageForm .value = cloneDeep (row )
255+ if (! pageForm .value .other_words .length ) {
256+ pageForm .value .other_words = [' ' ]
257+ }
255258 }
256259 dialogTitle .value = row ?.id
257260 ? t (' professional.editing_terminology' )
@@ -336,23 +339,7 @@ const deleteHandlerItem = (idx: number) => {
336339 class =" table-content"
337340 :class =" multipleSelectionAll?.length && 'show-pagination_height'"
338341 >
339- <template v-if =" ! oldKeywords && ! fieldList .length " >
340- <EmptyBackground
341- class =" datasource-yet"
342- :description =" $t('professional.no_term')"
343- img-type =" noneWhite"
344- />
345-
346- <div style =" text-align : center ; margin-top : -10px " >
347- <el-button type =" primary" @click =" editHandler(null)" >
348- <template #icon >
349- <icon _add_outlined ></icon _add_outlined >
350- </template >
351- {{ $t('professional.create_new_term') }}
352- </el-button >
353- </div >
354- </template >
355- <div v-else class =" preview-or-schema" >
342+ <div class =" preview-or-schema" >
356343 <el-table
357344 ref =" multipleTableRef"
358345 :data =" fieldList"
0 commit comments