mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-09 23:44:04 +08:00
fix: 无换行符的长文本未被正确标记为大内容
This commit is contained in:
parent
eb969485de
commit
2facf3782f
@ -92,7 +92,8 @@ const emit = defineEmits(['onDataChange', 'onDataRemove', 'onSelectItemAdd', 'on
|
||||
const isOverSizedContent = (item) => {
|
||||
const { type, data } = item
|
||||
if (type === 'text') {
|
||||
return data.split(`\n`).length - 1 > 6
|
||||
// 没有换行的长文本也应当被纳入考虑
|
||||
return data.split(`\n`).length - 1 > 6 || data.length > 255
|
||||
} else if (type === 'file') {
|
||||
return JSON.parse(item.data).length >= 6
|
||||
}
|
||||
|
@ -86,8 +86,11 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
max-width: 180px;
|
||||
min-width: 150px;
|
||||
padding: 0px 10px;
|
||||
flex-wrap: wrap;
|
||||
& * {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
Loading…
x
Reference in New Issue
Block a user