Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-04-27 18:08:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bc221bcab4e660a084bf05dbb1e011dc6cd00b3f
bc221bca
1 parent
b0b1c111
✨ feat(组件): 侧边悬浮快捷方式新增回首页功能
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
10 deletions
src/components/ToMe/index.vue → src/components/ShortcutFixed/index.vue
src/views/client/bookDetail.vue
src/views/client/chooseBook.vue
src/components/
ToMe
/index.vue
→
src/components/
ShortcutFixed
/index.vue
View file @
bc221bc
<template>
<div @click="handle">
<img class="icon-me" referrerpolicy="no-referrer" :src="icon_me" />
<div>
<img @click="toHome" class="icon-home" referrerpolicy="no-referrer" :src="icon_home" />
<img @click="toMe" class="icon-me" referrerpolicy="no-referrer" :src="icon_me" />
</div>
</template>
<script setup>
import icon_me from '@images/icon-my@2x.png'
import icon_home from '@images/icon-home@2x.png'
import { ref, reactive, onMounted } from 'vue'
const props = defineProps({
type: String
...
...
@@ -30,18 +33,34 @@ export default {
},
methods: {
toHome () {
// 返回首页
this.$router.push({
path: '/client/index'
});
},
toMe () {
alert('me')
}
}
}
</script>
<style lang="less" scoped>
.icon-home {
z-index: 169;
position: fixed;
right: 2rem;
bottom: 14rem;
width: 3rem;
height: 3rem;
}
.icon-me {
z-index: 169;
position: fixed;
right: 2rem;
bottom: 1
5%
;
width:
44px
;
height:
44px
;
bottom: 1
0rem
;
width:
3rem
;
height:
3rem
;
}
</style>
\ No newline at end of file
...
...
src/views/client/bookDetail.vue
View file @
bc221bc
...
...
@@ -85,7 +85,7 @@
<my-button @on-click="uploadVideo" type="primary">上传作品</my-button>
</div>
</div>
<
to-me @on-click="gotoMe()"></to-me
>
<
shortcut-fixed @on-click="gotoMe()"></shortcut-fixed
>
</div>
<!-- 上传作品时,如果没有实名认证提示弹框 -->
...
...
@@ -123,7 +123,7 @@ import icon_unsubscribe from '@images/icon-dingyue02@2x.png'
import icon_me from '@images/icon-my@2x.png'
import icon_notice from '@images/que-tishi@2x.png'
import
ToMe from '@/components/ToMe
/index.vue'
import
ShortcutFixed from '@/components/ShortcutFixed
/index.vue'
import tools from '@/common/tool'
import { ref, reactive, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
...
...
src/views/client/chooseBook.vue
View file @
bc221bc
...
...
@@ -26,14 +26,14 @@
</template>
</div>
<div style="height: 1rem;"></div>
<
to-me @on-click="gotoMe()"></to-me
>
<
shortcut-fixed @on-click="gotoMe()"></shortcut-fixed
>
</div>
</template>
<script setup>
import MyButton from '@/components/MyButton/index.vue'
import BookCard from '@/components/BookCard/index.vue'
import
ToMe from '@/components/ToMe
/index.vue'
import
ShortcutFixed from '@/components/ShortcutFixed
/index.vue'
import { ref, reactive, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
...
...
Please
register
or
login
to post a comment