-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Description
- 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.
Metadata
Metadata
Assignees
Labels
No labels