baidu / amis

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

crud的api值存在字符串变量${API_HOST}时无法分页 #10498

Closed lawbc closed 1 week ago

lawbc commented 1 week ago

描述问题:

使用crud组件时,api的域名使用了字符串变量${API_HOST},然后点击分页按钮或者分页数下拉框此时刷新页面的时候,url没有分页参数(page=1&perPage=10)

截图或视频:

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

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

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

  3. 粘贴有问题的完整 amis schema 代码: { "type": "page", "body": { "type": "crud", "api": "http://localhost:10800/upms/role/list", "syncLocation": false, "footerToolbar": [ "statistics", "switch-per-page", "pagination" ], "columns": [ { "name": "name", "label": "角色名称" }, { "name": "remark", "label": "备注" }, { "type": "operation", "label": "操作", "buttons": [ { "label": "修改", "type": "button", "level": "link" }, { "label": "删除", "type": "button", "level": "link" }, { "label": "分配权限", "type": "button", "level": "link" } ] } ] } }

  4. 操作步骤

lawbc commented 1 week ago

看crud文档,只要api参数存在变量,那么默认的变量只能手动加进去才行

lawbc commented 1 week ago

看crud文档,只要api参数存在变量,那么默认的变量只能手动加进去才行