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

6.11.0 里面crud简单分页,按钮不可点。 #11619

Open
gillbates opened this issue Feb 17, 2025 · 1 comment
Open

6.11.0 里面crud简单分页,按钮不可点。 #11619

gillbates opened this issue Feb 17, 2025 · 1 comment
Labels
doc optimizing document need confirm style Bug or PR related to component's style

Comments

@gillbates
Copy link

描述问题:

当服务器返回简单分页 "hasNext": true 的时候,分页按钮不可点

截图或视频:

Image

该按钮不可点

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

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

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

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

<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8"/>
    <title>amis demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/sdk/sdk.min.css" rel="stylesheet"/>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/sdk/helper.min.css" rel="stylesheet"/>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/sdk/iconfont.min.css" rel="stylesheet"/>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/sdk/sdk.min.js"></script>



    <style>
        html,
        body,
        .app-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
        
    </style>
</head>

<body>
<div id="root" class="app-wrapper"></div>
<script type="text/javascript">
    (function () {
        let amis = amisRequire("amis/embed");

        // 通过替换下面这个配置来生成不同页面
        let amisJSON = {
            type: "page",
            title: "表单页面",
            body: [
                {
                    type: "crud",
                    api: "./pagination.json",
                    columns: [
                        {
                            name: "id",
                            label: "ID",
                            type: "text",
                        },
                        {
                            name: "status",
                            label: "status",
                            type: "text",
                        },
                    ],
                },
            ],
        };
        let amisScoped = amis.embed("#root", amisJSON);
    })();
</script>
</body>
</html>

pagination.json 内容如下:

{
    "status": 0,
    "msg": "ok",
    "data": {
        "rows": [
            {
                "id": 1,
                "status": 1
            },
            {
                "id": 2,
                "status": 2
            },
            {
                "id": 3,
                "status": 2
            },
            {
                "id": 4,
                "status": 2
            },
            {
                "id": 5,
                "status": 2
            },
            {
                "id": 6,
                "status": 2
            },
            {
                "id": 7,
                "status": 2
            },
            {
                "id": 8,
                "status": 2
            },
            {
                "id": 9,
                "status": 2
            },
            {
                "id": 10,
                "status": 2
            }
        ],
        "hasNext": true
    }
}

请教各位高手,这个可能是什么问题啊?

@github-actions github-actions bot added doc optimizing document style Bug or PR related to component's style labels Feb 17, 2025
Copy link

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

Please review the labels and make any necessary changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc optimizing document need confirm style Bug or PR related to component's style
Projects
None yet
Development

No branches or pull requests

1 participant