@ywfe/fe-tools 1.2.1-beta.26 → 1.2.1-beta.28
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/index.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/userInputToJson.d.ts +8 -0
- package/lib/ywfe-tools.cjs +30 -0
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +30 -1
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/lib/ywfe-tools.umd.js +2 -2
- package/lib/ywfe-tools.umd.js.map +1 -1
- package/package.json +1 -1
- package/userInputToJson.ts +24 -0
package/index.ts
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/ywfe-tools.cjs
CHANGED
|
@@ -8762,6 +8762,35 @@ function request(_a) {
|
|
|
8762
8762
|
});
|
|
8763
8763
|
}
|
|
8764
8764
|
|
|
8765
|
+
function userInputToJson(_a) {
|
|
8766
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
8767
|
+
var res, result;
|
|
8768
|
+
var input = _b.input;
|
|
8769
|
+
return __generator(this, function (_c) {
|
|
8770
|
+
switch (_c.label) {
|
|
8771
|
+
case 0:
|
|
8772
|
+
console.log("input", input);
|
|
8773
|
+
return [4 /*yield*/, request({
|
|
8774
|
+
input: {
|
|
8775
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
|
8776
|
+
method: "GET",
|
|
8777
|
+
params: input,
|
|
8778
|
+
},
|
|
8779
|
+
})];
|
|
8780
|
+
case 1:
|
|
8781
|
+
res = _c.sent();
|
|
8782
|
+
if (res.success) {
|
|
8783
|
+
result = res.data;
|
|
8784
|
+
return [2 /*return*/, result.success ? result.data : result];
|
|
8785
|
+
}
|
|
8786
|
+
else {
|
|
8787
|
+
return [2 /*return*/, res.success ? res.data : res];
|
|
8788
|
+
}
|
|
8789
|
+
}
|
|
8790
|
+
});
|
|
8791
|
+
});
|
|
8792
|
+
}
|
|
8793
|
+
|
|
8765
8794
|
// Ctrl-S保存代码
|
|
8766
8795
|
function JSON2String(_a) {
|
|
8767
8796
|
var input = _a.input;
|
|
@@ -8780,4 +8809,5 @@ function JSON2String(_a) {
|
|
|
8780
8809
|
|
|
8781
8810
|
exports.JSON2String = JSON2String;
|
|
8782
8811
|
exports.request = request;
|
|
8812
|
+
exports.userInputToJson = userInputToJson;
|
|
8783
8813
|
//# sourceMappingURL=ywfe-tools.cjs.map
|