lint:fix all
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
|
||||
class="w-full h-full min-h-[600px] overflow-hidden rounded-md"
|
||||
/>
|
||||
<USkeleton v-else class="w-full min-h-[600px] rounded-md" />
|
||||
<USkeleton
|
||||
v-else
|
||||
class="w-full min-h-[600px] rounded-md"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -19,31 +22,31 @@ const {
|
||||
branch = 'main',
|
||||
dir = '',
|
||||
file,
|
||||
title = 'Playground',
|
||||
title = 'Playground'
|
||||
} = defineProps<{
|
||||
provider: 'stackblitz' | 'codesandbox';
|
||||
id?: string;
|
||||
repo?: string;
|
||||
branch?: string;
|
||||
dir?: string;
|
||||
file: string;
|
||||
title?: string;
|
||||
}>();
|
||||
provider: 'stackblitz' | 'codesandbox'
|
||||
id?: string
|
||||
repo?: string
|
||||
branch?: string
|
||||
dir?: string
|
||||
file: string
|
||||
title?: string
|
||||
}>()
|
||||
|
||||
const url = ref('');
|
||||
const colorMode = useColorMode();
|
||||
const url = ref('')
|
||||
const colorMode = useColorMode()
|
||||
|
||||
onMounted(() => {
|
||||
if (provider === 'stackblitz') {
|
||||
if (repo)
|
||||
url.value = `https://stackblitz.com/github/${repo}/tree/${branch}/${dir}?embed=1&file=${file}&theme=${colorMode.value}`;
|
||||
url.value = `https://stackblitz.com/github/${repo}/tree/${branch}/${dir}?embed=1&file=${file}&theme=${colorMode.value}`
|
||||
else if (id)
|
||||
url.value = `https://stackblitz.com/edit/${id}?embed=1&file=${file}&theme=${colorMode.value}`;
|
||||
url.value = `https://stackblitz.com/edit/${id}?embed=1&file=${file}&theme=${colorMode.value}`
|
||||
} else if (provider === 'codesandbox') {
|
||||
if (repo)
|
||||
url.value = `https://codesandbox.io/p/sandbox/github/${repo}/tree/${branch}/${dir}?embed=1&file=${file}`;
|
||||
url.value = `https://codesandbox.io/p/sandbox/github/${repo}/tree/${branch}/${dir}?embed=1&file=${file}`
|
||||
else if (id)
|
||||
url.value = `https://codesandbox.io/embed/${id}?view=editor+%2B+preview&module=${file}`;
|
||||
url.value = `https://codesandbox.io/embed/${id}?view=editor+%2B+preview&module=${file}`
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user