amis icon indicating copy to clipboard operation
amis copied to clipboard

quickEdit 组件与 Each 组件一起用的时候,编辑 ui 会换行放置

Open xdlove opened this issue 5 years ago • 5 comments

描述问题:

quickEdit 组件与 Each 组件一起用的时候,编辑 ui 会换行放置

截图或视频:

image

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? npm

  2. 粘贴有问题的完整 amis schema 代码:

文档里的例子
{
  "type": "page",
  "body": {
    "type": "table",
    "data": {
      "items": [
        {
          "id": "1",
          "each": [
            "A1",
            "B1",
            "C1"
          ]
        },
        {
          "id": "2",
          "each": [
            "A2",
            "B2",
            "C2"
          ]
        },
        {
          "id": "3",
          "each": [
            "A3",
            "B3",
            "C3"
          ]
        }
      ]
    },
    "columns": [
      {
        "name": "id",
        "label": "Id"
      },
      {
        "name": "each",
        "label": "循环",
        "type": "each",
        "items": {
          "type": "tpl",
          "tpl": "<span class='label label-info m-l-sm'><%= this.item %></span>"
        },
        "quickEdit":true
      }
    ]
  }
}
  1. 操作步骤 https://baidu.gitee.io/amis/docs/components/each 在文档里原有 json 数据上,增加了 quickEdit 组件 "quickEdit":true

xdlove avatar Dec 11 '20 14:12 xdlove

有什么方式可以让编辑按钮在同一行展示么?

xdlove avatar Dec 12 '20 07:12 xdlove

有什么方式可以让编辑按钮在同一行展示么?

@RickCole21 您好,可以帮忙看下这个问题么~

xdlove avatar Dec 12 '20 09:12 xdlove

{
        name: 'each',
        label: '循环',
        innerClassName: 'inline-block',
        type: 'each',
        items: {
          type: 'tpl',
          tpl: "<span class='label label-info m-l-sm'><%= this.item %></span>"
        },
        quickEdit: true
      }

加一个innerClassName: 'inline-block',

RickCole21 avatar Dec 25 '20 08:12 RickCole21

{
        name: 'each',
        label: '循环',
        innerClassName: 'inline-block',
        type: 'each',
        items: {
          type: 'tpl',
          tpl: "<span class='label label-info m-l-sm'><%= this.item %></span>"
        },
        quickEdit: true
      }

加一个innerClassName: 'inline-block',

您好,在table表格下可以了,但是在 form 表单下不行

{
  "type": "page",
  "body": {
    "type": "form",
    "data": {
      "each": [
        "A",
        "B",
        "C"
      ]
    },
    "controls": [
      {
        "type": "each",
        "label": "静态展示each",
        "name": "each",
        "items": {
          "type": "tpl",
          "tpl": "<span class='label label-info m-l-sm'><%= this.item %></span>"
        },
        "innerClassName": "inline-block",
        "quickEdit": true
      }
    ]
  }
}

xdlove avatar Jan 06 '21 08:01 xdlove

表单下用 array 来实现这个功能

nwind avatar Nov 01 '21 07:11 nwind