Commit fb9dae7d authored by wcmoon's avatar wcmoon

fix: 模版为空时报错

parent 20904b6c
......@@ -240,7 +240,7 @@ export function formatTemplateApi2Local(apiList: RootUnitType[]): Unit[] {
})
} else {
let list = [];
let o = JSON.parse((rootUnit.data as {value: string}).value || '{}');
let o = JSON.parse((rootUnit.data as {value: string})?.value || '{}');
for (let i in o) {
list.push({
type: 0,
......
......@@ -15,7 +15,6 @@ export class Unit {
this.children = [];
this.parent = parent || null;
this.type = unitType || PropertyType.Unit;
console.log(this.type);
// this.data = data || {}
}
......
......@@ -248,7 +248,6 @@ export default {
})
}
element.data = list;
console.log(element);
// this.$forceUpdate();
}
......
rm -rf sy
mv dist sy
tar -czf sy.tar sy
scp sy.tar root@47.114.159.142:/usr/share/nginx/sy.tar
scp sy.tar root@47.114.159.142:/usr/share/nginx/html/sy.tar
rm -rf sy.tar
ssh root@47.114.159.142 'cd /usr/share/nginx && rm -rf sy && tar -xzf sy.tar && rm -rf sy.tar'
ssh root@47.114.159.142 'cd /usr/share/nginx/html && rm -rf sy && tar -xzf sy.tar && rm -rf sy.tar'
echo 'done. 👉 http://47.114.159.142:8994'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment