提交 4efd272b 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!491 UI fix multiSelect component limit value does not effect

Merge pull request !491 from 夏易凡/0729master
...@@ -164,25 +164,26 @@ export default { ...@@ -164,25 +164,26 @@ export default {
listSelectAll() { listSelectAll() {
this.operateSelectAll = !this.operateSelectAll; this.operateSelectAll = !this.operateSelectAll;
this.multiSelectedItemNames = {}; this.multiSelectedItemNames = {};
this.selectedNumber = 0;
// Setting the status of list items // Setting the status of list items
if (this.operateSelectAll) { if (this.operateSelectAll) {
if (this.isLimit) { if (this.isLimit) {
const loopCount = this.checkListArr.length; const loopCount = this.checkListArr.length;
for (let i = 0; i < loopCount; i++) { for (let i = 0; i < loopCount; i++) {
if (this.selectedNumber >= this.limitNum) {
break;
}
const listItem = this.checkListArr[i]; const listItem = this.checkListArr[i];
if (listItem.checked) { if (this.selectedNumber >= this.limitNum) {
this.selectedNumber++; if (listItem.checked && listItem.show) {
if (listItem.show) {
this.multiSelectedItemNames[listItem.label] = true; this.multiSelectedItemNames[listItem.label] = true;
} }
} else if (listItem.show) { } else {
listItem.checked = true; if (listItem.checked) {
this.multiSelectedItemNames[listItem.label] = true; if (listItem.show) {
this.selectedNumber++; this.multiSelectedItemNames[listItem.label] = true;
}
} else if (listItem.show) {
listItem.checked = true;
this.multiSelectedItemNames[listItem.label] = true;
this.selectedNumber++;
}
} }
} }
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册