Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Popup can't open after hot reloading with some vue3 script changed on vite

Aperta
#4,341 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

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:

  1. Create a new vite vue project: npm create vite@latest, choose vue and javascript
  2. Install framework7: npm i framework7 framework7-vue
  3. 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')

  1. 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>
  1. Run app: npm run dev
  2. Click the open button, the popup will show, then close it
  3. Change open to Open, save file, Click the Open button, the popup will show, then close it
  4. 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di framework7io/framework7

Tutte le issue di framework7io/framework7

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.