1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-02-03 10:47:34 +01:00

refs #1936 Fix compose window height when add poll options

This commit is contained in:
AkiraFukushima 2020-12-01 00:14:37 +09:00
parent 8553e866e2
commit d145353c3e

View File

@ -407,11 +407,17 @@ export default {
this.statusHeight = this.statusHeight + previousHeight
}
},
addPoll() {
this.polls.push('')
async addPoll() {
const previousPollHeight = this.$refs.poll.$el.offsetHeight
await this.polls.push('')
const diff = this.$refs.poll.$el.offsetHeight - previousPollHeight
this.statusHeight = this.statusHeight - diff
},
removePoll(id) {
this.polls.splice(id, 1)
async removePoll(id) {
const previousPollHeight = this.$refs.poll.$el.offsetHeight
await this.polls.splice(id, 1)
const diff = previousPollHeight - this.$refs.poll.$el.offsetHeight
this.statusHeight = this.statusHeight + diff
},
changeExpire(obj) {
this.pollExpire = obj