From 6499792a8a6237f4339997fb2267003afac6cfbf Mon Sep 17 00:00:00 2001 From: fengli Date: Tue, 30 Jan 2024 10:19:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=A4=A7=E5=9B=BE=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 搜索结果中大图不进行显示 Log: 修复搜索结果大图显示异常问题 --- src/controller/search_db.cpp | 9 +++++++++ src/web/toManual/sass/search.scss | 30 ++++++++++++++++++------------ src/web_dist/toManual/index.css | 17 +++-------------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/controller/search_db.cpp b/src/controller/search_db.cpp index b2e5afe8..bb33ddce 100644 --- a/src/controller/search_db.cpp +++ b/src/controller/search_db.cpp @@ -236,7 +236,12 @@ void SearchDb::addSearchEntry(const QString &app_name, const QString &lang, //正则替换所有的svg路径 QRegExp exp("src=\"([^>]*svg)\""); exp.setMinimal(true); + QRegExp expPng("src=\"..\/common([^>]*png)\""); + expPng.setMinimal(true); + content = content.replace(exp, QString("src=\"%1/%2\"").arg(strTemp).arg("\\1")); + if (content.contains("common")/* && !content.contains("fig")*/) + content = content.replace(expPng, QString("src=\"%1/../common%2\"").arg(strTemp).arg("\\1")); newContents.replace(i, content); } } @@ -667,9 +672,13 @@ void SearchDb::handleSearchContent(const QString &keyword) //新结构 QRegExp expFit(""); expFit.setMinimal(true); + //相对路径 + QRegExp expRelative(""); + expRelative.setMinimal(true); highlightContent.remove(expFit); highlightContent.remove(expJpg); + highlightContent.remove(expRelative); //处理内容是否省略.. omitHighlight(highlightContent, keyword); diff --git a/src/web/toManual/sass/search.scss b/src/web/toManual/sass/search.scss index bfb184ae..f8fd2298 100644 --- a/src/web/toManual/sass/search.scss +++ b/src/web/toManual/sass/search.scss @@ -124,22 +124,28 @@ vertical-align: middle; } - //png图片 &[src$='png'] { - $i: 0; + margin-top: -2px; + height: 18px; + vertical-align: middle; + } - @while $i<1 { - $i: $i+0.25; + //png图片 + // &[src$='png'] { + // $i: 0; - @media screen and (-webkit-min-device-pixel-ratio: 1+$i) { - zoom: 0.5/$i; - } - } + // @while $i<1 { + // $i: $i+0.25; - // margin-top: 26px; //搜索界面图片对其 - max-width: 99%; - cursor: pointer; - } + // @media screen and (-webkit-min-device-pixel-ratio: 1+$i) { + // zoom: 0.5/$i; + // } + // } + + // // margin-top: 26px; //搜索界面图片对其 + // max-width: 99%; + // cursor: pointer; + // } //jpg图片 &[src$='jpg'] { diff --git a/src/web_dist/toManual/index.css b/src/web_dist/toManual/index.css index 8be08251..c6972e92 100644 --- a/src/web_dist/toManual/index.css +++ b/src/web_dist/toManual/index.css @@ -657,20 +657,9 @@ body { height: 18px; vertical-align: middle; } #search .items .item img[src$='png'] { - max-width: 99%; - cursor: pointer; } - @media screen and (-webkit-min-device-pixel-ratio: 1.25) { - #search .items .item img[src$='png'] { - zoom: 2; } } - @media screen and (-webkit-min-device-pixel-ratio: 1.5) { - #search .items .item img[src$='png'] { - zoom: 1; } } - @media screen and (-webkit-min-device-pixel-ratio: 1.75) { - #search .items .item img[src$='png'] { - zoom: 0.66667; } } - @media screen and (-webkit-min-device-pixel-ratio: 2) { - #search .items .item img[src$='png'] { - zoom: 0.5; } } + margin-top: -2px; + height: 18px; + vertical-align: middle; } #search .items .item img[src$='jpg'] { max-width: 99%; cursor: pointer; From 40125dec524c2a4b261e063b802b3cc77b12ab86 Mon Sep 17 00:00:00 2001 From: fengli Date: Wed, 31 Jan 2024 17:53:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改字体颜色 Log: 修改字体颜色 Bug: https://pms.uniontech.com/bug-view-241593.html https://pms.uniontech.com/bug-view-241597.html --- src/web/toManual/js/App.js | 6 +++--- src/web_dist/toManual/index.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/web/toManual/js/App.js b/src/web/toManual/js/App.js index b318ce8d..285c668f 100755 --- a/src/web/toManual/js/App.js +++ b/src/web/toManual/js/App.js @@ -587,8 +587,8 @@ class App extends React.Component { document.documentElement.style.setProperty(`--body-color-white2black`, '#FFFFFF'); document.documentElement.style.setProperty(`--app-word-color`, '#414D68'); document.documentElement.style.setProperty(`--nav-background-color`, '#FFFFFF'); - document.documentElement.style.setProperty(`--nav-h2-word-color`, '#001A2E'); - document.documentElement.style.setProperty(`--nav-h3-word-color`, '#001A2E'); + document.documentElement.style.setProperty(`--nav-h2-word-color`, 'rgba(0, 0, 0, 0.85)'); + document.documentElement.style.setProperty(`--nav-h3-word-color`, 'rgba(0, 0, 0, 0.7)'); document.documentElement.style.setProperty('--nav-hove-word-color', '#000000'); document.documentElement.style.setProperty('--nav-hove-border-color', 'rgba(0, 0, 0, 0.05)'); // document.documentElement.style.setProperty(`--nav-hash-word-color`, '#ca0c16'); //btn list 改这一行 @@ -599,7 +599,7 @@ class App extends React.Component { document.documentElement.style.setProperty(`--article-table-cell-border-color`, 'rgba(0, 0, 0, 0.05)'); document.documentElement.style.setProperty(`--index-item-background-color`, '#FFFFFF'); document.documentElement.style.setProperty(`--index-item-hover-color`, 'rgba(0,0,0,0.05)'); - document.documentElement.style.setProperty(`--index-item-span-word-color`, '#414D68'); + document.documentElement.style.setProperty(`--index-item-span-word-color`, 'rgba(0, 0, 0, 0.7)'); document.documentElement.style.setProperty(`--search-noresult-word-color`, '#000000'); document.documentElement.style.setProperty(`--search-button-word-color`, '#414D68'); document.documentElement.style.setProperty(`--search-button-hover-word-color`, '#001B2E'); diff --git a/src/web_dist/toManual/index.js b/src/web_dist/toManual/index.js index 556e1d0e..71b25c96 100644 --- a/src/web_dist/toManual/index.js +++ b/src/web_dist/toManual/index.js @@ -667,8 +667,8 @@ var App = function (_React$Component) { document.documentElement.style.setProperty('--body-color-white2black', '#FFFFFF'); document.documentElement.style.setProperty('--app-word-color', '#414D68'); document.documentElement.style.setProperty('--nav-background-color', '#FFFFFF'); - document.documentElement.style.setProperty('--nav-h2-word-color', '#001A2E'); - document.documentElement.style.setProperty('--nav-h3-word-color', '#001A2E'); + document.documentElement.style.setProperty('--nav-h2-word-color', 'rgba(0, 0, 0, 0.85)'); + document.documentElement.style.setProperty('--nav-h3-word-color', 'rgba(0, 0, 0, 0.7)'); document.documentElement.style.setProperty('--nav-hove-word-color', '#000000'); document.documentElement.style.setProperty('--nav-hove-border-color', 'rgba(0, 0, 0, 0.05)'); // document.documentElement.style.setProperty(`--nav-hash-word-color`, '#ca0c16'); //btn list 改这一行 @@ -679,7 +679,7 @@ var App = function (_React$Component) { document.documentElement.style.setProperty('--article-table-cell-border-color', 'rgba(0, 0, 0, 0.05)'); document.documentElement.style.setProperty('--index-item-background-color', '#FFFFFF'); document.documentElement.style.setProperty('--index-item-hover-color', 'rgba(0,0,0,0.05)'); - document.documentElement.style.setProperty('--index-item-span-word-color', '#414D68'); + document.documentElement.style.setProperty('--index-item-span-word-color', 'rgba(0, 0, 0, 0.7)'); document.documentElement.style.setProperty('--search-noresult-word-color', '#000000'); document.documentElement.style.setProperty('--search-button-word-color', '#414D68'); document.documentElement.style.setProperty('--search-button-hover-word-color', '#001B2E');