vuejs / repl

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

Add a switch button #282

Closed btea closed 2 months ago

btea commented 2 months ago

Currently, autoSave is reactive, can we add a toggle button like Show Error?

image

sxzz commented 2 months ago

Good idea

btea commented 2 months ago

I tried it briefly, and found that autoSave and Show Error are not the same. autoSave is passed in through props, and it seems that it cannot be modified directly. What do you think is a better way to deal with it? 🤔

sxzz commented 2 months ago

We can let autoSave be a model - use defineModel instead.