修复问题

This commit is contained in:
lyswhut
2021-12-04 17:25:21 +08:00
parent 9afafec9d6
commit 60e606a413
13 changed files with 62 additions and 83 deletions
+10 -2
View File
@@ -160,6 +160,9 @@ export default {
created() {
this.setPrevSelectListId(this.listId)
},
mounted() {
this.setListsScroll()
},
methods: {
...mapMutations('list', [
'setUserListName',
@@ -174,6 +177,13 @@ export default {
...mapActions('leaderboard', {
getBoardListAll: 'getListAll',
}),
setListsScroll() {
let target = this.$refs.dom_lists_list.querySelector('.' + this.$style.active)
if (!target) return
let offsetTop = target.offsetTop
let location = offsetTop - 150
if (location > 0) this.$refs.dom_lists_list.scrollTop = location
},
handleListsSave(index, event) {
let dom_target = this.$refs.dom_lists_list.querySelector('.' + this.$style.editing)
if (dom_target) dom_target.classList.remove(this.$style.editing)
@@ -351,8 +361,6 @@ export default {
})
},
handleImportList(index) {
const list = this.getTargetListInfo(index)
selectDir({
title: this.$t('lists__import_part_desc'),
properties: ['openFile'],