refs #228 Fix loading circle in sidebar
This commit is contained in:
parent
35a16de084
commit
d02b17fe13
|
@ -2,11 +2,14 @@
|
||||||
<transition name="slide-detail">
|
<transition name="slide-detail">
|
||||||
<div id="side_bar" v-if="openSideBar">
|
<div id="side_bar" v-if="openSideBar">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
<i class="el-icon-loading" v-show="loading"></i>
|
||||||
<i class="el-icon-close" @click="close"></i>
|
<i class="el-icon-close" @click="close"></i>
|
||||||
</div>
|
</div>
|
||||||
<account-profile v-if="component === 1"></account-profile>
|
<div class="scrollable">
|
||||||
|
<account-profile v-if="component === 1" v-on:change-loading="changeLoading"></account-profile>
|
||||||
<toot-detail v-if="component === 2"></toot-detail>
|
<toot-detail v-if="component === 2"></toot-detail>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -21,6 +24,11 @@ export default {
|
||||||
TootDetail,
|
TootDetail,
|
||||||
AccountProfile
|
AccountProfile
|
||||||
},
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
openSideBar: state => state.TimelineSpace.Contents.SideBar.openSideBar,
|
openSideBar: state => state.TimelineSpace.Contents.SideBar.openSideBar,
|
||||||
|
@ -33,6 +41,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
close () {
|
close () {
|
||||||
this.$store.dispatch('TimelineSpace/Contents/SideBar/close')
|
this.$store.dispatch('TimelineSpace/Contents/SideBar/close')
|
||||||
|
},
|
||||||
|
changeLoading (value) {
|
||||||
|
this.loading = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +56,6 @@ export default {
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 320px;
|
width: 320px;
|
||||||
height: calc(100% - 48px);
|
height: calc(100% - 48px);
|
||||||
overflow: auto;
|
|
||||||
border-left: solid 1px var(--theme-border-color);
|
border-left: solid 1px var(--theme-border-color);
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
@ -54,11 +64,18 @@ export default {
|
||||||
border-top: solid 1px var(--theme-border-color);
|
border-top: solid 1px var(--theme-border-color);
|
||||||
border-bottom: solid 1px var(--theme-border-color);
|
border-bottom: solid 1px var(--theme-border-color);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
height: 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
.el-icon-close {
|
.el-icon-close {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scrollable {
|
||||||
|
overflow: auto;
|
||||||
|
height: calc(100% - 30px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-detail-enter-active, .slide-detail-leave-active {
|
.slide-detail-enter-active, .slide-detail-leave-active {
|
||||||
|
|
|
@ -112,6 +112,9 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
account: function () {
|
account: function () {
|
||||||
this.activeTab = 1
|
this.activeTab = 1
|
||||||
|
},
|
||||||
|
loading: function (newState, oldState) {
|
||||||
|
this.$emit('change-loading', newState)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -171,8 +174,6 @@ function findLink (target) {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
#account_profile {
|
#account_profile {
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.header-background {
|
.header-background {
|
||||||
background-position: 50% 50%;
|
background-position: 50% 50%;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
Loading…
Reference in New Issue