diff --git a/nuxt.config.ts b/nuxt.config.ts index a86936d..c6701d9 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -12,6 +12,7 @@ export default defineNuxtConfig({ hooks: resolve(__dirname, './hooks'), apis: resolve(__dirname, './apis'), store: resolve(__dirname, './store'), + public: resolve(__dirname, './public'), }, meta: { meta: [ diff --git a/pages/index.vue b/pages/index.vue index 0df7e96..91c777f 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,34 +1,46 @@ @@ -48,6 +60,17 @@ function onClickLeft(){ console.log('返回上一页') } +function jump(index) { + let jump = document.querySelectorAll('.d_jump') + // 获取需要滚动的距离 + let total = jump[index].offsetTop + // Chrome + document.body.scrollTop = total + // Firefox + document.documentElement.scrollTop = total + // Safari + window.pageYOffset = total +} diff --git a/public/statistics.png b/public/statistics.png new file mode 100644 index 0000000..c7d13fc Binary files /dev/null and b/public/statistics.png differ