fix: 无换行符的长文本未被正确标记为大内容

This commit is contained in:
ZiuChen 2022-09-13 21:21:27 +08:00
parent eb969485de
commit 2facf3782f
2 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,8 @@ const emit = defineEmits(['onDataChange', 'onDataRemove', 'onSelectItemAdd', 'on
const isOverSizedContent = (item) => { const isOverSizedContent = (item) => {
const { type, data } = item const { type, data } = item
if (type === 'text') { if (type === 'text') {
return data.split(`\n`).length - 1 > 6 //
return data.split(`\n`).length - 1 > 6 || data.length > 255
} else if (type === 'file') { } else if (type === 'file') {
return JSON.parse(item.data).length >= 6 return JSON.parse(item.data).length >= 6
} }

View File

@ -86,8 +86,11 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-wrap: wrap;
max-width: 180px;
min-width: 150px; min-width: 150px;
padding: 0px 10px; padding: 0px 10px;
flex-wrap: wrap;
& * { & * {
display: flex; display: flex;
align-items: center; align-items: center;