From 3747773685a746f5957c7e55091911f921b97597 Mon Sep 17 00:00:00 2001 From: wintel Date: Wed, 7 May 2025 20:58:02 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=AE=8C=E5=96=84=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=9F=A5=E8=AF=A2=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- newdocs/docs/.vuepress/notes.ts | 4 ++-- newdocs/docs/notes/pro/querybuilder.md | 20 +++++++++++++++++++- newdocs/docs/notes/pro/table.md | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/newdocs/docs/.vuepress/notes.ts b/newdocs/docs/.vuepress/notes.ts index dc1710f3..199445fe 100644 --- a/newdocs/docs/.vuepress/notes.ts +++ b/newdocs/docs/.vuepress/notes.ts @@ -1,7 +1,7 @@ /* * @Author: yubaolee | ahfu~ <954478625@qq.com> * @Date: 2025-04-23 20:26:48 - * @LastEditTime: 2025-05-07 20:18:08 + * @LastEditTime: 2025-05-07 20:49:08 * @Description: 笔记配置 * Copyright (c) 2025 by yubaolee | ahfu~ , All Rights Reserved. */ @@ -59,7 +59,7 @@ const proNote = defineNoteConfig({ { text: '内置组件', collapsed: false, - items: ['table','querybuilder','columnsettings','components'] + items: ['table','querybuilder','columnsetting','components'] }, 'printerplan', { diff --git a/newdocs/docs/notes/pro/querybuilder.md b/newdocs/docs/notes/pro/querybuilder.md index b0b30480..e5ab62a4 100644 --- a/newdocs/docs/notes/pro/querybuilder.md +++ b/newdocs/docs/notes/pro/querybuilder.md @@ -109,9 +109,27 @@ const handleSearch = () => { - 根据字段类型自动切换输入控件(文本、数字、日期、时间区间等)。 - 支持 SQL 条件一键复制。 - 查询条件自动本地缓存,关闭弹窗/刷新页面后可恢复。 - --- +## 后端接口 + +后端接口需要继承 `SqlSugarBaseApp` 类,并在 `Load` 方法中处理前端生成的sql查询条件。 + +```csharp +public class XXApp : SqlSugarBaseApp +{ + public async Task Load(QueryXXListReq request) + { + //... + if (!string.IsNullOrEmpty(request.sqlWhere)) + { + objs = objs.Where(request.sqlWhere); + } + //... + } +} +``` + ## 常见问题 1. **为什么没有显示某些字段?** diff --git a/newdocs/docs/notes/pro/table.md b/newdocs/docs/notes/pro/table.md index 951ff7c9..6253b979 100644 --- a/newdocs/docs/notes/pro/table.md +++ b/newdocs/docs/notes/pro/table.md @@ -46,7 +46,7 @@ const dataList = ref([ ]) const loading = ref(false) -// 主表id模板,点击跳转详情 +// 如果需要自定义展示,可以设置。比如:主表id模板,点击跳转详情 const idtemplate = defineComponent({ props: ['row'], methods: {