Skip to content

Commit f63ac7b

Browse files
committed
feat:【AI 大模型】image/index/ImageCard 先换成 style
1 parent fc44958 commit f63ac7b

File tree

1 file changed

+19
-53
lines changed

1 file changed

+19
-53
lines changed

src/views/ai/image/index/components/ImageCard.vue

Lines changed: 19 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<el-card body-class="" class="image-card">
3-
<div class="image-operation">
2+
<el-card body-class="" style="width: 320px; height: auto; border-radius: 10px; position: relative; display: flex; flex-direction: column;">
3+
<div style="display: flex; flex-direction: row; justify-content: space-between;">
44
<div>
55
<el-button type="primary" text bg v-if="detail?.status === AiImageStatusEnum.IN_PROGRESS">
66
生成中
@@ -15,24 +15,34 @@
1515
<!-- 操作区 -->
1616
<div>
1717
<el-button
18-
class="btn"
18+
style="padding: 10px; margin: 0;"
1919
text
2020
:icon="Download"
2121
@click="handleButtonClick('download', detail)"
2222
/>
2323
<el-button
24-
class="btn"
24+
style="padding: 10px; margin: 0;"
2525
text
2626
:icon="RefreshRight"
2727
@click="handleButtonClick('regeneration', detail)"
2828
/>
29-
<el-button class="btn" text :icon="Delete" @click="handleButtonClick('delete', detail)" />
30-
<el-button class="btn" text :icon="More" @click="handleButtonClick('more', detail)" />
29+
<el-button
30+
style="padding: 10px; margin: 0;"
31+
text
32+
:icon="Delete"
33+
@click="handleButtonClick('delete', detail)"
34+
/>
35+
<el-button
36+
style="padding: 10px; margin: 0;"
37+
text
38+
:icon="More"
39+
@click="handleButtonClick('more', detail)"
40+
/>
3141
</div>
3242
</div>
33-
<div class="image-wrapper" ref="cardImageRef">
43+
<div style="overflow: hidden; margin-top: 20px; height: 280px; flex: 1;" ref="cardImageRef">
3444
<el-image
35-
class="image"
45+
style="width: 100%; border-radius: 10px;"
3646
:src="detail?.picUrl"
3747
:preview-src-list="[detail.picUrl]"
3848
preview-teleported
@@ -42,7 +52,7 @@
4252
</div>
4353
</div>
4454
<!-- Midjourney 专属操作 -->
45-
<div class="image-mj-btns">
55+
<div style="margin-top: 5px; width: 100%; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start;">
4656
<el-button
4757
size="small"
4858
v-for="button in detail?.buttons"
@@ -116,47 +126,3 @@ onMounted(async () => {
116126
await handleLoading(props.detail.status as string)
117127
})
118128
</script>
119-
120-
<style scoped lang="scss">
121-
.image-card {
122-
width: 320px;
123-
height: auto;
124-
border-radius: 10px;
125-
position: relative;
126-
display: flex;
127-
flex-direction: column;
128-
129-
.image-operation {
130-
display: flex;
131-
flex-direction: row;
132-
justify-content: space-between;
133-
134-
.btn {
135-
//border: 1px solid red;
136-
padding: 10px;
137-
margin: 0;
138-
}
139-
}
140-
141-
.image-wrapper {
142-
overflow: hidden;
143-
margin-top: 20px;
144-
height: 280px;
145-
flex: 1;
146-
147-
.image {
148-
width: 100%;
149-
border-radius: 10px;
150-
}
151-
}
152-
153-
.image-mj-btns {
154-
margin-top: 5px;
155-
width: 100%;
156-
display: flex;
157-
flex-direction: row;
158-
flex-wrap: wrap;
159-
justify-content: flex-start;
160-
}
161-
}
162-
</style>

0 commit comments

Comments
 (0)