File tree Expand file tree Collapse file tree 3 files changed +45
-29
lines changed
src/views/ai/writer/index Expand file tree Collapse file tree 3 files changed +45
-29
lines changed Original file line number Diff line number Diff line change 24
24
</h3 >
25
25
</DefineLabel >
26
26
27
- <div class =" relative " v-bind =" $attrs" >
27
+ <div class =" flex flex-col " v-bind =" $attrs" >
28
28
<!-- tab -->
29
- <div
30
- class =" absolute left-1/2 top-2 -translate-x-1/2 w-[303px] rounded-full bg-[#DDDFE3] p-1 z-10"
31
- >
29
+ <div class =" w-full pt-2 bg-[#f5f7f9] flex justify-center" >
32
30
<div
33
- class =" flex items-center relative after:content-[''] after:block after:bg-white after:h-[30px] after:w-1/2 after:absolute after:top-0 after:left-0 after:transition-transform after:rounded-full"
34
- :class =" selectedTab === AiWriteTypeEnum.REPLY && 'after:transform after:translate-x-[100%]'"
31
+ class =" w-[303px] rounded-full bg-[#DDDFE3] p-1 z-10"
35
32
>
36
- <ReuseTab
37
- v-for =" tab in tabs"
38
- :key =" tab.value"
39
- :text =" tab.text"
40
- :active =" tab.value === selectedTab"
41
- :itemClick =" () => switchTab(tab.value)"
42
- />
33
+ <div
34
+ class =" flex items-center relative after:content-[''] after:block after:bg-white after:h-[30px] after:w-1/2 after:absolute after:top-0 after:left-0 after:transition-transform after:rounded-full"
35
+ :class =" selectedTab === AiWriteTypeEnum.REPLY && 'after:transform after:translate-x-[100%]'"
36
+ >
37
+ <ReuseTab
38
+ v-for =" tab in tabs"
39
+ :key =" tab.value"
40
+ :text =" tab.text"
41
+ :active =" tab.value === selectedTab"
42
+ :itemClick =" () => switchTab(tab.value)"
43
+ />
44
+ </div >
43
45
</div >
44
46
</div >
45
47
<div
46
- class =" px-7 pb-2 pt-[46px] overflow-y-auto lg:block w-[380px] box-border bg-[#ECEDEF ] h-full"
48
+ class =" px-7 pb-2 flex-grow overflow-y-auto lg:block w-[380px] box-border bg-[#f5f7f9 ] h-full"
47
49
>
48
50
<div >
49
51
<template v-if =" selectedTab === 1 " >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" h-full box-border flex flex-col px-7" >
3
- <h3 class =" m-0 h-14 -mx-7 px-7 shrink-0 flex items-center justify-between bg-[#ecedef]" >
4
- <span >预览</span >
5
- <!-- 展示在右上角 -->
6
- <el-button color =" #846af7" v-show =" showCopy" @click =" copyContent" size =" small" >
7
- <template #icon >
8
- <Icon icon =" ph:copy-bold" />
9
- </template >
10
- 复制
11
- </el-button >
12
- </h3 >
2
+ <el-card class =" my-card h-full" >
3
+ <template #header
4
+ ><h3 class =" m-0 px-7 shrink-0 flex items-center justify-between" >
5
+ <span >预览</span >
6
+ <!-- 展示在右上角 -->
7
+ <el-button color =" #846af7" v-show =" showCopy" @click =" copyContent" size =" small" >
8
+ <template #icon >
9
+ <Icon icon =" ph:copy-bold" />
10
+ </template >
11
+ 复制
12
+ </el-button >
13
+ </h3 ></template
14
+ >
13
15
14
- <div ref =" contentRef" class =" hide-scroll-bar flex-grow box-border overflow-y-auto" >
16
+ <div ref =" contentRef" class =" hide-scroll-bar h-full box-border overflow-y-auto" >
15
17
<div class =" w-full min-h-full relative flex-grow bg-white box-border p-3 sm:p-7" >
16
18
<!-- 终止生成内容的按钮 -->
17
19
<el-button
36
38
/>
37
39
</div >
38
40
</div >
39
- </div >
41
+ </el-card >
40
42
</template >
41
43
42
44
<script setup lang="ts">
@@ -102,4 +104,17 @@ watch(copied, (val) => {
102
104
height : 0 ;
103
105
}
104
106
}
107
+
108
+ .my-card {
109
+ display : flex ;
110
+ flex-direction : column ;
111
+
112
+ :deep (.el-card__body ) {
113
+ box-sizing : border-box ;
114
+ flex-grow : 1 ;
115
+ overflow-y : auto ;
116
+ padding : 0 ;
117
+ @extend .hide-scroll-bar ;
118
+ }
119
+ }
105
120
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <!-- TODO @hhhero:整体没啥问题了。感觉整体框框的样子可以优化下,可以参考下绘图界面。例如说:1)写作的“预览”和绘图的“绘图任务”的 header;2)左右的边界,有个竖线之类的。 -->
3
- <div class =" h-[calc(100vh-var(--top-tool-height)-var(--app-footer-height)-40px)] -m-5 flex" >
2
+ <div class =" absolute top-0 left-0 right-0 bottom-0 flex" >
4
3
<Left
5
4
:is-writing =" isWriting"
6
5
class =" h-full"
You can’t perform that action at this time.
0 commit comments