diff --git a/web/src/config/en.js b/web/src/config/en.js index 9b94f77a..7cc8930e 100644 --- a/web/src/config/en.js +++ b/web/src/config/en.js @@ -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' } -] \ No newline at end of file +] diff --git a/web/src/config/zh.js b/web/src/config/zh.js index 38b3472f..07e8940b 100644 --- a/web/src/config/zh.js +++ b/web/src/config/zh.js @@ -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: '纯文本文件' } -] \ No newline at end of file +] diff --git a/web/src/pages/Edit/components/RichTextToolbar.vue b/web/src/pages/Edit/components/RichTextToolbar.vue index 04374f8d..a319cbb7 100644 --- a/web/src/pages/Edit/components/RichTextToolbar.vue +++ b/web/src/pages/Edit/components/RichTextToolbar.vue @@ -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;