fix: bug#10675、10674、10663

This commit is contained in:
JiangQiming 2023-03-21 18:33:55 +08:00
parent 8583d968c3
commit 352c4d263b
2 changed files with 3 additions and 2 deletions

View File

@ -146,7 +146,7 @@ const form = reactive({
});
},
checkSort: (e: any) => {
const value = e.target.value.match(/^[0-9]*/)[0];
const value = e.target.value.match(/^[1-9]*/)[0];
if (value) {
form.data.sortIndex = value;
form.beforeSortIndex = value;

View File

@ -5,6 +5,7 @@
@change="search"
placeholder="请输入组织名称"
class="search-input"
allowClear
>
<template #suffix>
<AIcon type="SearchOutlined" />
@ -201,7 +202,7 @@ const openDialog = (row: any = {}) => {
childrens = row.children;
} else childrens = treeData.value;
const indexs =
childrens.length > 0
childrens?.length > 0
? childrens?.map((item) => item.sortIndex)
: [0];
sortIndex = Math.max(...indexs) + 1;