]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: default code for sfc playground
authorEvan You <yyx990803@gmail.com>
Sun, 28 Mar 2021 06:24:25 +0000 (02:24 -0400)
committerEvan You <yyx990803@gmail.com>
Sun, 28 Mar 2021 06:24:25 +0000 (02:24 -0400)
packages/sfc-playground/src/store.ts

index f4f122024eb577a1ce723f3457a5cdabca548a0e..d3a892acbb45d3afdc50b9ca9098c61a41007ae3 100644 (file)
@@ -9,7 +9,23 @@ import {
 } from '@vue/compiler-sfc'
 
 const storeKey = 'sfc-code'
-const saved = localStorage.getItem(storeKey) || ''
+const saved =
+  localStorage.getItem(storeKey) ||
+  `
+<template>
+  <h1>{{ msg }}</h1>
+</template>
+
+<script setup>
+const msg = 'Hello World!'
+</script>
+
+<style scoped>
+h1 {
+  color: #42b983;
+}
+</style>
+`.trim()
 
 // @ts-ignore
 export const sandboxVueURL = import.meta.env.PROD