Commit b01812b1 authored by rockyl's avatar rockyl

修复

parent 16b86c82
......@@ -459,8 +459,9 @@
}
},
"designCutModes": {
"none": "不裁剪",
"top": "顶部裁剪",
"center": "上下裁剪",
"bottom": "底部裁剪"
}
}
\ No newline at end of file
}
......@@ -31,7 +31,6 @@ import events from "@/global-events.js"
const storeName = 'project';
const psStoreName = 'pack-history';
const offsetAll = 172;
const defaultOptions = {
behaviorEditor: 'builtin',
......@@ -330,7 +329,7 @@ export const projectStore = {
// 如果left\right top\bottom组合同时存在
// 则根据数值,计算width height
// if (newView.properties.left && newView.properties.right) {
// //
// //
// }
// if (newView.properties.top && newView.properties.bottom) {
......@@ -814,7 +813,7 @@ export const projectStore = {
// debugger;
console.log("resetScrollType",data)
resetScrollType(data.data)
let getTopView = node => {
// console.log("node",node)
if (node.parent && !node.parent.parent) {
......@@ -845,7 +844,7 @@ export const projectStore = {
commit('activeComponent', data.data);
},
/**
* 修改属性
*/
......@@ -868,7 +867,7 @@ export const projectStore = {
}
nodeUUidCatch=state.activeComponent.uuid
//console.log("nodeUUidCatch",nodeUUidCatch)
/*if (hasAssetsDep) {
commit('updateAssetDep');
}*/
......@@ -933,19 +932,7 @@ export const projectStore = {
})
},
async importPsd({commit}, {file, action, mode}) {
let offset = {};
switch(mode){
case 'top':
offset.y = offsetAll;
break;
case 'center':
offset.y = offsetAll / 2;
break;
case 'bottom':
break;
}
const result = await toZeroing(file, {offset});
const result = await toZeroing(file, {mode});
let viewFile = new File([result], 'view.json');
const {view, assets} = await editorApi.uploadView(viewFile);
switch (action) {
......
......@@ -33,7 +33,7 @@
return {
visible: false,
designCutMode: 'top',
designCutMode: 'none',
designCutModes,
images,
}
......@@ -62,4 +62,4 @@
<style scoped>
</style>
\ No newline at end of file
</style>
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