diff --git a/components.d.ts b/components.d.ts
index 04f01ce..854346b 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -17,6 +17,7 @@ declare module 'vue' {
IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
IconVue: typeof import('./src/components/icons/IconVue.vue')['default']
+ NConfigProvider: typeof import('naive-ui')['NConfigProvider']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
TheWelcome: typeof import('./src/components/TheWelcome.vue')['default']
diff --git a/src/App.vue b/src/App.vue
index de00db8..7aeded9 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,17 +1,22 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/src/assets/base.css b/src/assets/base.css
index c001975..f4ac3b6 100644
--- a/src/assets/base.css
+++ b/src/assets/base.css
@@ -66,7 +66,7 @@
body {
min-height: 100vh;
color: var(--color-text);
- background: var(--color-background);
+ background: var(--color-background-mute);
transition:
color 0.5s,
background-color 0.5s;
diff --git a/src/views/Layout/components/Menu.tsx b/src/views/Layout/components/Menu.tsx
index 8cd7da1..0f7a425 100644
--- a/src/views/Layout/components/Menu.tsx
+++ b/src/views/Layout/components/Menu.tsx
@@ -5,6 +5,7 @@ import { BookmarkOutline, CaretDownOutline } from '@vicons/ionicons5'
import IconCesium from '@/components/icons/IconCesium.vue'
import IconVue from '@/components/icons/IconVue.vue'
import IconHtml from '@/components/icons/IconHtml.vue'
+
const menuOptions: MenuOption[] = [
{
label: 'Cesium',
@@ -47,11 +48,7 @@ const renderMenuLabel = (option: MenuOption) => {
}
const renderMenuIcon = (option: MenuOption) => {
- if ('icon' in option) {
- return h(NIcon, null, option.icon)
- } else {
- return h(NIcon, null, { default: () => h(option.icon ? option.icon : BookmarkOutline) })
- }
+ return h(NIcon, null, { default: () => h(option.icon ?? BookmarkOutline) })
}
const expandIcon = () => {
diff --git a/src/views/Layout/index.tsx b/src/views/Layout/index.tsx
index 5df3b25..3b9a1fd 100644
--- a/src/views/Layout/index.tsx
+++ b/src/views/Layout/index.tsx
@@ -8,8 +8,10 @@ import {
NScrollbar,
} from 'naive-ui'
import MenuCom from './components/Menu'
+//
+const border = 'border border-[var(--border-color)] rounded-lg '
+const bgColor = 'bg-[var(--color-background-mute)] '
-const border = 'border border-[var(--border-color)] rounded-lg shadow-sm'
export default defineComponent({
setup() {
const route = useRoute()
@@ -19,29 +21,36 @@ export default defineComponent({
) : (
-
-
- title
-
-
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{/* 成府路 */}
diff --git a/src/views/Sandpack/components/HeaderOperate.tsx b/src/views/Sandpack/components/HeaderOperate.tsx
new file mode 100644
index 0000000..ed8f537
--- /dev/null
+++ b/src/views/Sandpack/components/HeaderOperate.tsx
@@ -0,0 +1,33 @@
+import { NButton, NSelect } from 'naive-ui'
+
+const options = [
+ {
+ label: 'static',
+ value: 'static',
+ },
+ {
+ label: 'vue3',
+ value: 'vue3',
+ },
+ {
+ label: 'react',
+ value: 'react',
+ },
+]
+
+export default defineComponent({
+ setup() {
+ const type = ref('static')
+ return () => (
+
+
+
+ 运行
+
+
+ 保存
+
+
+ )
+ },
+})
diff --git a/src/views/Sandpack/index.tsx b/src/views/Sandpack/index.tsx
index b6cd1b4..dc034d4 100644
--- a/src/views/Sandpack/index.tsx
+++ b/src/views/Sandpack/index.tsx
@@ -6,36 +6,40 @@ import {
} from 'sandpack-vue3'
import { atomDark } from '@codesandbox/sandpack-themes'
import CodeEditor from './components/CodeEditor'
+import HeaderOperate from './components/HeaderOperate'
export default defineComponent({
setup() {
return () => (
- <>
-
-
-
- {/*
+
+
+
+
+
+ {/* */}
-
-
-
- {/*
+
+
+
+ {/*
*/}
-
- >
+
+
+
)
},
})
diff --git a/vite.config.ts b/vite.config.ts
index 6b1e398..987cf71 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -12,7 +12,13 @@ import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
// https://vite.dev/config/
export default defineConfig({
plugins: [
- vue(),
+ vue({
+ template: {
+ compilerOptions: {
+ isCustomElement: (tag) => tag.startsWith('Icon'),
+ },
+ },
+ }),
vueJsx(),
vueDevTools(),
AutoImport({