优化了UI

This commit is contained in:
Wenjie Zhang 2025-03-14 03:50:33 +08:00
parent 89046fa31f
commit 294f4b9933
2 changed files with 17 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -164,7 +164,7 @@
<div class="model-title-container"> <div class="model-title-container">
<h3>{{ modelNames[item].name }}</h3> <h3>{{ modelNames[item].name }}</h3>
<a :href="modelNames[item].url" target="_blank" class="model-url"> <a :href="modelNames[item].url" target="_blank" class="model-url">
更多模型 <InfoCircleOutlined />
</a> </a>
</div> </div>
<a-button <a-button
@ -197,7 +197,7 @@
<div class="model-title-container"> <div class="model-title-container">
<h3 style="font-weight: 400">{{ modelNames[item].name }}</h3> <h3 style="font-weight: 400">{{ modelNames[item].name }}</h3>
<a :href="modelNames[item].url" target="_blank" class="model-url"> <a :href="modelNames[item].url" target="_blank" class="model-url">
<InfoCircleOutlined /> 更多模型 <InfoCircleOutlined />
</a> </a>
</div> </div>
<div class="missing-keys"> <div class="missing-keys">
@ -270,8 +270,11 @@ const notModelKeys = computed(() => {
return Object.keys(modelStatus.value || {}).filter(key => !modelStatus.value?.[key]) return Object.keys(modelStatus.value || {}).filter(key => !modelStatus.value?.[key])
}) })
// //
const expandedModels = reactive({}) const expandedModels = reactive(modelKeys.value.reduce((acc, key) => {
acc[key] = true
return acc
}, {}))
const generateRandomHash = (length) => { const generateRandomHash = (length) => {
let chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; let chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
@ -517,12 +520,14 @@ const sendRestart = () => {
padding: 12px; padding: 12px;
.card-header { .card-header {
display: flex; display: flex;
align-items: flex-start; align-items: center;
gap: 10px; gap: 10px;
.model-title-container { .model-title-container {
display: flex; display: flex;
flex-direction: column; flex-direction: row;
align-items: center;
gap: 10px;
flex: 1; flex: 1;
} }
@ -533,8 +538,9 @@ const sendRestart = () => {
} }
.model-icon { .model-icon {
width: 40px; width: 28px;
height: 40px; height: 28px;
// //
filter: grayscale(100%); filter: grayscale(100%);
img { img {
@ -610,7 +616,7 @@ const sendRestart = () => {
.icon-wrapper { .icon-wrapper {
display: inline-flex; display: inline-flex;
transition: transform 0.5s ease; transition: transform 0.2s ease;
&.rotated { &.rotated {
transform: rotate(180deg); transform: rotate(180deg);
@ -622,10 +628,10 @@ const sendRestart = () => {
.card-body-wrapper { .card-body-wrapper {
max-height: 0; max-height: 0;
overflow: hidden; overflow: hidden;
transition: max-height 0.5s ease-in-out; transition: max-height 0.2s ease-out; //
&.expanded { &.expanded {
max-height: 500px; /* 设置一个足够大的值 */ max-height: 700px; /* 设置一个足够大的值 */
} }
} }