Commit 4de7034f authored by 徐一鸣's avatar 徐一鸣

应用管理样式优化

parent 8ebacf7e
...@@ -61,7 +61,6 @@ export default { ...@@ -61,7 +61,6 @@ export default {
<style scoped> <style scoped>
.app_card { .app_card {
width: calc(20% - 36px);
background-image: url(../../assets/imgs/bg_block.png); background-image: url(../../assets/imgs/bg_block.png);
background-size: 100% 100%; background-size: 100% 100%;
padding: 33px 25px 34px; padding: 33px 25px 34px;
......
<template> <template>
<div class="app_list"> <div class="app_list" ref="container">
<app-card <app-card
v-for="(item, index) in data" v-for="(item, index) in data"
:key="'app_card_' + index" :key="'app_card_' + index"
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
@deployment-action="deploymentAction" @deployment-action="deploymentAction"
@delete-action="deleteAction" @delete-action="deleteAction"
:details-url="detailsUrl" :details-url="detailsUrl"
:style="{ width: 'calc(100% / ' + rowNum + ' - 36px)' }"
></app-card> ></app-card>
</div> </div>
</template> </template>
...@@ -33,6 +34,9 @@ export default { ...@@ -33,6 +34,9 @@ export default {
default: 0, default: 0,
}, },
}, },
data: () => ({
rowNum: 5,
}),
methods: { methods: {
deploymentAction(item) { deploymentAction(item) {
this.$emit("deployment-action", item); this.$emit("deployment-action", item);
...@@ -40,6 +44,16 @@ export default { ...@@ -40,6 +44,16 @@ export default {
deleteAction(item) { deleteAction(item) {
this.$emit("delete-action", item); this.$emit("delete-action", item);
}, },
pageResize() {
let listWidth = this.$refs.container.clientWidth;
this.rowNum = Math.floor(listWidth / 310);
},
},
mounted() {
this.pageResize();
window.onresize = () => {
this.pageResize();
};
}, },
}; };
</script> </script>
......
...@@ -213,7 +213,7 @@ export default { ...@@ -213,7 +213,7 @@ export default {
overflow: auto; overflow: auto;
} }
.main_container { .main_container {
min-height: calc(100% - 74px); min-height: calc(100% - 84px);
padding: 15px 20px; padding: 15px 20px;
border-radius: 10px; border-radius: 10px;
background-color: #fff; background-color: #fff;
......
...@@ -531,16 +531,17 @@ export default { ...@@ -531,16 +531,17 @@ export default {
<style scoped> <style scoped>
.list_container { .list_container {
min-height: 100%; height: 100%;
padding: 0 20px; padding: 0 20px;
overflow: auto; overflow: auto;
} }
.main_container { .main_container {
min-height: calc(100% - 75px); min-height: calc(100% - 84px);
padding: 15px 20px; padding: 15px 20px;
border-radius: 10px; border-radius: 10px;
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
margin-bottom: 42px;
} }
.main_container.card { .main_container.card {
display: flex; display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment