Merge "amis-saas-5196:层级限制并提示" into feat-optimize-4

This commit is contained in:
liuguihua 2022-07-12 12:26:41 +08:00 committed by iCode
commit c24217c6b9
2 changed files with 5 additions and 1 deletions

View File

@ -245,7 +245,7 @@ export class NestedSelectControlPlugin extends BasePlugin {
},
{
type: 'container',
className: 'ae-ExtendMore',
className: 'ae-ExtendMore mb-3',
visibleOn: 'this.multiple',
body: [
{

View File

@ -263,6 +263,10 @@ export default class TreeOptionControl extends React.Component<
}
@autobind
addChildOption(pathStr: string) {
if (pathStr.split('-').length >= 7) {
toast.warning('层级过深,建议使用【接口获取】管理选项', {closeButton: true});
return;
}
const options = cloneDeep(this.state.options);
const {path} = this.getNodePath(pathStr);
const node = get(options, path) || [];