尝试在 Enyo 中使 3 列数据间距相等

发布于 2024-12-26 03:25:42 字数 240 浏览 1 评论 0原文

我正在为 enyo 开发一个项目,需要有 3 列,格式如下:

--- date---      ---- message -------      ----- attachments-------

问题是每行都有不同的间距。因此,如果第一个日期是 1/2/10012,下一个日期是 12/22/2002,消息列将不会对齐。我研究过使用 sliderPane,但想知道是否有更简单的方法来做到这一点。

I have a project I'm working on for enyo, that needs to have 3 column with the following format:

--- date---      ---- message -------      ----- attachments-------

The problem is that each line has a different spacing. So if the first date is 1/2/10012 and the next date is 12/22/2002, the message column will not line up. I've looked into using a slidingPane, but was wondering if there was a more simple way to do it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温暖的光 2025-01-02 03:25:42

我不确定我是否完全理解这个问题,但如果你想要一个显示块包含 3 个等距的“列”,你可以这样做:

{kind: enyo.VFlexBox, components: [
    {kind: enyo.HFlexBox, flex: 1, align: "center", pack: "center", components: [
        {name: "column1", flex: 1, content: "Column 1"},
        {name: "column2", flex: 1, content: "Column 2"},
        {name: "column3", flex: 1, content: "Column 3"},
    ]}
]}

I'm not sure if I understand the question fully, but if you want a block of display to contain 3 equally spaced "columns" you can do something like:

{kind: enyo.VFlexBox, components: [
    {kind: enyo.HFlexBox, flex: 1, align: "center", pack: "center", components: [
        {name: "column1", flex: 1, content: "Column 1"},
        {name: "column2", flex: 1, content: "Column 2"},
        {name: "column3", flex: 1, content: "Column 3"},
    ]}
]}
踏雪无痕 2025-01-02 03:25:42

我相信你想要的是VirtualRepeater。这允许重复的行列表(它表示最多 ~100 行,因此请确保它适合您的用例)。这应该允许可变高度的行(这就是我认为你正在谈论的)。在 getItem 函数中,您可以根据需要填写每一行,它们会对齐。

I believe that what you want is the VirtualRepeater. This allows for a repeating list of rows (It say maximum of ~100 rows, so make sure that'll work for your use case). This should allow for variable height rows (Which is what I Think you're talking about). In your getItem function you can fill in each row as needed and they'll line up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文