Skip to content

Commit 31096da

Browse files
committed
feat: Style optimization
1 parent e66fa42 commit 31096da

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

frontend/src/views/work/DatasourceCard.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts" setup>
2-
import { ref } from "vue";
32
import { Document } from "@element-plus/icons-vue";
4-
const props = withDefaults(
3+
withDefaults(
54
defineProps<{
65
name: string;
76
description: string;

frontend/src/views/work/index.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<script lang="ts" setup>
22
import { ref, computed } from "vue";
33
import DatasourceCard from "./DatasourceCard.vue";
4-
4+
interface Datasource {
5+
id?: string;
6+
name: string;
7+
description: string;
8+
creator: string;
9+
}
510
const props = withDefaults(
611
defineProps<{
7-
datasourceList: Array<any>;
12+
datasourceList: Array<Datasource>;
813
}>(),
914
{
1015
datasourceList: () => [],
@@ -14,7 +19,7 @@ const props = withDefaults(
1419
const datasourceName = ref("");
1520
const datasourceListComputed = computed(() =>
1621
props.datasourceList.filter((val) =>
17-
val.name.toLowerCase.includes(datasourceName.value.toLowerCase())
22+
val.name.toLowerCase().includes(datasourceName.value.toLowerCase())
1823
)
1924
);
2025
@@ -34,7 +39,9 @@ const dialogVisible = ref(false);
3439
</div>
3540
<div class="datasource-content">
3641
<DatasourceCard
37-
name="1"
42+
:name="ele.name"
43+
:description="ele.description"
44+
:creator="ele.creator"
3845
v-for="ele in datasourceList"
3946
:key="ele.id"
4047
></DatasourceCard>
@@ -56,7 +63,9 @@ const dialogVisible = ref(false);
5663
</div>
5764
<div class="datasource-content">
5865
<DatasourceCard
59-
name="1"
66+
:name="ele.name"
67+
:description="ele.description"
68+
:creator="ele.creator"
6069
v-for="ele in datasourceListComputed"
6170
:key="ele.id"
6271
></DatasourceCard>

0 commit comments

Comments
 (0)