11<script setup>
2- import { ref , onMounted , onUnmounted , nextTick , watch } from ' vue'
3- import SimplexInput from ' ./components/SimplexInput.vue'
4- import SimplexSolution from ' ./components/SimplexSolution.vue'
5- import TransporteInput from ' ./components/TransporteInput.vue'
6- import CompararTodos from ' ./components/CompararTodos.vue'
2+ import { ref , onMounted , onUnmounted , nextTick , watch , defineAsyncComponent } from ' vue'
73import { vRipple } from ' ./directives/ripple.js'
84
5+ const SimplexInput = defineAsyncComponent (() => import (' ./components/SimplexInput.vue' ))
6+ const SimplexSolution = defineAsyncComponent (() => import (' ./components/SimplexSolution.vue' ))
7+ const TransporteInput = defineAsyncComponent (() => import (' ./components/TransporteInput.vue' ))
8+ const CompararTodos = defineAsyncComponent (() => import (' ./components/CompararTodos.vue' ))
9+
910// ===== ESTADO REACTIVO =====
1011const numVariables = ref (2 )
1112const numConstraints = ref (2 )
@@ -142,10 +143,10 @@ watch(currentView, (newVal) => {
142143 </div >
143144 <button
144145 v-ripple
145- @click =" startSolving('simplex')"
146146 class =" btn-method btn-simplex"
147147 aria-label =" Resolver con Método Simplex"
148148 :aria-busy =" currentView === 'simplex'"
149+ @click =" startSolving('simplex')"
149150 >
150151 Resolver con Simplex
151152 </button >
@@ -167,9 +168,9 @@ watch(currentView, (newVal) => {
167168 </div >
168169 <button
169170 v-ripple
170- @click =" startSolving('grafico')"
171171 class =" btn-method btn-graphic"
172172 aria-label =" Resolver con Método Gráfico"
173+ @click =" startSolving('grafico')"
173174 >
174175 Resolver con Gráfico
175176 </button >
@@ -191,9 +192,9 @@ watch(currentView, (newVal) => {
191192 </div >
192193 <button
193194 v-ripple
194- @click =" startSolving('penalizacion')"
195195 class =" btn-method btn-penalty"
196196 aria-label =" Resolver con Métodos de Transporte"
197+ @click =" startSolving('penalizacion')"
197198 >
198199 Resolver Transporte
199200 </button >
@@ -209,9 +210,9 @@ watch(currentView, (newVal) => {
209210 </div >
210211 <button
211212 v-ripple
212- @click =" startSolving('todos')"
213213 class =" btn-compare-all"
214214 aria-label =" Comparar todos los métodos disponibles"
215+ @click =" startSolving('todos')"
215216 >
216217 Comparar Todos los Métodos
217218 </button >
@@ -280,21 +281,21 @@ watch(currentView, (newVal) => {
280281 <section v-else class =" method-view" role =" region" aria-label =" Resolución de problemas" >
281282 <!-- Navigation Bar -->
282283 <nav class =" method-navigation" role =" navigation" aria-label =" Métodos disponibles" >
283- <button
284- @click =" backToWelcome"
284+ <button
285285 class =" nav-back-btn"
286286 aria-label =" Volver a inicio"
287+ @click =" backToWelcome"
287288 >
288289 ← Inicio
289290 </button >
290291
291292 <!-- Mobile Hamburger Button -->
292- <button
293- class =" hamburger-btn"
294- @click =" mobileMenuOpen = !mobileMenuOpen"
293+ <button
294+ class =" hamburger-btn"
295295 :class =" { open: mobileMenuOpen }"
296296 :aria-expanded =" mobileMenuOpen"
297297 aria-label =" Menú de métodos"
298+ @click =" mobileMenuOpen = !mobileMenuOpen"
298299 >
299300 <span class =" hamburger-line" aria-hidden =" true" ></span >
300301 <span class =" hamburger-line" aria-hidden =" true" ></span >
@@ -304,42 +305,42 @@ watch(currentView, (newVal) => {
304305 <!-- Method Tabs -->
305306 <div class =" method-tabs" :class =" { 'mobile-open': mobileMenuOpen }" role =" tablist" >
306307 <button
307- @click =" goToMethod('simplex')"
308- :class =" { active: currentView === 'simplex' }"
309308 class =" method-tab"
309+ :class =" { active: currentView === 'simplex' }"
310310 role =" tab"
311311 :aria-selected =" currentView === 'simplex'"
312312 aria-label =" Método Simplex"
313+ @click =" goToMethod('simplex')"
313314 >
314315 Método Simplex
315316 </button >
316317 <button
317- @click =" goToMethod('grafico')"
318- :class =" { active: currentView === 'grafico' }"
319318 class =" method-tab"
319+ :class =" { active: currentView === 'grafico' }"
320320 role =" tab"
321321 :aria-selected =" currentView === 'grafico'"
322322 aria-label =" Método Gráfico"
323+ @click =" goToMethod('grafico')"
323324 >
324325 Método Gráfico
325326 </button >
326327 <button
327- @click =" goToMethod('penalizacion')"
328- :class =" { active: currentView === 'penalizacion' }"
329328 class =" method-tab"
329+ :class =" { active: currentView === 'penalizacion' }"
330330 role =" tab"
331331 :aria-selected =" currentView === 'penalizacion'"
332332 aria-label =" Métodos de Transporte"
333+ @click =" goToMethod('penalizacion')"
333334 >
334335 Métodos de Transporte
335336 </button >
336337 <button
337- @click =" goToMethod('todos')"
338- :class =" { active: currentView === 'todos' }"
339338 class =" method-tab method-tab-all"
339+ :class =" { active: currentView === 'todos' }"
340340 role =" tab"
341341 :aria-selected =" currentView === 'todos'"
342342 aria-label =" Comparar todos los métodos"
343+ @click =" goToMethod('todos')"
343344 >
344345 Comparar Todos
345346 </button >
@@ -358,10 +359,10 @@ watch(currentView, (newVal) => {
358359 <SimplexInput
359360 v-else
360361 :key =" currentView"
361- v-model:numVariables =" numVariables"
362- v-model:numConstraints =" numConstraints"
363- v-model:problemType =" problemType"
364- :selectedMethod =" selectedMethod"
362+ v-model:num-variables =" numVariables"
363+ v-model:num-constraints =" numConstraints"
364+ v-model:problem-type =" problemType"
365+ :selected-method =" selectedMethod"
365366 @solve =" handleSolve"
366367 />
367368 </div >
@@ -370,7 +371,7 @@ watch(currentView, (newVal) => {
370371 <!-- Sección de Solución -->
371372 <section v-if =" currentView === 'solution' && problemData" class =" solution-section" role =" region" aria-label =" Solución del problema" >
372373 <SimplexSolution
373- :problemData =" problemData"
374+ :problem-data =" problemData"
374375 @reset =" handleNewProblem"
375376 />
376377 </section >
0 commit comments