2022-12-10 11:55:33 +08:00

19 lines
1019 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 节点无法拖拽到 Page 下
sidebar_position: 22
tags: [FAQ]
---
查看 Page 节点的 childWhitelist 配置,如果 Page 配置了 childWhitelist且当前节点不在白名单下是无法拖拽的。
```typescript
AliLowCodeEngine.material.getComponentMeta('Page').getMetadata().configure.component.nestingRule.childWhitelist
```
比如在 [demo](https://lowcode-engine.cn/demo/demo-general/index.html) 中 Page 组件的 childWhitelist 为:['NextPage', 'ProDialog', 'Dialog', 'Drawer'],则只有这些组件可以拖拽到 Page 的 children 下,其他组件均不可以。
说明1.0.15 之前 Page 组件的 childWhitelist 限制是失效的,在 1.0.16 版本进行了 bug 修复。
### 解决办法
**方法 1直接修改 Page 组件的 childWhitelist比如删除**。
**方法 2通过 **[**material.registerMetadataTransducer**](/site/docs/api/material#registermetadatatransducer)** 修改 Page 组件的 childWhitelist适用于 Page 组件是其他人维护的)**