ol-base-components 2.2.3 → 2.2.5
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 +1 -1
- package/src/api/api.js +3 -2
package/package.json
CHANGED
package/src/api/api.js
CHANGED
|
@@ -179,12 +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)
|
|
182
|
+
functionParams = functionParams.concat(pathParameters);
|
|
183
|
+
functionParams = functionParams.push("options = {}").join(", ");
|
|
183
184
|
// 函数
|
|
184
185
|
functionDoc += `export const ${generateKeyName(
|
|
185
186
|
url,
|
|
186
187
|
method
|
|
187
|
-
)} = (${functionParams}, options) => {\n`;
|
|
188
|
+
)} = (${functionParams}, options = {}) => {\n`;
|
|
188
189
|
|
|
189
190
|
functionDoc += ` return api({\n`;
|
|
190
191
|
functionDoc += ` url: \`${url.replace(/{/g, "${")}\`,\n`;
|