Popup can't open after hot reloading with some vue3 script changed on vite
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript, vite
- Ambito
- frontend
Direzione di ricerca
Inizia dalla configurazione di Framework7 in main.js e dallo stato del popup e dal codice handleOpen in App.vue. Esegui npm run dev nel progetto Vite Vue riprodotto, attiva l’hot reload dello script descritto e verifica che il popup continui ad aprirsi dopo, senza aggiornare il browser.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
- 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.
- Lingua principale
- JavaScript
- Stelle
- 18.8k
- Fork
- 3.2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di framework7io/framework7
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
framework7io/framework7#4365 · 1 commento ·
-
propsHistory Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
framework7io/framework7#4347 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
framework7io/framework7#4222 · 3 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
framework7io/framework7#4175 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
framework7io/framework7#3969 · 3 commenti ·
Tutte le issue di framework7io/framework7
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100
-
Issue-Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
sugarlabs/musicblocks#8924 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Apertacustomer-eng status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100