diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 9763fc8eb1f12e597f449da4cfb8f51ae48870f9..dd867d6e6c6786a52cbc6a6679b4c4db519e87cd 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 f9e2fda1d906918019a574f692bc419a545b48ba..3860057856c3212826d328bab94ba800fa13a29e 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 da1f62887438a65cad374a799ce2b94ff459a63c..6fe175b513610c3e174137097a88127063bd917e 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 = () => { }); }); }; -