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 isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0
const ctrl = isMac?'⌘':'Ctrl'; const ctrl = isMac ? '⌘' : 'Ctrl'
const enter = isMac?'Return':'Enter'; const enter = isMac ? 'Return' : 'Enter'
const macFn = isMac?'fn + ':''; const macFn = isMac ? 'fn + ' : ''
// 背景图片大小 // 背景图片大小
export const backgroundSizeList = [ export const backgroundSizeList = [
@ -268,7 +267,7 @@ export const shortcutKeyList = [
{ {
icon: 'iconbianji', icon: 'iconbianji',
name: 'Edit node', name: 'Edit node',
value: macFn+'F2' value: macFn + 'F2'
}, },
{ {
icon: 'iconhuanhang', icon: 'iconhuanhang',
@ -364,7 +363,7 @@ export const shortcutKeyList = [
icon: 'icondodeparent', icon: 'icondodeparent',
name: 'Move up one level', name: 'Move up one level',
value: 'Shift + Tab' value: 'Shift + Tab'
}, }
] ]
} }
] ]

View File

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

View File

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