vue训练场
2022/10/7小于 1 分钟
vue训练场
::: vue-playground Vue Playground with cutomized settings and import
<script setup>
import { ref } from "vue";
import Comp from "./Comp.vue";
const msg = ref("Hello Playground!");
</script>
<template>
<h1>{{ msg }}</h1>
<input v-model="msg" />
<Comp />
</template>
<script setup>
import { useBattery } from "@vueuse/core";
import { ref } from "vue";
const { charging, level } = useBattery();
</script>
<template>
<h1>Battery status</h1>
<p>Charging: {{ charging }}</p>
<p>Level: {{ level * 100 }}%</p>
</template>
{
"imports": {
"@vueuse/core": "https://unpkg.com/@vueuse/core/index.mjs",
"@vueuse/shared": "https://unpkg.com/@vueuse/shared/index.mjs",
"vue-demi": "https://unpkg.com/vue-demi/lib/index.mjs"
}
}
{
"showCompileOutput": true
}
:::
