From d0f9fa0144693a4c11512152a3c0371bd2d0d3bb Mon Sep 17 00:00:00 2001 From: Araozu Date: Mon, 26 Oct 2020 10:39:37 -0500 Subject: [PATCH] Reducida la cantidad de variables in-line --- src/components/carta.vue | 25 ++++----- src/variables.ts | 6 +-- src/views/Juego/Juego.vue | 34 ++++++------ .../Juego/components/contenedor-cartas.vue | 53 +++++++++++++++++++ .../Juego/components/contenedor-descartes.vue | 9 ++-- .../Juego/components/contenedor-dora.vue | 22 ++++---- src/views/Juego/components/mano.vue | 8 ++- src/views/Juego/types/Mano.ts | 3 ++ 8 files changed, 102 insertions(+), 58 deletions(-) create mode 100644 src/views/Juego/components/contenedor-cartas.vue diff --git a/src/components/carta.vue b/src/components/carta.vue index 78bb158..5ba5348 100644 --- a/src/components/carta.vue +++ b/src/components/carta.vue @@ -42,19 +42,13 @@ export default defineComponent({ type: Function, required: false }, - escala: { - type: Number, - default: 1 - }, resaltarCarta: { type: Boolean, default: true } }, setup(props) { - const {pH} = useDimensions(); const store = useStore(); - const pxesc = computed(() => pH.value + "px"); const valorR = computed(() => props.valor); const {esOscuro} = getEsOscuro(store); @@ -168,30 +162,29 @@ export default defineComponent({ claseResaltado, fnDescartar, aplicarResaltadoCarta, - quitarResaltadoCarta, - pxesc + quitarResaltadoCarta } } }); - diff --git a/src/views/Juego/components/contenedor-descartes.vue b/src/views/Juego/components/contenedor-descartes.vue index 36829cb..6ac4ab7 100644 --- a/src/views/Juego/components/contenedor-descartes.vue +++ b/src/views/Juego/components/contenedor-descartes.vue @@ -1,7 +1,7 @@ @@ -44,22 +44,19 @@ export default defineComponent({ } }, setup(props) { - const {phx} = useDimensions(); - const grupoCartas = computed(() => splitArray(props.cartas as number[], 6)); const claseTurnoActual = computed(() => props.esTurnoActual? "cont-cuadrante-descarte-turno-actual": ""); return { grupoCartas, - claseTurnoActual, - phx + claseTurnoActual } } }); -