mirror of https://github.com/vuejs/core.git
refactor(sfc-playground): add vapor name
This commit is contained in:
parent
69580515d9
commit
1ec90db776
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link rel="icon" type="image/svg" href="/logo.svg" />
|
<link rel="icon" type="image/svg" href="/logo.svg" />
|
||||||
<title>Vue SFC Playground</title>
|
<title>Vue Vapor SFC Playground</title>
|
||||||
<script>
|
<script>
|
||||||
const savedPreferDark = localStorage.getItem('vue-sfc-playground-prefer-dark')
|
const savedPreferDark = localStorage.getItem('vue-sfc-playground-prefer-dark')
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -68,7 +68,7 @@ function toggleDark() {
|
||||||
<nav>
|
<nav>
|
||||||
<h1>
|
<h1>
|
||||||
<img alt="logo" src="/logo.svg" />
|
<img alt="logo" src="/logo.svg" />
|
||||||
<span>Vue SFC Playground</span>
|
<span>Vue Vapor SFC Playground</span>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<VersionSelect
|
<VersionSelect
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import { ref, getCurrentInstance } from 'vue'
|
import { ref, getCurrentInstance } from 'vue'
|
||||||
|
|
||||||
const msg = ref('Hello World!')
|
const msg = ref('Hello World!')
|
||||||
|
// @ts-expect-error
|
||||||
const isVapor = getCurrentInstance().vapor
|
const isVapor = getCurrentInstance().vapor
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<h1>{{ msg }}</h1>
|
<h1>{{ msg }}</h1>
|
||||||
|
<p>
|
||||||
|
VAPOR <b>{{ isVapor ? 'ON' : 'OFF' }}</b>
|
||||||
|
</p>
|
||||||
<input v-model="msg" />
|
<input v-model="msg" />
|
||||||
<b>VAPOR {{ isVapor ? 'ON' : 'OFF' }}</b>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue