diff --git a/src/assets/model_header.png b/src/assets/model_header.png index d55e17c..081c8fd 100644 Binary files a/src/assets/model_header.png and b/src/assets/model_header.png differ diff --git a/src/views/modelList/components/ModelCard.vue b/src/views/modelList/components/ModelCard.vue index 61a9659..21c2012 100644 --- a/src/views/modelList/components/ModelCard.vue +++ b/src/views/modelList/components/ModelCard.vue @@ -12,8 +12,8 @@ interface CardProductType { description: string; deviceSort: string; updateTime: string; - type: number; - industry: number; + type: string; + industry: string; } const props = defineProps({ @@ -68,6 +68,11 @@ const cardClass = computed(() => [ { "model-card_offline": props.device?.state === "离线" } ]); +const deepAlgorithm = computed(() => [ + "model-type", + { "model-type_deep": props.device?.type === "深度学习" } +]); + // const stateClass = computed(() => [ // "model-state", // { "model-state_offline": props.device?.state === "离线" } @@ -78,6 +83,7 @@ const cardClass = computed(() => [
{{ device?.deviceSort }}
+
{{ device?.type }}
@@ -143,7 +149,28 @@ const cardClass = computed(() => [ background-position: 100% 100%; background-size: cover; border-radius: 8px 8px 0 0; - + .model-name { + margin-right: 8px; + max-width: 50%; + white-space: nowrap; /* 文本不换行 */ + overflow: hidden; /* 超出部分隐藏 */ + text-overflow: ellipsis; /* 超出部分显示为省略号 */ + } + .model-type, + .model-type_deep { + width: 56px; + height: 20px; + font-size: 12px; + text-align: center; + font-weight: 500; + line-height: 20px; + color: #fff; + background: linear-gradient(180deg, #21c7ff 0%, #428cff 100%); + border-radius: 2px 2px 2px 2px; + } + .model-type_deep { + background: linear-gradient(180deg, #ffb21a 0%, #ff9b3e 100%); + } .model-icon { position: absolute; top: 8px; @@ -156,6 +183,7 @@ const cardClass = computed(() => [ width: 100%; height: 190px; padding: 16px; + background: #fafcff; .model-version, .model-provider, diff --git a/src/views/modelList/index.vue b/src/views/modelList/index.vue index 6f7f3c9..747e63a 100644 --- a/src/views/modelList/index.vue +++ b/src/views/modelList/index.vue @@ -57,6 +57,9 @@ onMounted(() => {