@ -0,0 +1,136 @@ |
|||||
|
<script lang="ts"> |
||||
|
let list = [ |
||||
|
{ |
||||
|
title: '工作', |
||||
|
bg: '/img/work.png', |
||||
|
id: '3', |
||||
|
buttons: [ |
||||
|
{ |
||||
|
label: '工作总结', |
||||
|
img: '/img/icon/work.png', |
||||
|
imgActive: '/img/icon/work_active.png' |
||||
|
}, |
||||
|
{ |
||||
|
label: '工作总结', |
||||
|
img: '/img/icon/document.png', |
||||
|
imgActive: '/img/icon/document_active.png' |
||||
|
} |
||||
|
], |
||||
|
introduce: [ |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
}, |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
}, |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
} |
||||
|
], |
||||
|
active:true |
||||
|
}, |
||||
|
{ |
||||
|
title: '知识库', |
||||
|
bg: '/img/knowledge.png', |
||||
|
id: '2', |
||||
|
buttons: [ |
||||
|
{ |
||||
|
label: '检索知识库', |
||||
|
img: '/img/icon/knowledge.png', |
||||
|
imgActive: '/img/icon/knowledge_active.png' |
||||
|
}, |
||||
|
{ |
||||
|
label: '上传文档', |
||||
|
img: '/img/icon/upload.png', |
||||
|
imgActive: '/img/icon/upload_active.png' |
||||
|
} |
||||
|
], |
||||
|
introduce: [ |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
}, |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
}, |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
title: '使用记录', |
||||
|
bg: '/img/record.png', |
||||
|
id: '1', |
||||
|
buttons: [ |
||||
|
{ |
||||
|
label: '历史消息', |
||||
|
img: '/img/icon/record.png', |
||||
|
imgActive: '/img/icon/record_active.png' |
||||
|
} |
||||
|
], |
||||
|
introduce: [ |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
}, |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
}, |
||||
|
{ |
||||
|
label: '介绍' |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
]; |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<div class="flex flex-col border-box header_box"> |
||||
|
<div class="top flex"> |
||||
|
<img src={'favicon.png'} alt="" class="w-16 h-16 mr-5" /> |
||||
|
<div class="tip flex flex-col"> |
||||
|
<h1 class="text-gray-800">Hi,我是您的AI小助手<span class="text-blue-700">e小星</span></h1> |
||||
|
<p class="text-gray-800 text-left text-base">需要我帮您做点什么?</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="flex justify-around w-full mt-10"> |
||||
|
{#each list as item, itemIndex (item.id)} |
||||
|
<div |
||||
|
class="flex flex-col flex-1 mr-3 rounded-2xl p-6 box-border bg-cover" |
||||
|
style="background-image: url('{item.bg}')" |
||||
|
> |
||||
|
<h2 class="text-gray-800 text-left text-2xl">{item.title}</h2> |
||||
|
<div> |
||||
|
{#each item.introduce as itemP, index (index)} |
||||
|
<p class="text-gray-500 text-left text-sm mt-1.5">{itemP.label}</p> |
||||
|
{/each} |
||||
|
</div> |
||||
|
<div class="flex mt-5.5"> |
||||
|
{#each item.buttons as but, index (index)} |
||||
|
<button |
||||
|
class="font-medium text-black text-base mr-4 bg-white rounded-2xl px-6 py-1 box-border flex items-center border" |
||||
|
on:click={() => { |
||||
|
console.log(but, index); |
||||
|
}} |
||||
|
> |
||||
|
<img src={but.img} alt="" class="w-5 h-5" /> |
||||
|
{but.label} |
||||
|
</button> |
||||
|
{/each} |
||||
|
</div> |
||||
|
</div> |
||||
|
{/each} |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.header_box { |
||||
|
background-image: url('img/bg-chat.png'); |
||||
|
height: 400px; |
||||
|
background-size: 100% 100%; |
||||
|
padding: 50px 70px 39px; |
||||
|
box-sizing: border-box; |
||||
|
width: calc(100vw - 20px); |
||||
|
margin: 0 auto; |
||||
|
border-radius: 5px; |
||||
|
} |
||||
|
</style> |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 550 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 737 B |
After Width: | Height: | Size: 898 B |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 204 KiB |
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 10 KiB |