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 = `
`; + const imageRender = md.renderer.rules.image; + md.renderer.rules.image = (...args) => { + const el = ` `; 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 = () => { }); }); }; - diff --git a/docs/.vitepress/src/components/feedback/FloatingButtonHome.vue b/docs/.vitepress/src/components/feedback/FloatingButtonHome.vue index 6e89277997f87cec3befc0511713ea0eba4f462d..f4855f3190866a283df1e066373de6f4606001df 100644 --- a/docs/.vitepress/src/components/feedback/FloatingButtonHome.vue +++ b/docs/.vitepress/src/components/feedback/FloatingButtonHome.vue @@ -64,7 +64,7 @@ const floatData = ref([ return isDark.value ? IconQuickIssue_dark : IconQuickIssue_light; }), id: 'quickIssue', - text: 'Quick', + text: 'QuickIssue', text2: 'Issue', textMb: 'QuickIssue', tip: '快捷提交/查询社区Issues', diff --git a/docs/.vitepress/src/layouts/LayoutDoc.vue b/docs/.vitepress/src/layouts/LayoutDoc.vue index 934310d688eb45fbf16b2157d068c54a23e899f7..c7855680251359da7b619b34fdc14a1501e24321 100644 --- a/docs/.vitepress/src/layouts/LayoutDoc.vue +++ b/docs/.vitepress/src/layouts/LayoutDoc.vue @@ -406,9 +406,9 @@ onMounted(() => { image.src = `${img.src}?time=${new Date().getTime()}`; image.onload = () => { if (img.clientWidth < 200) { - img.parentElement.classList.add('img-expand-not'); + img.parentElement?.classList.add('img-expand-not'); } else { - const btn = img.parentElement.querySelector('.img-expand-btn'); + const btn = img.parentElement?.querySelector('.img-expand-btn'); btn.addEventListener('click', () => { zoomWidth.value = img.naturalWidth; zoomHeight.value = img.naturalHeight; diff --git a/docs/.vitepress/src/views/home/TheHome.vue b/docs/.vitepress/src/views/home/TheHome.vue index bc7491f48942fde8f83c65503f18432c0a2ee2b9..cbf49ee07b0a549d1c3e352c146bc320b2191f4b 100644 --- a/docs/.vitepress/src/views/home/TheHome.vue +++ b/docs/.vitepress/src/views/home/TheHome.vue @@ -77,6 +77,7 @@ const hotSearch = (val: string) => {