fix: 修复管理端前端 lint 与构建问题
- 收敛 easyflow-ui-admin 的 lint、格式和类型问题 - 修正 demo 页面与管理端前端构建失败点 - 验证 pnpm lint 与 pnpm build 均已通过
This commit is contained in:
@@ -408,8 +408,8 @@ const save = async () => {
|
||||
}
|
||||
|
||||
.model-modal__ability-panel {
|
||||
overflow: hidden;
|
||||
padding: 2px;
|
||||
overflow: hidden;
|
||||
border-radius: 18px;
|
||||
}
|
||||
|
||||
@@ -421,8 +421,8 @@ const save = async () => {
|
||||
}
|
||||
|
||||
.model-modal__ability-separator {
|
||||
width: 1px;
|
||||
align-self: stretch;
|
||||
width: 1px;
|
||||
min-height: 28px;
|
||||
background: hsl(var(--divider-faint) / 62%);
|
||||
border-radius: 999px;
|
||||
@@ -430,9 +430,9 @@ const save = async () => {
|
||||
|
||||
.model-modal__ability-chip {
|
||||
display: inline-flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
min-height: 40px;
|
||||
padding: 9px 18px;
|
||||
font-size: 13px;
|
||||
@@ -454,21 +454,21 @@ const save = async () => {
|
||||
.model-modal__ability-chip:hover:not(:disabled),
|
||||
.model-modal__ability-chip:focus-visible:not(:disabled) {
|
||||
color: hsl(var(--text-strong));
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 10px 18px -14px hsl(var(--foreground) / 28%);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.model-modal__ability-chip.is-active {
|
||||
color: hsl(var(--text-strong));
|
||||
border-color: hsl(var(--primary) / 18%);
|
||||
background: hsl(var(--primary) / 10%);
|
||||
border-color: hsl(var(--primary) / 18%);
|
||||
box-shadow: inset 0 0 0 1px hsl(var(--primary) / 14%);
|
||||
}
|
||||
|
||||
.model-modal__ability-chip.is-disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.56;
|
||||
box-shadow: none;
|
||||
opacity: 0.56;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
<script setup lang="ts">
|
||||
import {computed, reactive, ref} from 'vue';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
|
||||
import {EasyFlowFormModal} from '@easyflow/common-ui';
|
||||
import { EasyFlowFormModal } from '@easyflow/common-ui';
|
||||
|
||||
import {ArrowDown, ArrowUp} from '@element-plus/icons-vue';
|
||||
import {ElForm, ElFormItem, ElIcon, ElInput, ElMessage, ElOption, ElSelect,} from 'element-plus';
|
||||
import { ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
ElIcon,
|
||||
ElInput,
|
||||
ElMessage,
|
||||
ElOption,
|
||||
ElSelect,
|
||||
} from 'element-plus';
|
||||
|
||||
import {api} from '#/api/request';
|
||||
import { api } from '#/api/request';
|
||||
import UploadAvatar from '#/components/upload/UploadAvatar.vue';
|
||||
import {$t} from '#/locales';
|
||||
import {syncProgrammaticFieldValidation} from '#/utils/form-validation';
|
||||
import { $t } from '#/locales';
|
||||
import { syncProgrammaticFieldValidation } from '#/utils/form-validation';
|
||||
import ModelProviderBadge from '#/views/ai/model/ModelProviderBadge.vue';
|
||||
import {getProviderPresetByValue, providerPresets,} from '#/views/ai/model/modelUtils/defaultIcon';
|
||||
import {
|
||||
getProviderPresetByValue,
|
||||
providerPresets,
|
||||
} from '#/views/ai/model/modelUtils/defaultIcon';
|
||||
|
||||
const emit = defineEmits(['reload']);
|
||||
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import {computed, reactive, ref} from 'vue';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
|
||||
import {EasyFlowFormModal} from '@easyflow/common-ui';
|
||||
import { EasyFlowFormModal } from '@easyflow/common-ui';
|
||||
|
||||
import {CircleCheckFilled, WarningFilled} from '@element-plus/icons-vue';
|
||||
import {ElForm, ElFormItem, ElMessage, ElOption, ElSelect,} from 'element-plus';
|
||||
import { CircleCheckFilled, WarningFilled } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
ElMessage,
|
||||
ElOption,
|
||||
ElSelect,
|
||||
} from 'element-plus';
|
||||
|
||||
import {api} from '#/api/request';
|
||||
import {$t} from '#/locales';
|
||||
import { api } from '#/api/request';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
type VerifyStatus = 'error' | 'idle' | 'success';
|
||||
|
||||
|
||||
@@ -263,16 +263,13 @@ const getSelectedAbilityTagsForLlm = (llm: llmType): ModelAbilityItem[] => {
|
||||
}
|
||||
|
||||
.llm-item__description {
|
||||
display: -webkit-box;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: hsl(var(--text-muted));
|
||||
}
|
||||
|
||||
.llm-item__description {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ const handleToggleVisibleChecked = (checked: boolean | number | string) => {
|
||||
checkedModelIds.value = [...next];
|
||||
};
|
||||
|
||||
const handlePublishToggle = async (nextValue: string | number | boolean) => {
|
||||
const handlePublishToggle = async (nextValue: boolean | number | string) => {
|
||||
if (!draft.id || !selectedModel.value || isPublishing.value) {
|
||||
return;
|
||||
}
|
||||
@@ -978,9 +978,9 @@ defineExpose({
|
||||
|
||||
.gateway-workspace__batch {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
background: hsl(var(--surface-contrast-soft) / 48%);
|
||||
border: 1px solid hsl(var(--divider-faint) / 40%);
|
||||
@@ -1019,8 +1019,8 @@ defineExpose({
|
||||
}
|
||||
|
||||
.gateway-model-item.is-active {
|
||||
border-color: hsl(var(--primary) / 42%);
|
||||
background: hsl(var(--primary) / 7%);
|
||||
border-color: hsl(var(--primary) / 42%);
|
||||
}
|
||||
|
||||
.gateway-model-item__content {
|
||||
@@ -1148,9 +1148,9 @@ defineExpose({
|
||||
|
||||
.gateway-form__actions {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
gap: 12px;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.gateway-info-grid {
|
||||
@@ -1189,8 +1189,8 @@ defineExpose({
|
||||
}
|
||||
|
||||
.gateway-example-item pre {
|
||||
margin: 0;
|
||||
padding: 14px;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
font-size: 12px;
|
||||
line-height: 1.7;
|
||||
@@ -1240,18 +1240,18 @@ defineExpose({
|
||||
}
|
||||
|
||||
.gateway-form__switch-row {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.gateway-form__invoke-row {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.gateway-publish-inline {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.gateway-hero__title {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
createProviderDraft,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type {ProviderPreset} from './defaultIcon';
|
||||
import type { ProviderPreset } from './defaultIcon';
|
||||
|
||||
export const PROVIDER_EDITABLE_FIELDS = [
|
||||
'apiKey',
|
||||
|
||||
Reference in New Issue
Block a user