Skip to content

Commit d3daa33

Browse files
committed
- 添加前端
1 parent 8cf464e commit d3daa33

File tree

8 files changed

+485
-63
lines changed

8 files changed

+485
-63
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Generated by 'unplugin-auto-import'
2+
export {}
3+
declare global {
4+
const EffectScope: typeof import('vue')['EffectScope']
5+
const computed: typeof import('vue')['computed']
6+
const createApp: typeof import('vue')['createApp']
7+
const customRef: typeof import('vue')['customRef']
8+
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
9+
const defineComponent: typeof import('vue')['defineComponent']
10+
const effectScope: typeof import('vue')['effectScope']
11+
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
12+
const getCurrentScope: typeof import('vue')['getCurrentScope']
13+
const h: typeof import('vue')['h']
14+
const inject: typeof import('vue')['inject']
15+
const isProxy: typeof import('vue')['isProxy']
16+
const isReactive: typeof import('vue')['isReactive']
17+
const isReadonly: typeof import('vue')['isReadonly']
18+
const isRef: typeof import('vue')['isRef']
19+
const markRaw: typeof import('vue')['markRaw']
20+
const nextTick: typeof import('vue')['nextTick']
21+
const onActivated: typeof import('vue')['onActivated']
22+
const onBeforeMount: typeof import('vue')['onBeforeMount']
23+
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
24+
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
25+
const onDeactivated: typeof import('vue')['onDeactivated']
26+
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
27+
const onMounted: typeof import('vue')['onMounted']
28+
const onRenderTracked: typeof import('vue')['onRenderTracked']
29+
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
30+
const onScopeDispose: typeof import('vue')['onScopeDispose']
31+
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
32+
const onUnmounted: typeof import('vue')['onUnmounted']
33+
const onUpdated: typeof import('vue')['onUpdated']
34+
const provide: typeof import('vue')['provide']
35+
const reactive: typeof import('vue')['reactive']
36+
const readonly: typeof import('vue')['readonly']
37+
const ref: typeof import('vue')['ref']
38+
const resolveComponent: typeof import('vue')['resolveComponent']
39+
const shallowReactive: typeof import('vue')['shallowReactive']
40+
const shallowReadonly: typeof import('vue')['shallowReadonly']
41+
const shallowRef: typeof import('vue')['shallowRef']
42+
const toRaw: typeof import('vue')['toRaw']
43+
const toRef: typeof import('vue')['toRef']
44+
const toRefs: typeof import('vue')['toRefs']
45+
const triggerRef: typeof import('vue')['triggerRef']
46+
const unref: typeof import('vue')['unref']
47+
const useAttrs: typeof import('vue')['useAttrs']
48+
const useCssModule: typeof import('vue')['useCssModule']
49+
const useCssVars: typeof import('vue')['useCssVars']
50+
const useDialog: typeof import('naive-ui')['useDialog']
51+
const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
52+
const useMessage: typeof import('naive-ui')['useMessage']
53+
const useNotification: typeof import('naive-ui')['useNotification']
54+
const useSlots: typeof import('vue')['useSlots']
55+
const watch: typeof import('vue')['watch']
56+
const watchEffect: typeof import('vue')['watchEffect']
57+
const watchPostEffect: typeof import('vue')['watchPostEffect']
58+
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
59+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// generated by unplugin-vue-components
2+
// We suggest you to commit this file into source control
3+
// Read more: https://github.com/vuejs/core/pull/3399
4+
import '@vue/runtime-core'
5+
6+
export {}
7+
8+
declare module '@vue/runtime-core' {
9+
export interface GlobalComponents {
10+
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
11+
NGi: typeof import('naive-ui')['NGi']
12+
NGrid: typeof import('naive-ui')['NGrid']
13+
NInput: typeof import('naive-ui')['NInput']
14+
NLayout: typeof import('naive-ui')['NLayout']
15+
NLayoutContent: typeof import('naive-ui')['NLayoutContent']
16+
NLayoutFooter: typeof import('naive-ui')['NLayoutFooter']
17+
NLayoutHeader: typeof import('naive-ui')['NLayoutHeader']
18+
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
19+
NMenu: typeof import('naive-ui')['NMenu']
20+
NSpace: typeof import('naive-ui')['NSpace']
21+
NSwitch: typeof import('naive-ui')['NSwitch']
22+
RouterLink: typeof import('vue-router')['RouterLink']
23+
RouterView: typeof import('vue-router')['RouterView']
24+
}
25+
}

spring-cloud-kubernetes-configmap-ui/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
"preview": "./node_modules/.bin/vite preview"
1010
},
1111
"dependencies": {
12+
"@vicons/ionicons5": "^0.12.0",
1213
"axios": "^1.1.2",
1314
"naive-ui": "^2.33.4",
1415
"pinia": "^2.0.23",
1516
"pinia-plugin-persistedstate": "^2.2.0",
1617
"qs": "^6.11.0",
18+
"unplugin-auto-import": "^0.11.2",
19+
"unplugin-vue-components": "^0.22.8",
1720
"vue": "^3.2.37",
1821
"vue-router": "^4.1.5"
1922
},
@@ -23,4 +26,4 @@
2326
"vite": "^3.1.0",
2427
"vue-tsc": "^0.40.4"
2528
}
26-
}
29+
}
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
<script setup lang="ts">
2-
// This starter template is using Vue 3 <script setup> SFCs
3-
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
42
import Configmap from './components/Configmap.vue'</script>
5-
63
<template>
74
<Configmap/>
85
</template>
9-
10-
<style scoped>
11-
.logo {
12-
height: 6em;
13-
padding: 1.5em;
14-
will-change: filter;
15-
}
16-
17-
.logo:hover {
18-
filter: drop-shadow(0 0 2em #646cffaa);
19-
}
20-
21-
.logo.vue:hover {
22-
filter: drop-shadow(0 0 2em #42b883aa);
23-
}
24-
</style>
Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,28 @@
1-
<script>
2-
import {defineComponent} from 'vue'
3-
import {NConfigProvider, NInput, NDatePicker, NSpace} from 'naive-ui'
4-
// theme
5-
import {createTheme, inputDark, datePickerDark} from 'naive-ui'
6-
// locale & dateLocale
7-
import {zhCN, dateZhCN} from 'naive-ui'
8-
9-
export default defineComponent({
10-
components: {
11-
NConfigProvider,
12-
NInput,
13-
NDatePicker,
14-
NSpace
15-
},
16-
setup() {
17-
return {
18-
lightTheme: createTheme([inputDark, datePickerDark]),
19-
zhCN,
20-
dateZhCN
21-
}
22-
}
23-
})
24-
</script>
25-
261
<template>
27-
<n-config-provider :theme="lightTheme" :locale="zhCN" :date-locale="dateZhCN">
28-
<n-space vertical>
29-
<n-input/>
30-
</n-space>
31-
</n-config-provider>
2+
<n-layout has-sider>
3+
<n-layout-sider bordered content-style="padding: 24px;">
4+
海淀桥
5+
</n-layout-sider>
6+
<n-layout>
7+
<n-layout-header bordered>
8+
颐和园路
9+
</n-layout-header>
10+
<n-layout-content content-style="padding: 24px;">
11+
平山道
12+
</n-layout-content>
13+
<n-layout-footer bordered>
14+
成府路
15+
</n-layout-footer>
16+
</n-layout>
17+
</n-layout>
3218
</template>
3319

34-
<style>
35-
body {
36-
background: black;
20+
<style scoped>
21+
.n-layout-header {
22+
padding: 24px;
23+
}
24+
25+
.n-layout-footer {
26+
padding: 24px;
3727
}
3828
</style>

spring-cloud-kubernetes-configmap-ui/src/main/frontend/style.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ button:focus-visible {
6060
padding: 2em;
6161
}
6262

63-
#app {
64-
max-width: 1280px;
65-
margin: 0 auto;
66-
padding: 2rem;
67-
text-align: center;
68-
}
69-
7063
@media (prefers-color-scheme: light) {
7164
:root {
7265
color: #213547;
Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
import {defineConfig} from 'vite'
22
import vue from '@vitejs/plugin-vue'
3+
// @ts-ignore
4+
import AutoImport from 'unplugin-auto-import/vite'
5+
// @ts-ignore
6+
import Components from 'unplugin-vue-components/vite'
7+
// @ts-ignore
8+
import {NaiveUiResolver} from 'unplugin-vue-components/resolvers'
39

410
// https://vitejs.dev/config/
511
export default defineConfig({
6-
plugins: [vue()]
7-
})
12+
plugins: [
13+
vue(),
14+
AutoImport({
15+
imports: [
16+
'vue',
17+
{
18+
'naive-ui': [
19+
'useDialog',
20+
'useMessage',
21+
'useNotification',
22+
'useLoadingBar'
23+
]
24+
}
25+
]
26+
}),
27+
Components({
28+
resolvers: [NaiveUiResolver()]
29+
})
30+
]
31+
})

0 commit comments

Comments
 (0)