Demo:优化富文本工具条下拉选项列表高度问题

This commit is contained in:
wanglin2
2024-06-01 23:01:30 +08:00
parent c5ed48ad99
commit 21b404a322
3 changed files with 18 additions and 17 deletions

View File

@@ -178,11 +178,10 @@ export const backgroundPositionList = [
}
]
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
const ctrl = isMac?'⌘':'Ctrl';
const enter = isMac?'Return':'Enter';
const macFn = isMac?'fn + ':'';
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0
const ctrl = isMac ? '⌘' : 'Ctrl'
const enter = isMac ? 'Return' : 'Enter'
const macFn = isMac ? 'fn + ' : ''
// 背景图片大小
export const backgroundSizeList = [
@@ -268,7 +267,7 @@ export const shortcutKeyList = [
{
icon: 'iconbianji',
name: 'Edit node',
value: macFn+'F2'
value: macFn + 'F2'
},
{
icon: 'iconhuanhang',
@@ -364,7 +363,7 @@ export const shortcutKeyList = [
icon: 'icondodeparent',
name: 'Move up one level',
value: 'Shift + Tab'
},
}
]
}
]
@@ -493,4 +492,4 @@ export const downTypeList = [
icon: 'iconTXT',
desc: 'Plain text file'
}
]
]

View File

@@ -260,11 +260,10 @@ export const backgroundSizeList = [
export const store = {
sidebarZIndex: 1 //侧边栏zIndex
}
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
const ctrl = isMac?'⌘':'Ctrl';
const enter = isMac?'Return':'Enter';
const macFn = isMac?'fn + ':'';
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0
const ctrl = isMac ? '⌘' : 'Ctrl'
const enter = isMac ? 'Return' : 'Enter'
const macFn = isMac ? 'fn + ' : ''
// 快捷键列表
export const shortcutKeyList = [
@@ -334,7 +333,7 @@ export const shortcutKeyList = [
{
icon: 'iconbianji',
name: '编辑节点',
value: macFn+'F2'
value: macFn + 'F2'
},
{
icon: 'iconhuanhang',
@@ -587,4 +586,4 @@ export const downTypeList = [
icon: 'iconTXT',
desc: '纯文本文件'
}
]
]

View File

@@ -70,7 +70,10 @@
class="fontOptionItem"
v-for="item in fontSizeList"
:key="item"
:style="{ fontSize: item + 'px' }"
:style="{
fontSize: item + 'px',
height: (item < 30 ? 30 : item + 10) + 'px'
}"
:class="{ active: formatInfo.size === item + 'px' }"
@click="changeFontSize(item)"
>
@@ -299,7 +302,7 @@ export default {
}
.fontOptionItem {
height: 50px;
height: 30px;
width: 100%;
display: flex;
align-items: center;