From 7092b7cd25fed866c7eddedec4856ca85a247d4f Mon Sep 17 00:00:00 2001 From: wuming230 <1819845645@qq.com> Date: Wed, 19 Mar 2025 11:00:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BE=E7=89=87=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=A7=84=E5=88=99=E6=8A=A5=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config.ts | 11 ++++------- .../.vitepress/src/assets/style/markdown.scss | 7 +++++++ .../src/components/FloatingButtonDocs.vue | 19 +++++++++++-------- .../feedback/FloatingButtonHome.vue | 2 +- docs/.vitepress/src/layouts/LayoutDoc.vue | 4 ++-- docs/.vitepress/src/views/home/TheHome.vue | 6 +++--- 6 files changed, 28 insertions(+), 21 deletions(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 9763fc8..dd867d6 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -101,14 +101,11 @@ export default { return `${tag === 'h1' || tag === 'h2' ? '' : ''}${self.renderToken(tokens, idx, options)}`; }; // 图片 - /* md.renderer.rules.image = (tokens, idx) => { - const content = tokens[idx]; - const src = content.attrs[content.attrIndex('src')][1]; - console.log(src); - const alt = content.content || ''; - const el = `
${alt}
`; + const imageRender = md.renderer.rules.image; + md.renderer.rules.image = (...args) => { + const el = `
${imageRender!!(...args)}
`; return el; - }; */ + }; }, }, }; diff --git a/docs/.vitepress/src/assets/style/markdown.scss b/docs/.vitepress/src/assets/style/markdown.scss index f9e2fda..3860057 100644 --- a/docs/.vitepress/src/assets/style/markdown.scss +++ b/docs/.vitepress/src/assets/style/markdown.scss @@ -383,6 +383,13 @@ opacity: 1; } } + + @include respond-to('phone') { + .img-expand-btn, + .img-mask { + display: none; + } + } } .img-expand-not { diff --git a/docs/.vitepress/src/components/FloatingButtonDocs.vue b/docs/.vitepress/src/components/FloatingButtonDocs.vue index da1f628..6fe175b 100644 --- a/docs/.vitepress/src/components/FloatingButtonDocs.vue +++ b/docs/.vitepress/src/components/FloatingButtonDocs.vue @@ -51,12 +51,12 @@ const closePopup = () => { watch( () => showPopup.value, () => { - multiRate.forEach(item => { + multiRate.forEach((item) => { item.value = 0; item.isChange = false; - }) + }); } -) +); const STEP = 1; const RATE_MAX = 10; @@ -180,6 +180,9 @@ const change = (visible: boolean) => { const cancelScore = () => { scoreVisible.value = false; + multiRate.forEach((item) => { + item.value = 0; + }); }; const submitScore = () => {}; @@ -209,10 +212,10 @@ onUnmounted(() => { const submitArticleFeedback = () => { const postData: FeedBackDataT = { feedbackPageUrl: window.location.href, - efficiency: multiRate[0].value, - accuracy: multiRate[1].value, - completeness: multiRate[2].value, - usability: multiRate[3].value, + efficiency: isPhone ? multiRate[0].value * 2 : multiRate[0].value, + accuracy: isPhone ? multiRate[1].value * 2 : multiRate[1].value, + completeness: isPhone ? multiRate[2].value * 2 : multiRate[2].value, + usability: isPhone ? multiRate[3].value * 2 : multiRate[3].value, }; postArticleFeedback(postData) @@ -222,6 +225,7 @@ const submitArticleFeedback = () => { content: '提交成功,感谢您的反馈!', }); showPopup.value = false; + cancelScore(); } else { message.warning({ content: '提交失败,请刷新页面后重新提交!', @@ -234,7 +238,6 @@ const submitArticleFeedback = () => { }); }); }; -