baidu / amis

前端低代码框架,通过 JSON 配置就能生成各种页面。
https://baidu.github.io/amis/
Apache License 2.0
17.4k stars 2.52k forks source link

Converting circular structure to JSON --> starting at object with constructor 'HTMLButtonElement' | property '__reactFiber$s48rovnp3a' -> object with constructor 'FiberNode' --- property 'stateNode' closes the circle #11180

Open zwbuber opened 1 week ago

zwbuber commented 1 week ago

描述问题:

报错这个错误

Converting circular structure to JSON --> starting at object with constructor 'HTMLButtonElement' | property '__reactFiber$s48rovnp3a' -> object with constructor 'FiberNode' --- property 'stateNode' closes the circle

截图或视频:

image

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

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

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

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

    {
    "type": "page",
    "body": {
    "type": "crud",
    "syncLocation": false,
    "api": {
      "method": "get",
      "url": "/api"
    },
    "filterTogglable": true,
    "filterDefaultVisible": false,
    "headerToolbar": [
      "filter-toggler",
      "bulkActions",
      {
        "type": "columns-toggler",
        "align": "right",
        "draggable": true,
        "icon": "fas fa-cog",
        "overlay": true,
        "footerBtnSize": "sm"
      }
    ],
    "bulkActions": [
      {
        "type": "button",
        "label": "批量分账",
        "actionType": "ajax",
        "level": "primary",
        "confirmText": "确认分账?",
        "api": {
          "method": "post",
          "url": "/api?quoteSurveyIds=${ids}"
        },
        "feedback": {
          "title": "分账完成",
          "body": {
            "type": "tpl",
            "tpl": "${result|raw}"
          }
        }
      }
    ],
    "filter": {
      "body": [
        {
          "type": "select",
          "name": "settled",
          "label": "是否已分账",
          "inline": true,
          "size": "md",
          "options": [
            {
              "label": "已分账",
              "value": true
            },
            {
              "label": "未分账",
              "value": false
            }
          ]
        },
        {
          "type": "submit",
          "label": "搜索",
          "level": "primary"
        },
        {
          "type": "reset",
          "label": "重置",
          "level": "warning"
        }
      ],
      "title": "条件搜索"
    },
    "columns": [
      {
        "name": "id",
        "label": "ID",
        "align": "center",
        "type": "text"
      },
      {
        "name": "orderStatusName",
        "label": "订单状态",
        "align": "center",
        "type": "text"
      },
      {
        "name": "price",
        "label": "报价金额",
        "align": "center",
        "type": "text"
      },
      {
        "name": "payChannel",
        "label": "支付方式",
        "align": "center",
        "type": "text"
      },
      {
        "name": "settleAmount",
        "label": "需分账金额",
        "align": "center",
        "type": "tpl",
        "tpl": "¥:${settleAmount}"
      },
      {
        "name": "settledAmount",
        "label": "已分账金额",
        "align": "center",
        "type": "tpl",
        "tpl": "<span style='color:red'>¥:${settledAmount}</span>"
      },
      {
        "name": "settled",
        "label": "分账状态",
        "type": "mapping",
        "map": {
          "0": "<i class='text-red-400'>未发生</i>",
          "1": "<i class='text-green-400'>已发生</i>",
          "*": "<i class='text-red-400'>未发生</i>"
        }
      },
      {
        "name": "shipTime",
        "label": "发货时间",
        "type": "date",
        "width": "125px",
        "format": "yyyy-MM-DD HH:mm:ss",
        "valueFormat": "x"
      },
      {
        "name": "settledTime",
        "label": "分账时间",
        "type": "date",
        "width": "125px",
        "format": "yyyy-MM-DD HH:mm:ss",
        "valueFormat": "x"
      },
      {
        "name": "settledChannelNo",
        "label": "渠道分账订单号"
      },
      {
        "type": "operation",
        "label": "操作",
        "width": 100,
        "buttons": [
          {
            "type": "button",
            "label": "分账",
            "actionType": "dialog",
            "visibleOn": "${settled==0}",
            "level": "link",
            "dialog": {
              "title": "分账",
              "size": "small",
              "actions": [
                {
                  "type": "button",
                  "level": "primary",
                  "confirmText": "确认分账?",
                  "label": "分账",
                  "actionType": "ajax",
                  "api": {
                    "method": "post",
                    "url": "/api?id=${id}"
                  }
                }
              ]
            }
          }
        ],
        "toggled": true
      }
    ]
    }
    }
  4. 操作步骤 请简单描述一下复现的操作步骤...

github-actions[bot] commented 1 week ago

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

Please review the labels and make any necessary changes.

iuime commented 1 week ago

我在crud中批量删除的时候也遇到同样的问题