|
|
|
@ -2,14 +2,14 @@ |
|
|
|
<div class="col-md-6 text-left painel" id="resultado_votacao_div" v-if="canRender"> |
|
|
|
<div class="d-flex align-items-left justify-content-left mb-2"> |
|
|
|
<h2 class="text-subtitle mb-0">Resultado</h2> |
|
|
|
<button class="btn btn-sm btn-secondary ms-2" onclick="changeFontSize('box_votacao', -1)"> |
|
|
|
<button class="btn btn-sm btn-secondary ms-2" v-on:click="changeFontSize(-1)"> |
|
|
|
A- |
|
|
|
</button> |
|
|
|
<button class="btn btn-sm btn-secondary ms-2" onclick="changeFontSize('box_votacao', 1)"> |
|
|
|
<button class="btn btn-sm btn-secondary ms-2" v-on:click="changeFontSize(1)"> |
|
|
|
A+ |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
<div id="box_votacao"> |
|
|
|
<div ref="votacao" id="box_votacao"> |
|
|
|
<div id="votacao" class="text-value"> |
|
|
|
<li>Sim: {{ resultado.numero_votos.votos_sim }}</li> |
|
|
|
<li>Não: {{ resultado.numero_votos.votos_nao }}</li> |
|
|
|
@ -51,6 +51,15 @@ export default { |
|
|
|
return this.sessao_aberta && this.painel_aberto; |
|
|
|
}, |
|
|
|
...mapState(["painel_aberto", "sessao_aberta", "resultado"]) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
changeFontSize(value) { |
|
|
|
const el = this.$refs.votacao; |
|
|
|
if (!el) return; |
|
|
|
let fontSize = window.getComputedStyle(el).fontSize; |
|
|
|
fontSize = parseFloat(fontSize); // safely convert "16px" → 16 |
|
|
|
el.style.fontSize = (fontSize + value) + 'px'; |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|