diff --git a/examples/sites/public/static/css/design-common.css b/examples/sites/public/static/css/design-common.css index a3fb6c60c4..fd7e1e023f 100644 --- a/examples/sites/public/static/css/design-common.css +++ b/examples/sites/public/static/css/design-common.css @@ -553,3 +553,268 @@ height: 3.33333333vw; } } + +.tinyui-design-footer { + font-size: 16px; + color: #2c2e30; + background-color: #fafafa; + overflow: hidden; +} +.tinyui-design-footer .footer-content { + display: flex; + margin: 0 auto; + padding: 10vh 0 6.8vh; + justify-content: center; + width: 70%; + box-sizing: border-box; +} +.tinyui-design-footer .footer-content .contact { + width: fit-content; +} +.tinyui-design-footer .footer-content .contact .group-code { + margin: 30px 0; +} +.tinyui-design-footer .footer-content .contact .group-code > img { + width: 150px; + border: solid 0.55vw #f2f6f9; +} +.tinyui-design-footer .footer-content .links { + display: grid; + grid-template-columns: repeat(4, auto); + justify-content: space-between; + flex: 1 1 auto; +} +.tinyui-design-footer .footer-content .links .link-item .list-item { + width: 100%; + display: block; + text-decoration: none; + color: #2c2e30; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.tinyui-design-footer .footer-content .links .link-item .list-item:hover { + color: #2f5bea; +} +.tinyui-design-footer .footer-text-list { + font-size: 14px; + line-height: 39px; + white-space: nowrap; +} +.tinyui-design-footer .footer-title { + display: inline-block; + height: 22px; + line-height: 22px; + margin-left: 3px; + font-size: 16px; + font-weight: 600; + vertical-align: middle; +} +.tinyui-design-footer .footer-title-container { + margin-bottom: 17px; +} +.tinyui-design-footer .copyright { + height: 86px; + line-height: 1.8; + text-align: center; + font-size: 14px; + color: #fff; + background-color: #3e4345; + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; +} +.tinyui-design-footer .copyright p { + margin: 0; +} +.footer-logo-container { + position: relative; + padding-right: 4.7%; + margin-right: 4.7%; + box-sizing: border-box; +} +.footer-logo-container::after { + content: ''; + position: absolute; + display: block; + height: 135px; + border-right: 1px solid #979797; + opacity: 0.28; + top: 60px; + right: 0; +} +.footer-promotional-container { + margin: 10px 0; + padding-left: 1.05vw; +} +.footer-logo-link { + display: inline-block; + text-decoration: none; + cursor: pointer; + height: 38px; +} +.footer-logo-link-list { + height: 26px; + margin-right: 30px; +} +.footer-logo-link-list:last-child { + margin-right: 0; +} +.footer-logo-link-list img { + height: 100%; +} +.footer-promotional-label { + font-size: 14px; + height: 40px; + line-height: 40px; + white-space: nowrap; +} +.footer-logo-title { + display: inline-block; + height: 38px; + font-size: 21px; + font-weight: 700; + color: #242424; + margin-left: 0.53vw; +} +.footer-logo { + vertical-align: middle; + width: 53px; +} +.footer-logo-s { + vertical-align: middle; + width: 16px; +} +.footer-logolist-container { + margin-top: 10px; +} +.footer-logo-list { + margin-right: 1.46vw; +} +.icon-arrow { + display: none; + position: absolute; + top: 4px; + right: 0; + width: 16px; + height: 16px; + transform: rotate(0deg); + transition: all 0.3s ease-out; + transform-origin: center center; + background: url(assets/icon-arrow.png) no-repeat; + background-size: 100% 100%; +} +@media screen and (max-width: 1339px) { + .tinyui-design-footer .footer-content { + width: 84%; + } + .tinyui-design-footer .footer-content .contact .group-code > img { + width: 85px; + } +} +@media screen and (max-width: 1279px) { + .tinyui-design-footer .footer-content { + width: 96%; + } + .tinyui-design-footer .footer-logo-container { + padding-right: 2%; + margin-right: 2%; + } +} +@media screen and (max-width: 1023px) { + .tinyui-design-footer .footer-logo-container { + display: flex; + padding-right: 0; + margin-right: 0; + margin-bottom: 20px; + align-items: center; + flex-direction: column; + justify-content: center; + padding-bottom: 40px; + border-bottom: 1px solid #e5e6ea; + } + .tinyui-design-footer .footer-logo-container::after { + display: none; + } + .tinyui-design-footer .footer-logo-container .footer-logolist-container { + padding-left: 0; + } + .tinyui-design-footer .footer-logo-container .footer-promotional-container { + padding: 0; + margin-left: 0; + width: 100%; + text-align: center; + } + .tinyui-design-footer .footer-content { + flex-direction: column; + width: 100%; + padding: 50px 30px 20px; + } + .tinyui-design-footer .footer-content .links { + display: flex; + flex-direction: column; + align-items: center; + } + .tinyui-design-footer .footer-content .links .link-item { + text-align: center; + width: 100%; + border-bottom: 1px solid #e5e6ea; + } + .tinyui-design-footer .footer-content .links .link-item .list-item { + width: 100%; + } + .tinyui-design-footer .footer-content .links .link-item div { + width: 100%; + text-align: left; + } + .tinyui-design-footer .footer-content .contact { + width: 100%; + text-align: center; + display: flex; + flex-direction: column-reverse; + } + .tinyui-design-footer .footer-content .contact .group-code { + margin-left: 0; + margin: 30px auto 12px; + } + .tinyui-design-footer .footer-content .contact .footer-logo-s { + display: none; + } + .tinyui-design-footer .footer-content .contact .footer-title { + font-size: 16px; + color: #2c2e30; + line-height: 22px; + } + .tinyui-design-footer .footer-content .footer-text-list { + padding-left: 23px; + height: 0; + overflow: hidden; + transition: all 0.5s ease-out; + } + .tinyui-design-footer .footer-content .footer-text-list.current { + height: fit-content; + } + .tinyui-design-footer .footer-content .footer-title-container { + margin: 19px 0; + position: relative; + text-align: left; + } + .tinyui-design-footer .footer-content .footer-title-container .icon-arrow { + display: block; + } + .tinyui-design-footer .footer-content .footer-title-container.current .icon-arrow { + transform: rotate(180deg); + } + .tinyui-design-footer .copyright { + background: transparent; + border-top: 1px solid #e5e6ea; + } + .tinyui-design-footer .copyright p { + font-size: 12px; + text-align: center; + color: #2c2e30; + line-height: 21px; + margin: 0; + } +} diff --git a/examples/sites/public/static/images/footer/cli.svg b/examples/sites/public/static/images/footer/cli.svg new file mode 100644 index 0000000000..62082bfdf9 --- /dev/null +++ b/examples/sites/public/static/images/footer/cli.svg @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/examples/sites/public/static/images/footer/code-open.png b/examples/sites/public/static/images/footer/code-open.png new file mode 100644 index 0000000000..2ca3d1067c Binary files /dev/null and b/examples/sites/public/static/images/footer/code-open.png differ diff --git a/examples/sites/public/static/images/footer/footer-title-community.svg b/examples/sites/public/static/images/footer/footer-title-community.svg new file mode 100644 index 0000000000..cc0b82ca2e --- /dev/null +++ b/examples/sites/public/static/images/footer/footer-title-community.svg @@ -0,0 +1,13 @@ + + \ No newline at end of file diff --git a/examples/sites/public/static/images/footer/footer-title-help.svg b/examples/sites/public/static/images/footer/footer-title-help.svg new file mode 100644 index 0000000000..4a4c1e99dc --- /dev/null +++ b/examples/sites/public/static/images/footer/footer-title-help.svg @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/examples/sites/public/static/images/footer/footer-title-human.svg b/examples/sites/public/static/images/footer/footer-title-human.svg new file mode 100644 index 0000000000..e359b502b1 --- /dev/null +++ b/examples/sites/public/static/images/footer/footer-title-human.svg @@ -0,0 +1,15 @@ + + \ No newline at end of file diff --git a/examples/sites/public/static/images/footer/footer-title-resource.svg b/examples/sites/public/static/images/footer/footer-title-resource.svg new file mode 100644 index 0000000000..1d9814326e --- /dev/null +++ b/examples/sites/public/static/images/footer/footer-title-resource.svg @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/examples/sites/public/static/images/footer/pro.svg b/examples/sites/public/static/images/footer/pro.svg new file mode 100644 index 0000000000..7fc5602664 --- /dev/null +++ b/examples/sites/public/static/images/footer/pro.svg @@ -0,0 +1,15 @@ + + \ No newline at end of file diff --git a/examples/sites/public/static/images/footer/theme.svg b/examples/sites/public/static/images/footer/theme.svg new file mode 100644 index 0000000000..48b04a033d --- /dev/null +++ b/examples/sites/public/static/images/footer/theme.svg @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/examples/sites/public/static/js/design-common.js b/examples/sites/public/static/js/design-common.js index 07036fbdc2..816f62d7fb 100644 --- a/examples/sites/public/static/js/design-common.js +++ b/examples/sites/public/static/js/design-common.js @@ -31,6 +31,115 @@ const headerHtml = ` ` +const footerHtml = `
` + class DesignCommon { renderHeader() { document.getElementById('header').innerHTML = headerHtml @@ -40,7 +149,7 @@ class DesignCommon { document.head.append(link) } renderFooter() { - // 空方法,用于给官网执行,解决报错 + document.getElementById('footer').innerHTML = footerHtml } } window.TDCommon = DesignCommon diff --git a/examples/sites/src/views/components/components.vue b/examples/sites/src/views/components/components.vue index 1baa584124..ffe6be37ee 100644 --- a/examples/sites/src/views/components/components.vue +++ b/examples/sites/src/views/components/components.vue @@ -493,7 +493,7 @@ export default defineComponent({ }) } } - }, 600) + }, 0) } // 在singleDemo情况时,才需要滚动示例区域到顶 diff --git a/examples/sites/src/views/components/float-settings.vue b/examples/sites/src/views/components/float-settings.vue index cc88309477..c73b4af60b 100644 --- a/examples/sites/src/views/components/float-settings.vue +++ b/examples/sites/src/views/components/float-settings.vue @@ -200,17 +200,11 @@ export default defineComponent({ const nav = document.querySelector('.nav') if (docLayout) { docLayout.onscroll = debounce(100, false, () => { - const { - scrollTop: layoutScrollTop, - scrollHeight: layoutScrollHeight, - clientHeight: layoutHeight - } = docLayout + const { scrollTop: layoutScrollTop } = docLayout const headerHeight = docLayout.querySelector('header')?.clientHeight || 0 - const footerHeight = docLayout.querySelector('#footer')?.clientHeight || 0 const footerTop = footer.getBoundingClientRect().top const navHeight = nav?.clientHeight || 0 const currSettingsBottom = parseInt(window.getComputedStyle(floatSettings.value).getPropertyValue('bottom')) - const footerVisibleHeight = footerHeight - (layoutScrollHeight - layoutScrollTop - layoutHeight) state.showBackTop = layoutScrollTop > 500 state.showSettings = footerTop - navHeight - headerHeight > 220 @@ -218,11 +212,6 @@ export default defineComponent({ if (!state.initBottomVal) { state.initBottomVal = currSettingsBottom } - if (footerVisibleHeight > state.initBottomVal - 40) { - state.settingsStyle.bottom = `${footerVisibleHeight + 20}px` - } else { - state.settingsStyle.bottom = DEFAULT_BOTTOM_VAL - } }) } }) @@ -297,9 +286,10 @@ export default defineComponent({ border-radius: 12px; background-color: #fff; cursor: pointer; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16); &:hover { - box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15); + box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.16); .settings-icon { color: #191919; diff --git a/examples/sites/src/views/layout/layout.vue b/examples/sites/src/views/layout/layout.vue index 4b0f120a90..40c8c54d8f 100644 --- a/examples/sites/src/views/layout/layout.vue +++ b/examples/sites/src/views/layout/layout.vue @@ -153,17 +153,6 @@ export default defineComponent({ ) onMounted(async () => { - // 每次切换路由,有锚点则跳转到锚点,否则导航到顶部 - routerCbDestroy = router.afterEach((to) => { - if (to.hash) { - const el = document.querySelector(to.hash) - if (el) { - return el.scrollIntoView() - } - } - state.contentRef.scrollTo({ top: 0, behavior: 'auto' }) - }) - // 刷新后,高亮相应的菜单 const cmpId = router.currentRoute.value?.params?.cmpId if (cmpId) {