ol-base-components 2.2.5 → 2.2.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api/api.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol-base-components",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "bin": {
package/src/api/api.js CHANGED
@@ -179,13 +179,13 @@ const generateApiModules = (swagger) => {
179
179
  let functionParams = [];
180
180
  if (hasQuery) functionParams.push("params");
181
181
  if (hasBody) functionParams.push("body");
182
- functionParams = functionParams.concat(pathParameters);
183
- functionParams = functionParams.push("options = {}").join(", ");
182
+ Object.assign(functionParams, pathParameters);
183
+ functionParams.push("options = {}");
184
184
  // 函数
185
185
  functionDoc += `export const ${generateKeyName(
186
186
  url,
187
187
  method
188
- )} = (${functionParams}, options = {}) => {\n`;
188
+ )} = (${functionParams.join(", ")}) => {\n`;
189
189
 
190
190
  functionDoc += ` return api({\n`;
191
191
  functionDoc += ` url: \`${url.replace(/{/g, "${")}\`,\n`;