amis icon indicating copy to clipboard operation
amis copied to clipboard

crud autoFillHeight设置为true会导致Failed to execute 'getComputedStyle' on 'Window'

Open tcyufeng opened this issue 2 years ago • 1 comments

描述问题:

将amis版本从2.0.2升级到2.1.0,原来可以正常使用的json配置,会报这个错误 使用amis-editor 5.2.0同样存在该问题

截图或视频:

image

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

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

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在 2.1.0

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

{
        "type": "page",
        "body": {
            "syncLocation": true,
            "perPageAvailable": [
                10,
                20,
                50,
                100
            ],
            "columns": [
                {
                    "buttons": [
                        {
                            "level": "link",
                            "label": "${name}",
                            "type": "button",
                            "url": "/protectunit/view?id=${id}",
                            "actionType": "url"
                        }
                    ],
                    "label": "文化旅游部公布的保护单位名称",
                    "type": "operation",
                    "placeholder": "-"
                },
                {
                    "label": "所属地区",
                    "type": "text",
                    "name": "area",
                    "placeholder": "-"
                },
                {
                    "label": "统一社会信用代码",
                    "type": "text",
                    "name": "uscc",
                    "placeholder": "-"
                },
                {
                    "label": "单位类型",
                    "type": "text",
                    "name": "type_label",
                    "placeholder": "-"
                },
                {
                    "buttons": [
                        {
                            "level": "link",
                            "icon": "fa fa-edit",
                            "label": "编辑",
                            "type": "button",
                            "url": "/protectunit/modify?id=${id}",
                            "actionType": "url"
                        },
                        {
                            "level": "link",
                            "icon": "fa fa-trash-alt",
                            "confirmText": "确定要删除?",
                            "className": "text-danger",
                            "label": "删除",
                            "type": "button",
                            "actionType": "ajax",
                            "api": {
                                "method": "delete",
                                "url": "/api/crud/delete/1551840559407104001?id=${id}"
                            }
                        }
                    ],
                    "label": "操作",
                    "type": "operation"
                }
            ],
            "source": "${content}",
            "type": "crud",
            "perPageField": "size",
            "affixHeader": false,
            "columnsTogglable": true,
            "autoFillHeight": true,
            "filter": {
                "type": "form",
                "body": [
                    {
                        "label": "名称 :",
                        "type": "input-text",
                        "required": false,
                        "size": "sm",
                        "name": "name__LIKE",
                        "validations": {
                            "maxLength": 32
                        }
                    },
                    {
                        "level": "primary",
                        "icon": "fa fa-search",
                        "className": "no-border m-l-lg",
                        "label": "查询",
                        "type": "submit",
                        "actionType": "submit",
                        "size": "sm"
                    },
                    {
                        "level": "default",
                        "label": "重置",
                        "type": "button",
                        "actionType": "reset-and-submit",
                        "size": "sm"
                    }
                ],
                "title": "",
                "mode": "inline",
                "affixFooter": false
            },
            "features": [
                "create",
                "filter",
                "update",
                "delete",
                "view"
            ],
            "perPage": 20,
            "draggable": false,
            "footerToolbar": [
                {
                    "align": "left",
                    "type": "pagination"
                },
                {
                    "align": "right",
                    "type": "statistics"
                },
                {
                    "align": "right",
                    "type": "switch-per-page"
                }
            ],
            "initFetch": true,
            "api": {
                "method": "get",
                "url": "/api/crud/page?modelId=1551840559407104001"
            },
            "placeholder": "暂无数据",
            "headerToolbar": [
                {
                    "align": "right",
                    "type": "columns-toggler"
                },
                {
                    "level": "default",
                    "icon": "fa fa-plus",
                    "label": "新增",
                    "align": "left",
                    "type": "button",
                    "url": "/protectunit/create",
                    "actionType": "url"
                }
            ]
        }
    }
  1. 操作步骤 使用amis 2.1.0版本,或amis-editor 5.2.0 存在该问题

tcyufeng avatar Aug 05 '22 02:08 tcyufeng

👍 Thanks for this! 🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

github-actions[bot] avatar Aug 05 '22 02:08 github-actions[bot]

同问,这个怎么处理啊

songling0 avatar Aug 19 '22 01:08 songling0

merged to https://github.com/baidu/amis/issues/7606

hsm-lv avatar Jul 28 '23 05:07 hsm-lv