样式调整
This commit is contained in:
parent
feade2206f
commit
1778c8a2b9
@ -11,6 +11,7 @@
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"postcss": "^8.4.24",
|
||||
"sass": "^1.63.6",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"vite": "^4.0.0"
|
||||
},
|
||||
|
@ -1 +1 @@
|
||||
f642d4d4c90aca4792a079e99b5747bd
|
||||
db3b02ee6f6e7fb468ee29ea3c54b365
|
@ -27,7 +27,7 @@ function tabRemove(name){
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-tabs v-model="tab" @tab-change="tabChange" @tab-remove="tabRemove" style="height:100%">
|
||||
<el-tabs v-model="tab" @tab-change="tabChange" @tab-remove="tabRemove" style="height:100%" class="tab-scaffold">
|
||||
<el-tab-pane
|
||||
v-for="item in tabs"
|
||||
:key="item.name"
|
||||
@ -36,7 +36,7 @@ function tabRemove(name){
|
||||
:name="item.name">
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<transition name="fade" mode="out-in">
|
||||
<div>
|
||||
<div class="h-full">
|
||||
<component v-if="route.meta.keepAlive != null && route.meta.keepAlive === false" :is="Component" :key="route.path"/>
|
||||
<keep-alive v-else>
|
||||
<component :is="Component" :key="route.path"/>
|
||||
@ -48,6 +48,14 @@ function tabRemove(name){
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
.tab-scaffold {
|
||||
& > ::v-deep(.el-tabs__content) {
|
||||
height: calc(100% - 55px);
|
||||
}
|
||||
|
||||
& > ::v-deep(.el-tabs__content .el-tab-pane) {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -20,6 +20,13 @@ const routes = [
|
||||
title: "首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "environment",
|
||||
component:()=>import("src/views/environment/index.vue"),
|
||||
meta:{
|
||||
title: "环境变量"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/test",
|
||||
component: ()=>import("src/views/home/Test.vue"),
|
||||
|
@ -1,9 +1,46 @@
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
import {reactive} from "vue";
|
||||
import {GetAllEnv} from "frontend/wailsjs/go/env/Env";
|
||||
import {ElAutoResizer} from "element-plus";
|
||||
|
||||
const table = reactive({
|
||||
columns: [
|
||||
{
|
||||
key: "name",
|
||||
dataKey: "name",
|
||||
title: "名称",
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
key: "value",
|
||||
dataKey: "value",
|
||||
title: "值",
|
||||
width: 150,
|
||||
minWidth: "150px",
|
||||
flexGrow: 1
|
||||
}
|
||||
],
|
||||
data: []
|
||||
})
|
||||
|
||||
GetAllEnv().then((data)=>{
|
||||
table.data = Object.entries(data).map(item => {
|
||||
return {
|
||||
name: item[0],
|
||||
value: item[1]
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div style="height: 100%">
|
||||
<el-auto-resizer>
|
||||
<template #default="{ height, width}">
|
||||
<el-table-v2 mb-1 :height="height" :width="width" :data="table.data" :columns="table.columns"/>
|
||||
</template>
|
||||
</el-auto-resizer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
@ -123,6 +123,7 @@ const table = reactive({
|
||||
<el-pagination :total="100" />
|
||||
|
||||
<el-button @click="addTab()">添加tab</el-button>
|
||||
<el-button @click="router.push('/environment')">环境变量</el-button>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
@ -25,7 +25,7 @@ if(route.path === "/"){
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TabScaffold></TabScaffold>
|
||||
<TabScaffold style="height: 100%"></TabScaffold>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
@ -453,7 +453,7 @@ caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001503:
|
||||
resolved "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001512.tgz#7450843fb581c39f290305a83523c7a9ef0d4cb4"
|
||||
integrity sha512-2S9nK0G/mE+jasCUsMPlARhRCts1ebcp2Ji8Y8PWi4NDE1iRdLCnEPHkEfeBrGC45L4isBx5ur3IQ6yTE2mRZw==
|
||||
|
||||
chokidar@^3.5.3:
|
||||
"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3:
|
||||
version "3.5.3"
|
||||
resolved "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
|
||||
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
|
||||
@ -655,6 +655,11 @@ has@^1.0.3:
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
|
||||
immutable@^4.0.0:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.npmmirror.com/immutable/-/immutable-4.3.1.tgz#17988b356097ab0719e2f741d56f3ec6c317f9dc"
|
||||
integrity sha512-lj9cnmB/kVS0QHsJnYKD1uo3o39nrbKxszjnqS9Fr6NB7bZzW45U6WSGBPKXDL/CvDKqDNPA4r3DoDQ8GTxo2A==
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
@ -950,7 +955,16 @@ run-parallel@^1.1.9:
|
||||
dependencies:
|
||||
queue-microtask "^1.2.2"
|
||||
|
||||
source-map-js@^1.0.2:
|
||||
sass@^1.63.6:
|
||||
version "1.63.6"
|
||||
resolved "https://registry.npmmirror.com/sass/-/sass-1.63.6.tgz#481610e612902e0c31c46b46cf2dad66943283ea"
|
||||
integrity sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==
|
||||
dependencies:
|
||||
chokidar ">=3.0.0 <4.0.0"
|
||||
immutable "^4.0.0"
|
||||
source-map-js ">=0.6.2 <2.0.0"
|
||||
|
||||
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||
|
Loading…
Reference in New Issue
Block a user