vuejs / repl

Vue SFC REPL as a Vue 3 component
https://repl-vuejs.vercel.app
MIT License
908 stars 163 forks source link

refactor: save the code with `ctrl + s` #150

Closed Alfred-Skyblue closed 3 months ago

Alfred-Skyblue commented 1 year ago

If you use the change event to save the code, every input triggers the save, I refactored it to use ctrl+s to save the code, and if there is no input within five seconds, the code is automatically saved.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
repl ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 27, 2023 3:45am
Alfred-Skyblue commented 10 months ago

Maybe we can have an option for auto saving.

When the onChange event triggers frequently, it can be disruptive, especially when I haven't finished coding. To address this issue, I've implemented a debounce and added an autoSave attribute to control the frequency of automatic saving.

sxzz commented 3 months ago

Done by #247