@cloudbase/weda-ui-mp 3.12.0 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "miniprogram": "./",
4
4
  "packageManager": "yarn@3.0.2",
5
5
  "dependencies": {},
6
- "version": "3.12.0",
6
+ "version": "3.12.1",
7
7
  "main": "./",
8
8
  "publishConfig": {
9
9
  "access": "public"
@@ -71,9 +71,7 @@ const getSelectFields = async (props) => {
71
71
  select[name] = true;
72
72
  });
73
73
  } else if (props.selectFieldType === 'custom') {
74
- const _selectFields = Array.isArray(props.selectFields)
75
- ? props.selectFields
76
- : [];
74
+ const _selectFields = Array.isArray(props.selectFields) ? props.selectFields : [];
77
75
  _selectFields.forEach((name) => {
78
76
  select[name] = true;
79
77
  });
@@ -98,6 +96,12 @@ export const getModelParams = async (props) => {
98
96
  // 支持多关联查询,需要将查询条件转换为filter
99
97
  if (props?.queryCondition?.constructor === Object) {
100
98
  params['filter'] = getFilter(props.queryCondition);
99
+ } else if (Array.isArray(props?.queryCondition)) {
100
+ params['filter'] = {
101
+ where: {
102
+ $and: props?.queryCondition,
103
+ },
104
+ };
101
105
  }
102
106
  params.select = await getSelectFields(props);
103
107
  // 处理排序字段