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.
- package/package.json +1 -1
- package/src/api/api.js +3 -3
package/package.json
CHANGED
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
|
|
183
|
-
functionParams
|
|
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
|
|
188
|
+
)} = (${functionParams.join(", ")}) => {\n`;
|
|
189
189
|
|
|
190
190
|
functionDoc += ` return api({\n`;
|
|
191
191
|
functionDoc += ` url: \`${url.replace(/{/g, "${")}\`,\n`;
|