From 63cf7c9a0038e0caa7370fba897fefcc62b960a7 Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Fri, 7 Jun 2024 16:31:29 +0800
Subject: [PATCH 1/2] =?UTF-8?q?feat(PageSearch):=20:sparkles:=20=E8=A1=A8?=
=?UTF-8?q?=E5=8D=95=E9=A1=B9=E6=94=AF=E6=8C=81tips=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PageSearch/index.vue | 44 +++++++++++++++++++++--------
1 file changed, 33 insertions(+), 11 deletions(-)
diff --git a/src/components/PageSearch/index.vue b/src/components/PageSearch/index.vue
index f2f6e55b..fd11d6b7 100644
--- a/src/components/PageSearch/index.vue
+++ b/src/components/PageSearch/index.vue
@@ -12,6 +12,22 @@
:label="item.label"
:prop="item.prop"
>
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
{
- if (item.attrs?.join) {
- return inputTagMap[item.prop].data.join(item.attrs.join);
- } else {
- return inputTagMap[item.prop].data;
- }
+ queryParams[item.prop] = computed({
+ get() {
+ return typeof item.attrs?.join === "string"
+ ? inputTagMap[item.prop].data.join(item.attrs.join)
+ : inputTagMap[item.prop].data;
+ },
+ set(value) {
+ // resetFields时会被调用
+ inputTagMap[item.prop].data =
+ typeof item.attrs?.join === "string"
+ ? value.split(item.attrs.join).filter((item: any) => item !== "")
+ : value;
+ },
});
} else {
queryParams[item.prop] = item.initialValue ?? "";
@@ -196,9 +221,6 @@ for (const item of formItems) {
// 重置操作
function handleReset() {
queryFormRef.value?.resetFields();
- for (const key in inputTagMap) {
- inputTagMap[key].data = [];
- }
emit("resetClick", queryParams);
}
// 查询操作
From 8831289b655f2cc086ecdababaa89f8d8a087c42 Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Fri, 7 Jun 2024 16:35:42 +0800
Subject: [PATCH 2/2] =?UTF-8?q?feat(PageContent):=20:sparkles:=20=E8=A1=A8?=
=?UTF-8?q?=E6=A0=BC=E9=BB=98=E8=AE=A4=E5=B7=A5=E5=85=B7=E6=A0=8F=E7=9A=84?=
=?UTF-8?q?=E5=AF=BC=E5=87=BA=E3=80=81=E6=90=9C=E7=B4=A2=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90=E7=82=B9=E6=8E=A7=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PageContent/index.vue | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/components/PageContent/index.vue b/src/components/PageContent/index.vue
index 68a568fa..024b50d5 100644
--- a/src/components/PageContent/index.vue
+++ b/src/components/PageContent/index.vue
@@ -89,6 +89,7 @@
icon="FolderOpened"
circle
title="导出"
+ v-hasPerm="[`${contentConfig.pageName}:export`]"
@click="handleToolbar(item)"
/>
@@ -98,6 +99,7 @@
icon="search"
circle
title="搜索"
+ v-hasPerm="[`${contentConfig.pageName}:query`]"
@click="handleToolbar(item)"
/>