fix: update style

This commit is contained in:
Qiuxia Fan 2021-12-24 09:58:30 +08:00
parent fea4c202b3
commit 5d190d8ee2
3 changed files with 41 additions and 37 deletions

View File

@ -14,16 +14,18 @@ See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<div class="dashboard-tool"> <div class="dashboard-tool">
<el-button size="mini" @click="dashboardStore.addWidget"> <el-button size="mini" @click="addWidget"> Add Widget </el-button>
Add Widget
</el-button>
<el-button size="mini">Dashboard Settings</el-button> <el-button size="mini">Dashboard Settings</el-button>
<el-button size="mini">Save As</el-button> <el-button size="mini">Save As</el-button>
<el-button size="mini">Discard</el-button> <el-button size="mini">Discard</el-button>
<el-button size="mini" type="primary">Apply</el-button> <el-button size="mini" type="primary">Apply</el-button>
</div> </div>
<div class="flex-h ds-main"> <div class="flex-h ds-main">
<GridLayout /> <div class="layout">
<div class="grids">
<GridLayout />
</div>
</div>
<div <div
class="ds-config" class="ds-config"
v-show="dashboardStore.showConfig" v-show="dashboardStore.showConfig"
@ -66,6 +68,10 @@ document.addEventListener("click", setConfig, true);
function setConfig() { function setConfig() {
dashboardStore.setConfigPanel(false); dashboardStore.setConfigPanel(false);
} }
function addWidget() {
dashboardStore.setConfigPanel(true);
dashboardStore.addWidget();
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dashboard-tool { .dashboard-tool {
@ -77,7 +83,17 @@ function setConfig() {
.ds-main { .ds-main {
height: calc(100% - 40px); height: calc(100% - 40px);
overflow: auto; }
.layout {
height: 100%;
flex-grow: 2;
overflow: hidden;
}
.grids {
height: 100%;
overflow-y: auto;
} }
.ds-config { .ds-config {
@ -86,6 +102,5 @@ function setConfig() {
box-shadow: 2px 0 2px 0 #ccc; box-shadow: 2px 0 2px 0 #ccc;
text-align: center; text-align: center;
border-left: 1px solid #eee; border-left: 1px solid #eee;
margin: 10px 0;
} }
</style> </style>

View File

@ -25,40 +25,30 @@ export const EntityType = [
]; ];
export const SelectOpt = [ export const SelectOpt = [
{ {
value: "guide", value: "service1",
label: "Guide", label: "Service1",
children: [ children: [
{ {
value: "disciplines", value: "instance1",
label: "Disciplines", label: "Instance1",
children: [
{
value: "consistency",
label: "Consistency",
},
{
value: "feedback",
label: "Feedback",
},
{
value: "efficiency",
label: "Efficiency",
},
],
}, },
{ {
value: "navigation", value: "instance2",
label: "Navigation", label: "Instance2",
children: [ },
{ ],
value: "side nav", },
label: "Side Navigation", {
}, value: "service2",
{ label: "Service2",
value: "top nav", children: [
label: "Top Navigation", {
}, value: "instance1",
], label: "Instance1",
},
{
value: "instance2",
label: "Instance2",
}, },
], ],
}, },

View File

@ -47,7 +47,6 @@ function layoutUpdatedEvent(newLayout: GridItemData) {
<style lang="scss" scoped> <style lang="scss" scoped>
.vue-grid-layout { .vue-grid-layout {
background: #f7f9fa; background: #f7f9fa;
flex-grow: 2;
height: auto !important; height: auto !important;
} }