【问题标题】:How can you drag between 2 'grids' in angular-gridster2?如何在 angular-gridster2 中的 2 个“网格”之间拖动?
【发布时间】:2018-08-07 17:38:11
【问题描述】:

我正在使用以下内容: https://github.com/tiberiuzuld/angular-gridster2

我希望能够在同一页面上实例化两个具有不同“id”的网格,grid1 和 grid2。是否可以将grid1中的一个box拖到grid2中?

如果是这样,怎么做?如果没有,还有其他类似的 angular2/4 库支持吗?

【问题讨论】:

    标签: angular gridster


    【解决方案1】:

    问题一:是否可以将grid1中的一个box拖到grid2中?
    答案: 遗憾的是,目前没有这样的功能可用。请看一下这个线程。 https://github.com/tiberiuzuld/angular-gridster2/issues/245

    问题 2:还有其他类似的 angular2/4 库支持吗?
    回答:不确定在 Angular 中实现的类似库。不过我个人喜欢gridstack.jshttps://github.com/gridstack/gridstack.js

    适用于移动设备的现代 Typescript 库,用于仪表板布局和 创建。制作拖放式、多列响应式仪表板 从未如此简单。具有多个绑定并且与 React、Vue、Angular、Knockout.js、Ember 等(参见框架 部分)。

    它支持您需要的功能。 https://gridstackjs.com/demo/two.html

    没有可用的角度包装器。但是你可以直接在你的 Angular 项目中使用它。为了帮助您入门,我还准备了一个使用带有多个网格的 gridstack.js 的小型 stackblitz 演示。

    演示:https://stackblitz.com/edit/angular-ivy-mlnqah?file=src/app/gridstack/gridstack.component.ts

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-29
      • 1970-01-01
      • 2011-10-10
      相关资源
      最近更新 更多