历史数据兼容

master
于肖磊 2025-02-26 14:45:19 +08:00
parent 0729642163
commit 4dad15f548
2 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ export default {
return (num, data_follow, type, is_auto = '0', max_size = 0) => {
// 'left''top'
if (['left', 'top'].includes(type)) {
const { id = '', type: follow_type = 'left' } = data_follow;
const { id = '', type: follow_type = 'left' } = data_follow || { id: '', type: 'left' };
// idfollow_typetype
if (id !== '' && follow_type === type) {
return `${num}px`;

View File

@ -131,7 +131,7 @@ export default {
return (num, data_follow, type, is_auto = '0', max_size = 0) => {
// 'left''top'
if (['left', 'top'].includes(type)) {
const { id = '', type: follow_type = 'left' } = data_follow;
const { id = '', type: follow_type = 'left' } = data_follow || { id: '', type: 'left' };
// idfollow_typetype
if (id !== '' && follow_type === type) {
return `${num}px`;