Browse Source
Merge pull request #344 from flowerField/master
Sheetrightclickconfig optimization
master
文顶顶
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
15 additions and
1 deletions
-
src/controllers/constant.js
-
src/controllers/sheetBar.js
-
src/css/luckysheet-core.css
|
|
|
@ -625,6 +625,12 @@ function sheetconfigHTML(){ |
|
|
|
|
|
|
|
const config = customSheetRightClickConfig(); |
|
|
|
|
|
|
|
/* 如果配置项全部为flase,则隐藏入口且不再菜单项 */ |
|
|
|
if(Object.values(config).every(ele=> !ele)){ |
|
|
|
$('#luckysheet-sheet-container-c').addClass("luckysheet-sheet-container-menu-hide"); |
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
let hideTopMenuseparator = true; |
|
|
|
let moveTopMenuseparator = true; |
|
|
|
|
|
|
|
|
|
|
|
@ -112,7 +112,8 @@ function showsheetconfigmenu() { |
|
|
|
|
|
|
|
// 如果全部按钮设置了隐藏,则不显示
|
|
|
|
const config = luckysheetConfigsetting.sheetRightClickConfig; |
|
|
|
if(!config.delete && !config.copy && !config.rename && !config.color && !config.hide && !config.move){ |
|
|
|
// if(!config.delete && !config.copy && !config.rename && !config.color && !config.hide && !config.move){
|
|
|
|
if(Object.values(config).every(ele=> !ele)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1109,6 +1109,13 @@ div.luckysheet-sheets-m:hover { |
|
|
|
display: inline-block; |
|
|
|
} |
|
|
|
|
|
|
|
.luckysheet-sheet-container-menu-hide .luckysheet-sheets-item{ |
|
|
|
padding-right: 5px !important; |
|
|
|
} |
|
|
|
|
|
|
|
.luckysheet-sheet-container-menu-hide .luckysheet-sheets-item-menu{ |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
|
|
|
|
.luckysheet-sheet-area div.luckysheet-sheets-item { |
|
|
|
padding: 2px 6px; |
|
|
|
|