Commit aeb49c912e4efb738c1073844de570720c95f16c
1 parent
a978c13d
chore: 恢复合并到main_dev丢失的代码(公共接口管理部分代码)
Showing
2 changed files
with
6 additions
and
2 deletions
... | ... | @@ -112,13 +112,15 @@ |
112 | 112 | |
113 | 113 | // 减少 |
114 | 114 | const remove = (item, index: number) => { |
115 | - if (tableArray.content.length !== 1) { | |
115 | + if (tableArray.content.length > 1) { | |
116 | 116 | selectOptions.value.forEach((ele) => { |
117 | 117 | if (ele.value == item.key) { |
118 | 118 | ele.disabled = false; |
119 | 119 | } |
120 | 120 | }); |
121 | 121 | tableArray.content.splice(index, 1); |
122 | + } else { | |
123 | + resetValue(); | |
122 | 124 | } |
123 | 125 | }; |
124 | 126 | ... | ... |
... | ... | @@ -112,13 +112,15 @@ |
112 | 112 | |
113 | 113 | // 减少 |
114 | 114 | const remove = (item, index: number) => { |
115 | - if (tableArray.content.length !== 1) { | |
115 | + if (tableArray.content.length > 1) { | |
116 | 116 | selectOptions.value.forEach((ele) => { |
117 | 117 | if (ele.value == item.key) { |
118 | 118 | ele.disabled = false; |
119 | 119 | } |
120 | 120 | }); |
121 | 121 | tableArray.content.splice(index, 1); |
122 | + } else { | |
123 | + resetValue(); | |
122 | 124 | } |
123 | 125 | }; |
124 | 126 | ... | ... |