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

@@ -1,7 +1,7 @@
/* /*
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com> * @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
* @Date: 2025-04-23 20:26:48 * @Date: 2025-04-23 20:26:48
* @LastEditTime: 2025-05-07 20:18:08 * @LastEditTime: 2025-05-07 20:49:08
* @Description: 笔记配置 * @Description: 笔记配置
* Copyright (c) 2025 by yubaolee | ahfu~ , All Rights Reserved. * Copyright (c) 2025 by yubaolee | ahfu~ , All Rights Reserved.
*/ */
@@ -59,7 +59,7 @@ const proNote = defineNoteConfig({
{ {
text: '内置组件', text: '内置组件',
collapsed: false, collapsed: false,
items: ['table','querybuilder','columnsettings','components'] items: ['table','querybuilder','columnsetting','components']
}, },
'printerplan', 'printerplan',
{ {

View File

@@ -109,9 +109,27 @@ const handleSearch = () => {
- 根据字段类型自动切换输入控件(文本、数字、日期、时间区间等)。 - 根据字段类型自动切换输入控件(文本、数字、日期、时间区间等)。
- 支持 SQL 条件一键复制。 - 支持 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. **为什么没有显示某些字段?** 1. **为什么没有显示某些字段?**

View File

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