fix:调整组件和页面scheme的类型

This commit is contained in:
lhj
2024-11-17 15:29:52 +08:00
parent f601417913
commit 2e1d590c89
11 changed files with 69 additions and 78 deletions

View File

@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
@ -118,8 +118,7 @@ function writeModifiedComponents(components) {
case 3:
if (!(_i < components_1.length)) return [3 /*break*/, 6];
component = components_1[_i];
updatedComponent = __assign(__assign({}, component), { visible: true, disable: false // 统一设置 disable 为 false
});
updatedComponent = __assign(__assign({}, component), { visible: true, disable: false, designer: {} });
fileName = "".concat(component.type, ".json");
filePath = path.join(exportModifiedComponentsDir, fileName);
content = JSON.stringify(updatedComponent, null, 2);

View File

@ -50,7 +50,8 @@ async function writeModifiedComponents(components: IComponent[]): Promise<void>
const updatedComponent = {
...component,
visible: true, // 统一设置 visible 为 true
disable: false // 统一设置 disable 为 false
disable: false, // 统一设置 disable 为 false
designer:{},
};
const fileName = `${component.type}.json`;