Popup can't open after hot reloading with some vue3 script changed on vite
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- javascript, vite
- Área
- frontend
Línea de trabajo
Comienza con la configuración de Framework7 en main.js y con el estado del popup y el código handleOpen en App.vue. Ejecuta npm run dev en el proyecto Vite Vue reproducido, activa la recarga en caliente del script descrita y verifica que el popup siga abriéndose después, sin actualizar el navegador.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
- Framework7 version: 8.3.4
- Vue.js version: 3.5.24
- Platform and Target: win11 chrome browser
- Live Link or CodeSandbox: none
Describe the bug
Popup can't open after hot reloading with some script changed on vite, refreshing the website will help.
PS: Changing some html may not make popup not function.
To Reproduce
Steps to reproduce the behavior:
- Create a new vite vue project: npm create vite@latest, choose vue and javascript
- Install framework7: npm i framework7 framework7-vue
- In main.js
import { createApp } from 'vue'
import './style.css'
import Framework7 from 'framework7/lite-bundle'
import Framework7Vue, { registerComponents } from 'framework7-vue/bundle'
import 'framework7/css/bundle'
Framework7.use(Framework7Vue)
import App from './App.vue'
const app = createApp(App)
registerComponents(app)
app.mount('#app')
- In App.vue
<script setup>
import { reactive } from 'vue'
const f7params = {
name: 'My App',
theme: 'md',
version: '1.0.0',
}
const edit = reactive({
popupOpened: false,
})
const handleOpen = () => {
edit.popupOpened = true
console.log('handleOpen')
}
</script>
<template>
<div id="app">
<f7-app v-bind="f7params">
<f7-page>
<f7-block>
<f7-button fill round style="width: 50%;" @click="handleOpen">open</f7-button>
</f7-block>
<f7-popup v-model:opened="edit.popupOpened" :closeByBackdropClick="false">
<f7-page>
<f7-navbar title="Edit">
<f7-nav-right>
<f7-link popup-close>Confirm</f7-link>
</f7-nav-right>
</f7-navbar>
</f7-page>
</f7-popup>
</f7-page>
</f7-app>
</div>
</template>
<style>
body, html, #app {
width: 100%;
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
outline: none;
}
</style>
- Run app: npm run dev
- Click the open button, the popup will show, then close it
- Change open to Open, save file, Click the Open button, the popup will show, then close it
- Change log in handleOpen, like
const handleOpen = () => {
edit.popupOpened = true
console.log('handleOpen1')
}
Click the Open button, nothing happened.
Expected behavior
After changing script and save, a hot-reload invoked, popup can still be opened.
Actual Behavior
After changing script and save, a hot-reload invoked, popup can't be opened, unless you refresh the browser.
- Lenguaje dominante
- JavaScript
- Estrellas
- 18.8k
- Forks
- 3.2k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de framework7io/framework7
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
framework7io/framework7#4365 · 1 comentario ·
-
propsHistoryAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
framework7io/framework7#4347 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
framework7io/framework7#4222 · 3 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
framework7io/framework7#4175 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
framework7io/framework7#3969 · 3 comentarios ·
Todos los issues de framework7io/framework7
Issues similares
-
status: waiting triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
freeCodeCamp/freeCodeCamp#70412 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Jason-Vaughan/TangleClaw#1884 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue web
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/TypeScript#64453 ·
Los mantenedores suelen responder en 1 día
-
self-driving
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día