Skip to content

JSSlot 会渲染一个额外的容器 lc-container,影响设计时的布局 #993

Closed

Description

@haoziqaq

我把官方最新的的ant-design物料(v1.0.10)fork到我本地进行维护和构建,导入构建出来的物料协议之后发现 JSSlot 会渲染一个影响布局的 lc-container 容器

image

这是怎么回事呢,希望能得到解答。

Activity

  1. haoziqaq commented on Aug 31, 2022

    @haoziqaq
    ContributorAuthor

    引擎版本1.0.12

  2. haoziqaq commented on Sep 2, 2022

    @haoziqaq
    ContributorAuthor

    目前我是从 lowcode-materials,fork过来的仓库,进入antd物料包里装好依赖,然后把package.json的name改成了别的名字(其他什么都没动),然后跑lowcode:dev命令,渲染结果就成这样了,目前不知道是什么原因。希望解惑。

  3. liujuping commented on Sep 5, 2022

    @liujuping
    Collaborator

    这是设计态下的 JSSlot 组件,在没有子元素的时候,起到让用户知道这里可以拖拽进去元素的提示作用。

  4. haoziqaq commented on Sep 5, 2022

    @haoziqaq
    ContributorAuthor

    可是组件已经拖进来了,他就不该继续存在了呀,而且渲染态的时候,他依然存在不知道怎么回事。

    而且您看看这个问题,也挺奇怪

    目前我是从 lowcode-materials,fork过来的仓库,进入antd物料包里装好依赖,然后把package.json的name改成了别的名字(其他什么都没动),然后跑lowcode:dev命令,渲染结果就成这样了,目前不知道是什么原因。希望解惑。

  5. haoziqaq commented on Sep 5, 2022

    @haoziqaq
    ContributorAuthor

    在我没改包名之前,他的渲染是符合期望的。改了包名就出问题了

  6. haoziqaq commented on Sep 6, 2022

    @haoziqaq
    ContributorAuthor

    复现仓库: https://github.com/haoziqaq/lowcode-materials

    复现步骤

    1. cd packages/antd-lowcode-materials
    2. yarn
    3. yarn lowcode:dev
  7. LeoYuan commented on Sep 8, 2022

    @LeoYuan
    Contributor

    已经确认问题了,目前有两种方案:

    1. antd-lowcode-materials 已经定制了 Slot 组件,参考代码,注入这个组件,将会覆盖内置的 Slot 组件;
    2. 将内置的 Slot 组件移除 .lc-container 这一层结构;

    建议你先用方案1,方案2我们同步修改~

  8. haoziqaq commented on Sep 8, 2022

    @haoziqaq
    ContributorAuthor
  9. added a commit that references this issue on Sep 8, 2022
    3dc21a9
  10. added a commit that references this issue on Sep 13, 2022
    2dbd66c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions