From a604a04546381401641aa7c19bdaa189fd4d1dda Mon Sep 17 00:00:00 2001 From: fofolee Date: Fri, 10 Apr 2020 17:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/options.css | 13 ++++++------- assets/options.js | 12 ++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/assets/options.css b/assets/options.css index f16d819..eed00de 100644 --- a/assets/options.css +++ b/assets/options.css @@ -137,12 +137,18 @@ #options table { border-collapse: collapse; + table-layout:fixed; width: 100%; } #options table td { border-collapse: collapse; padding: 3px; + margin-right: 15px; + word-break:keep-all; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; } #options table tr:nth-child(odd) { @@ -166,13 +172,6 @@ margin-right: 5px; } -#options div.cmds { - width: 260px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - #options .keyword.re { color: rgb(105, 40, 97); } diff --git a/assets/options.js b/assets/options.js index dd4c29a..619f94b 100644 --- a/assets/options.js +++ b/assets/options.js @@ -135,14 +135,18 @@ programs = { showOptions = () => { var currentFts = utools.getFeatures(), customFts = getCustomFts(); - let featureList = ''; + let featureList = '
模式说明启用
'; for (var fts in customFts) { let features = customFts[fts].features; var cmds = ''; if (features.cmds[0].type == 'regex') { - cmds = `正则: ${features.cmds[0].match}`; + var reg = features.cmds[0].match; + if (reg.length > 15) reg = reg.slice(0, 15) + '...'; + cmds = `正则: ${reg}`; } else if (features.cmds[0].type == 'window') { - cmds = `窗口: ${features.cmds[0].match.app}`; + var app = features.cmds[0].match.app + if (app.length > 15) app = app.slice(0, 15) + '...'; + cmds = `窗口: ${app}`; } else { features.cmds.forEach(cmd => { cmds += `${cmd}`; @@ -161,7 +165,7 @@ showOptions = () => { window.messageBox({ type: 'error', icon: window.logo, message: e.toString(), buttons: ['啊嘞?!'] }) } featureList += ` -
模式说明启用
${cmds}
${features.explain} + ${cmds}${features.explain}