Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法打印表单 #11715

Open
xieji2333 opened this issue Mar 6, 2025 · 0 comments
Open

无法打印表单 #11715

xieji2333 opened this issue Mar 6, 2025 · 0 comments

Comments

@xieji2333
Copy link

描述问题:

打印表单时,点击按钮没有反应,不会弹出浏览器的打印框

截图或视频:

Image
type是crud时点击打印是ok的,但是只要type一改成form,点击按钮就没有任何反应

Image

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

  1. 你是如何使用 amis 的?
    官网文档上编辑代码

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

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

{
  "type": "page",
  "body": [
    {
      "type": "button",
      "label": "打印",
      "level": "primary",
      "className": "mr-2",
      "onEvent": {
        "click": {
          "actions": [
            {
              "actionType": "print",
              "args": {
                "id": "mycrud"
              }
            }
          ]
        }
      }
    },
    {
      "type": "form",
      "id": "mycrud",
      "static": true,
      "body": [
        {
          "type": "input-text",
          "name": "username",
          "label": "用户名"
        },
        {
          "type": "input-password",
          "name": "password",
          "required": true,
          "placeholder": "请输入密码"
        },
        {
          "type": "checkbox",
          "name": "rememberMe",
          "label": "记住登录"
        }
      ]
    }
  ]
}
  1. 操作步骤
    修改了打印的组件类型为form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant