From 75a8a34d9693bb70f31d49550aad886feedcf329 Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Mon, 14 Feb 2022 17:06:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9B=E6=96=B0=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/NewPlatform/Children/Develop.vue | 5 +- src/views/NewPlatform/Children/Index.vue | 67 ++++++++++++--------- src/views/NewPlatform/Children/Share.vue | 27 +++------ src/views/NewPlatform/Children/Transfer.vue | 17 ++---- 4 files changed, 54 insertions(+), 62 deletions(-) diff --git a/src/views/NewPlatform/Children/Develop.vue b/src/views/NewPlatform/Children/Develop.vue index 14b7308..c3310fd 100644 --- a/src/views/NewPlatform/Children/Develop.vue +++ b/src/views/NewPlatform/Children/Develop.vue @@ -16,9 +16,8 @@
diff --git a/src/views/NewPlatform/Children/Index.vue b/src/views/NewPlatform/Children/Index.vue index cea5b54..5ce1721 100644 --- a/src/views/NewPlatform/Children/Index.vue +++ b/src/views/NewPlatform/Children/Index.vue @@ -23,12 +23,21 @@ @@ -172,12 +181,12 @@ export default { }; }, - watch:{ - $route(to){ - if(to.hash){ - this.setJump(to.hash) + watch: { + $route(to) { + if (to.hash) { + this.setJump(to.hash); } - } + }, }, computed: mapState('home', ['partners']), @@ -215,10 +224,10 @@ export default { mounted() { this.$nextTick(() => { - if(this.$route.hash){ - this.setJump(this.$route.hash) + if (this.$route.hash) { + this.setJump(this.$route.hash); } - }) + }); }, methods: { @@ -226,30 +235,30 @@ export default { ...mapMutations('home', ['setPartners']), ...mapActions('home', ['getFrontSearchCompany']), - setJump(hash){ - if(hash === '#mao1'){ + setJump(hash) { + if (hash === '#mao1') { this.$nextTick(() => { - this.changeIndex(0) - document.getElementById('mao1').scrollIntoView(true) - }) + this.changeIndex(0); + document.getElementById('mao1').scrollIntoView(true); + }); } - if(hash === '#mao2'){ + if (hash === '#mao2') { this.$nextTick(() => { - this.changeIndex(1) - document.getElementById('mao2').scrollIntoView(true) - }) + this.changeIndex(1); + document.getElementById('mao2').scrollIntoView(true); + }); } - if(hash === '#mao3'){ + if (hash === '#mao3') { this.$nextTick(() => { - this.changeIndex(2) - document.getElementById('mao3').scrollIntoView(true) - }) + this.changeIndex(2); + document.getElementById('mao3').scrollIntoView(true); + }); } - if(hash === '#mao4'){ + if (hash === '#mao4') { this.$nextTick(() => { - this.changeIndex(3) - document.getElementById('mao4').scrollIntoView(true) - }) + this.changeIndex(3); + document.getElementById('mao4').scrollIntoView(true); + }); } }, diff --git a/src/views/NewPlatform/Children/Share.vue b/src/views/NewPlatform/Children/Share.vue index 102b62a..0980924 100644 --- a/src/views/NewPlatform/Children/Share.vue +++ b/src/views/NewPlatform/Children/Share.vue @@ -16,9 +16,8 @@ @@ -33,17 +32,12 @@ @click="choose(index, 0)" class="ins-name" v-for="(item, index) in laboratory" - >{{ item.name }} + >{{ item.name }}