Closed yangxyo closed 4 days ago
v-show seems to work fine:
<!DOCTYPE html>
<html>
<body>
<script src="https://unpkg.com/vue@3/dist/vue.runtime.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue3-sfc-loader@0.9.5/dist/vue3-sfc-loader.js"></script>
<script>
//<!--
const options = {
moduleCache: { vue: Vue },
getFile: () => `
<template>
<span v-show="test">visible</span>
<button @click="test = !test">toggle</button>
</template>
<script setup>
import { ref } from 'vue'
const test = ref(true);
</script>
`,
addStyle: () => {},
}
Vue.createApp(Vue.defineAsyncComponent(() => window['vue3-sfc-loader'].loadModule('file.vue', options))).mount(document.body);
//-->
</script>
</body>
</html>
v-show not work