in src/setter/style-setter/pro/position/positionBox.tsx [29:68]
value: addUnit(value, unit),
},
]);
}
} else {
onStyleChange([
{
styleKey,
value: null,
},
]);
}
};
const onInputKeyDown = (key: string, styleKey: string) => {
const { onStyleChange, unit = 'px', styleData } = props;
const value = styleData[styleKey] || 0;
if (key == KEY_ARROW_DOWN) {
onStyleChange([
{
styleKey,
value: addUnit(parseInt(value) - 1, unit),
},
]);
} else if (key == KEY_ARROW_UP) {
onStyleChange([
{
styleKey,
value: addUnit(parseInt(value) + 1, unit),
},
]);
}
};
const onPositionTempleteChange = (styleDataList: Array<StyleData>) => {
// 解析模板的值
styleDataList.map((item) => {
if (item.value == 'topLeft') {
onStyleChange([
{