Skip to content

Commit 42d7c3c

Browse files
committed
feat(card): card adaptive
1 parent 6849f9c commit 42d7c3c

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

frontend/src/views/ds/Card.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ const onClickOutside = () => {
119119

120120
<style lang="less" scoped>
121121
.card {
122-
width: 370px;
122+
width: calc(33% - 14px);
123123
border: 1px solid #dee0e3;
124124
padding: 16px;
125125
border-radius: 12px;
126126
cursor: pointer;
127-
margin: 0 16px 16px 0;
127+
margin: 0 0 16px 16px;
128128
&:hover {
129129
box-shadow: 0px 6px 24px 0px #1f232914;
130130
}
@@ -136,11 +136,12 @@ const onClickOutside = () => {
136136
137137
.info {
138138
margin-left: 12px;
139+
max-width: calc(100% - 50px);
139140
.name {
140141
font-weight: 500;
141142
font-size: 16px;
142143
line-height: 24px;
143-
max-width: 250px;
144+
max-width: 100%;
144145
}
145146
.type {
146147
font-weight: 400;

frontend/src/views/ds/Datasource.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const back = () => {
210210
</script>
211211

212212
<template>
213-
<div v-show="!currentDataTable" class="datasource-config">
213+
<div v-show="!currentDataTable" class="datasource-config no-padding">
214214
<div class="datasource-methods">
215215
<span class="title">{{ $t('ds.title') }}</span>
216216
<div class="button-input">
@@ -378,11 +378,13 @@ const back = () => {
378378
<style lang="less" scoped>
379379
.datasource-config {
380380
height: calc(100% - 16px);
381+
padding: 24px 24px 24px 8px;
381382
.datasource-methods {
382383
display: flex;
383384
align-items: center;
384385
justify-content: space-between;
385386
margin-bottom: 16px;
387+
padding-left: 16px;
386388
.title {
387389
font-weight: 500;
388390
font-size: 20px;
@@ -395,6 +397,7 @@ const back = () => {
395397
flex-wrap: wrap;
396398
max-height: calc(100% - 40px);
397399
overflow-y: auto;
400+
justify-content: space-between;
398401
}
399402
400403
.datasource-yet {

frontend/src/views/system/embedded/Card.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ const handleEmbedded = () => {
6969

7070
<style lang="less" scoped>
7171
.card {
72-
width: 400px;
72+
width: calc(33% - 14px);
7373
height: 168px;
7474
border: 1px solid #dee0e3;
7575
padding: 16px;
7676
border-radius: 12px;
77-
margin: 0 16px 16px 0;
77+
margin: 0 0 16px 16px;
7878
&:hover {
7979
box-shadow: 0px 6px 24px 0px #1f232914;
8080
}
@@ -88,7 +88,7 @@ const handleEmbedded = () => {
8888
font-weight: 500;
8989
font-size: 16px;
9090
line-height: 24px;
91-
max-width: 200px;
91+
max-width: calc(100% - 115px);
9292
}
9393
9494
.default {

frontend/src/views/system/embedded/index.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ const saveHandler = () => {
450450
</script>
451451

452452
<template>
453-
<div v-loading="searchLoading" class="embedded">
453+
<div v-loading="searchLoading" class="embedded no-padding">
454454
<div class="tool-left">
455455
<div class="btn-select">
456456
<el-button :class="[btnSelect === 'd' && 'is-active']" text @click="btnSelect = 'd'">
@@ -914,6 +914,8 @@ const saveHandler = () => {
914914
<style lang="less" scoped>
915915
.embedded {
916916
height: 100%;
917+
padding: 24px 24px 24px 8px;
918+
917919
.ed-empty {
918920
padding-top: 200px;
919921
padding-bottom: 0;
@@ -923,6 +925,7 @@ const saveHandler = () => {
923925
align-items: center;
924926
justify-content: space-between;
925927
margin-bottom: 16px;
928+
padding-left: 24px;
926929
927930
.btn-select {
928931
height: 32px;
@@ -958,6 +961,7 @@ const saveHandler = () => {
958961
flex-wrap: wrap;
959962
max-height: calc(100% - 40px);
960963
overflow-y: auto;
964+
justify-content: space-between;
961965
}
962966
}
963967
</style>

frontend/src/views/system/model/Card.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ defineExpose({ showErrorMask })
8888

8989
<style lang="less" scoped>
9090
.card {
91-
width: 404px;
91+
width: calc(33% - 14px);
9292
height: 160px;
9393
border: 1px solid #dee0e3;
9494
padding: 16px;
@@ -107,7 +107,7 @@ defineExpose({ showErrorMask })
107107
font-weight: 500;
108108
font-size: 16px;
109109
line-height: 24px;
110-
max-width: 280px;
110+
max-width: calc(100% - 115px);
111111
}
112112
.default {
113113
margin-left: auto;

frontend/src/views/system/model/Model.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@ const submit = (item: any) => {
415415
<style lang="less" scoped>
416416
.model-config {
417417
height: calc(100% - 16px);
418-
padding: 16px 0 16px 8px;
419-
margin-right: 24px;
418+
padding: 24px 24px 24px 8px;
420419
.model-methods {
421420
display: flex;
422421
align-items: center;
@@ -435,6 +434,7 @@ const submit = (item: any) => {
435434
flex-wrap: wrap;
436435
max-height: calc(100% - 40px);
437436
overflow-y: auto;
437+
justify-content: space-between;
438438
}
439439
}
440440
</style>

0 commit comments

Comments
 (0)