refactor(sfc-playground): modes declaration (#3522)
This commit is contained in:
parent
7f7dcc9f7d
commit
c90fb945f4
@ -20,9 +20,9 @@ import CodeMirror from '../codemirror/CodeMirror.vue'
|
||||
import { store } from '../store'
|
||||
import { ref } from 'vue'
|
||||
|
||||
type Modes = 'preview' | 'js' | 'css' | 'ssr'
|
||||
const modes = ['preview', 'js', 'css', 'ssr'] as const
|
||||
|
||||
const modes: Modes[] = ['preview', 'js', 'css', 'ssr']
|
||||
type Modes = typeof modes[number]
|
||||
const mode = ref<Modes>('preview')
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user