parent
d95de24df5
commit
9bfa2cf013
|
@ -41,6 +41,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { store } from '../../_store/store'
|
import { store } from '../../_store/store'
|
||||||
import { registerClickDelegate, unregisterClickDelegate } from '../../_utils/delegate'
|
import { registerClickDelegate, unregisterClickDelegate } from '../../_utils/delegate'
|
||||||
|
import { mark, stop } from '../../_utils/marks'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
oncreate() {
|
oncreate() {
|
||||||
|
@ -56,11 +57,13 @@
|
||||||
methods: {
|
methods: {
|
||||||
onClickSpoilerButton() {
|
onClickSpoilerButton() {
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
|
mark('clickSpoilerButton')
|
||||||
let uuid = this.get('uuid')
|
let uuid = this.get('uuid')
|
||||||
let $spoilersShown = this.store.get('spoilersShown')
|
let $spoilersShown = this.store.get('spoilersShown')
|
||||||
$spoilersShown[uuid] = !$spoilersShown[uuid]
|
$spoilersShown[uuid] = !$spoilersShown[uuid]
|
||||||
this.store.set({'spoilersShown': $spoilersShown})
|
this.store.set({'spoilersShown': $spoilersShown})
|
||||||
this.fire('recalculateHeight')
|
this.fire('recalculateHeight')
|
||||||
|
stop('clickSpoilerButton')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue