docs: 完善自定义查询文档

This commit is contained in:
wintel
2025-05-07 20:58:02 +08:00
parent 7c0107f78e
commit 3747773685
3 changed files with 22 additions and 4 deletions

View File

@@ -109,9 +109,27 @@ const handleSearch = () => {
- 根据字段类型自动切换输入控件(文本、数字、日期、时间区间等)。
- 支持 SQL 条件一键复制。
- 查询条件自动本地缓存,关闭弹窗/刷新页面后可恢复。
---
## 后端接口
后端接口需要继承 `SqlSugarBaseApp` 类,并在 `Load` 方法中处理前端生成的sql查询条件。
```csharp
public class XXApp : SqlSugarBaseApp<XX>
{
public async Task<TableData> Load(QueryXXListReq request)
{
//...
if (!string.IsNullOrEmpty(request.sqlWhere))
{
objs = objs.Where(request.sqlWhere);
}
//...
}
}
```
## 常见问题
1. **为什么没有显示某些字段?**

View File

@@ -46,7 +46,7 @@ const dataList = ref([
])
const loading = ref(false)
// 主表id模板,点击跳转详情
// 如果需要自定义展示,可以设置。比如:主表id模板,点击跳转详情
const idtemplate = defineComponent({
props: ['row'],
methods: {