update
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-tabs size="large" pane-class="pane" default-value="html" type="segment">
|
<n-tabs
|
||||||
|
size="large"
|
||||||
|
pane-class="pane"
|
||||||
|
:default-value="currentTab"
|
||||||
|
type="segment"
|
||||||
|
@update:value="changeTab"
|
||||||
|
>
|
||||||
<n-tab-pane name="html" tab="HTML">
|
<n-tab-pane name="html" tab="HTML">
|
||||||
<template #tab>
|
<template #tab>
|
||||||
<n-flex align="center">
|
<n-flex align="center">
|
||||||
@@ -60,7 +66,15 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Icon } from "@iconify/vue"
|
import { Icon } from "@iconify/vue"
|
||||||
import Editor from "./Editor.vue"
|
import Editor from "./Editor.vue"
|
||||||
|
import { useStorage } from "@vueuse/core"
|
||||||
import { html, css, js, reset, size, changeSize } from "../store.ts"
|
import { html, css, js, reset, size, changeSize } from "../store.ts"
|
||||||
|
|
||||||
|
const currentTab = useStorage("web-tab", "html")
|
||||||
|
|
||||||
|
function changeTab(tab: "html" | "css" | "js" | "actions") {
|
||||||
|
if (tab === "actions") return
|
||||||
|
currentTab.value = tab
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pane {
|
.pane {
|
||||||
|
|||||||
Reference in New Issue
Block a user