feat: 拖拽布局-更改行列数量

flex-api
LCJ-MinYa 3 weeks ago
parent 6950c8ab06
commit 8c82a5146c

@ -8,7 +8,7 @@
initData: null,
};
let currentComponent = null;
let cellHeight = 60;
let cellHeight = 30;
let locale = 'en';
var initGridStack = () => {
@ -19,8 +19,8 @@
GridStack.setupDragIn('#components-panel .component-item', undefined, [
{
w: 2,
h: 2,
w: 4,
h: 4,
type: 'image',
name: userLangConfig[locale].user.image_default_name,
background: '#fff',
@ -38,8 +38,8 @@
focusedStyle_scale: 1,
},
{
w: 2,
h: 1,
w: 4,
h: 2,
type: 'text',
childrenType: '',
name: userLangConfig[locale].user.text_default_name,
@ -120,6 +120,7 @@
// subGridOpts: subOptions,
// subGridDynamic: true,
children: self['initData'].children,
column: 24,
},
`#${type}-screen`
);
@ -633,12 +634,12 @@
let initDataCopy = JSON.parse(JSON.stringify(otherInfo));
initDataCopy.children.forEach((item) => {
item.xCopy = item.x;
item.x = item.x * (1920 / 12);
item.x = item.x * (1920 / 24);
item.yCopy = item.y;
item.y = item.y * cellHeight * 2;
item.wCopy = item.w;
item.w = item.w * (1920 / 12);
item.w = item.w * (1920 / 24);
if (!item.hasOwnProperty('h')) {
item.h = 1;
}

Loading…
Cancel
Save