From 65421d091771518d19fac7b79112dad693377165 Mon Sep 17 00:00:00 2001
From: Aaron <427787340@qq.com>
Date: Thu, 1 Aug 2019 09:51:42 +0800
Subject: [PATCH] Scheme 新增搜索表单配置参数,支持get表格行数据
---
packages/scheme/index.vue | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/packages/scheme/index.vue b/packages/scheme/index.vue
index 88c559c..e7e874a 100644
--- a/packages/scheme/index.vue
+++ b/packages/scheme/index.vue
@@ -52,7 +52,7 @@
-
+
@@ -165,6 +165,11 @@ export default {
tableList: Array,
// 详情配置
detailList: Array,
+ // 搜索表单参数
+ searchProps: {
+ type: Object,
+ default() { return {} }
+ },
// 表格参数
tableProps: {
type: Object,
@@ -388,7 +393,7 @@ export default {
},
// 查询单项数据
async doGet(param) {
- const { primaryKey = 'id', getPrimaryKey } = this.option || {};
+ const { primaryKey = 'id', getPrimaryKey, getRow = false } = this.option || {};
if (this.option.getAPI) { // 配置了自定义查询API的情况
console.log('getAPI');
this.dialogLoading = true;
@@ -400,7 +405,7 @@ export default {
} finally {
this.dialogLoading = false;
}
- } else if (_$http && this.option.url) { // 给定了http的情况
+ } else if (_$http && this.option.url && !getRow) { // 给定了http的情况
console.log('_$http get');
this.dialogLoading = true;
const defaultGetMethod = `get/${getPrimaryKey || primaryKey}/${param[getPrimaryKey] || param[primaryKey]}`;
--
libgit2 0.21.0