diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..fed9a2ce --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "Bash(dir:*)" + ] + } +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelApiTypeOption.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelApiTypeOption.cs new file mode 100644 index 00000000..6457c54f --- /dev/null +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelApiTypeOption.cs @@ -0,0 +1,17 @@ +namespace Yi.Framework.AiHub.Application.Contracts.Dtos.Model; + +/// +/// API类型选项 +/// +public class ModelApiTypeOption +{ + /// + /// 显示名称 + /// + public string Label { get; set; } + + /// + /// 枚举值 + /// + public int Value { get; set; } +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelLibraryDto.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelLibraryDto.cs new file mode 100644 index 00000000..07cb12d2 --- /dev/null +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelLibraryDto.cs @@ -0,0 +1,64 @@ +using Yi.Framework.AiHub.Domain.Shared.Enums; + +namespace Yi.Framework.AiHub.Application.Contracts.Dtos.Model; + +/// +/// 模型库展示数据 +/// +public class ModelLibraryDto +{ + /// + /// 模型ID + /// + public string ModelId { get; set; } + + /// + /// 模型名称 + /// + public string Name { get; set; } + + /// + /// 模型描述 + /// + public string? Description { get; set; } + + /// + /// 模型类型 + /// + public ModelTypeEnum ModelType { get; set; } + + /// + /// 模型类型名称 + /// + public string ModelTypeName { get; set; } + + /// + /// 模型API类型 + /// + public ModelApiTypeEnum ModelApiType { get; set; } + + /// + /// 模型API类型名称 + /// + public string ModelApiTypeName { get; set; } + + /// + /// 模型显示倍率 + /// + public decimal MultiplierShow { get; set; } + + /// + /// 供应商分组名称 + /// + public string? ProviderName { get; set; } + + /// + /// 模型图标URL + /// + public string? IconUrl { get; set; } + + /// + /// 是否为尊享模型(PremiumChat类型) + /// + public bool IsPremium { get; set; } +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelLibraryGetListInput.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelLibraryGetListInput.cs new file mode 100644 index 00000000..c3315605 --- /dev/null +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelLibraryGetListInput.cs @@ -0,0 +1,35 @@ +using Yi.Framework.AiHub.Domain.Shared.Enums; +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.AiHub.Application.Contracts.Dtos.Model; + +/// +/// 获取模型库列表查询参数 +/// +public class ModelLibraryGetListInput : PagedAllResultRequestDto +{ + /// + /// 搜索关键词(搜索模型名称、模型ID) + /// + public string? SearchKey { get; set; } + + /// + /// 供应商名称筛选 + /// + public string? ProviderName { get; set; } + + /// + /// 模型类型筛选 + /// + public ModelTypeEnum? ModelType { get; set; } + + /// + /// API类型筛选 + /// + public ModelApiTypeEnum? ModelApiType { get; set; } + + /// + /// 是否只显示尊享模型 + /// + public bool? IsPremiumOnly { get; set; } +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelTypeOption.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelTypeOption.cs new file mode 100644 index 00000000..5afd567d --- /dev/null +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/Model/ModelTypeOption.cs @@ -0,0 +1,17 @@ +namespace Yi.Framework.AiHub.Application.Contracts.Dtos.Model; + +/// +/// 模型类型选项 +/// +public class ModelTypeOption +{ + /// + /// 显示名称 + /// + public string Label { get; set; } + + /// + /// 枚举值 + /// + public int Value { get; set; } +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/IServices/IModelService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/IServices/IModelService.cs new file mode 100644 index 00000000..632045a0 --- /dev/null +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/IServices/IModelService.cs @@ -0,0 +1,35 @@ +using Volo.Abp.Application.Dtos; +using Yi.Framework.AiHub.Application.Contracts.Dtos.Model; + +namespace Yi.Framework.AiHub.Application.Contracts.IServices; + +/// +/// 模型服务接口 +/// +public interface IModelService +{ + /// + /// 获取模型库列表(公开接口,无需登录) + /// + /// 查询参数 + /// 分页模型列表 + Task> GetListAsync(ModelLibraryGetListInput input); + + /// + /// 获取供应商列表(公开接口,无需登录) + /// + /// 供应商列表 + Task> GetProviderListAsync(); + + /// + /// 获取模型类型选项列表(公开接口,无需登录) + /// + /// 模型类型选项 + Task> GetModelTypeOptionsAsync(); + + /// + /// 获取API类型选项列表(公开接口,无需登录) + /// + /// API类型选项 + Task> GetApiTypeOptionsAsync(); +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/ModelService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/ModelService.cs new file mode 100644 index 00000000..0f246e5c --- /dev/null +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/ModelService.cs @@ -0,0 +1,116 @@ +using Mapster; +using SqlSugar; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Yi.Framework.AiHub.Application.Contracts.Dtos.Model; +using Yi.Framework.AiHub.Application.Contracts.IServices; +using Yi.Framework.AiHub.Domain.Entities.Model; +using Yi.Framework.AiHub.Domain.Shared.Enums; +using Yi.Framework.AiHub.Domain.Shared.Extensions; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.AiHub.Application.Services.Chat; + +/// +/// 模型服务 +/// +public class ModelService : ApplicationService, IModelService +{ + private readonly ISqlSugarRepository _modelRepository; + + public ModelService(ISqlSugarRepository modelRepository) + { + _modelRepository = modelRepository; + } + + /// + /// 获取模型库列表(公开接口,无需登录) + /// + public async Task> GetListAsync(ModelLibraryGetListInput input) + { + RefAsync total = 0; + + // 查询所有未删除的模型,使用WhereIF动态添加筛选条件 + var models = await _modelRepository._DbQueryable + .Where(x => !x.IsDeleted) + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), x => + x.Name.Contains(input.SearchKey) || x.ModelId.Contains(input.SearchKey)) + .WhereIF(!string.IsNullOrWhiteSpace(input.ProviderName), x => + x.ProviderName == input.ProviderName) + .WhereIF(input.ModelType.HasValue, x => + x.ModelType == input.ModelType.Value) + .WhereIF(input.ModelApiType.HasValue, x => + x.ModelApiType == input.ModelApiType.Value) + .WhereIF(input.IsPremiumOnly == true, x => + x.ModelType == ModelTypeEnum.PremiumChat) + .OrderBy(x => x.OrderNum) + .OrderBy(x => x.Name) + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + + // 转换为DTO + var result = models.Select(model => new ModelLibraryDto + { + ModelId = model.ModelId, + Name = model.Name, + Description = model.Description, + ModelType = model.ModelType, + ModelTypeName = model.ModelType.GetDescription(), + ModelApiType = model.ModelApiType, + ModelApiTypeName = model.ModelApiType.GetDescription(), + MultiplierShow = model.MultiplierShow, + ProviderName = model.ProviderName, + IconUrl = model.IconUrl, + IsPremium = model.ModelType == ModelTypeEnum.PremiumChat + }).ToList(); + + return new PagedResultDto(total, result); + } + + /// + /// 获取供应商列表(公开接口,无需登录) + /// + public async Task> GetProviderListAsync() + { + var providers = await _modelRepository._DbQueryable + .Where(x => !x.IsDeleted) + .Where(x => !string.IsNullOrEmpty(x.ProviderName)) + .GroupBy(x => x.ProviderName) + .OrderBy(x => x.ProviderName) + .Select(x => x.ProviderName) + .ToListAsync(); + + return providers; + } + + /// + /// 获取模型类型选项列表(公开接口,无需登录) + /// + public Task> GetModelTypeOptionsAsync() + { + var options = Enum.GetValues() + .Select(e => new ModelTypeOption + { + Label = e.GetDescription(), + Value = (int)e + }) + .ToList(); + + return Task.FromResult(options); + } + + /// + /// 获取API类型选项列表(公开接口,无需登录) + /// + public Task> GetApiTypeOptionsAsync() + { + var options = Enum.GetValues() + .Select(e => new ModelApiTypeOption + { + Label = e.GetDescription(), + Value = (int)e + }) + .ToList(); + + return Task.FromResult(options); + } +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelApiTypeEnum.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelApiTypeEnum.cs index aa342dce..cc5cb30c 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelApiTypeEnum.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelApiTypeEnum.cs @@ -1,7 +1,12 @@ -namespace Yi.Framework.AiHub.Domain.Shared.Enums; +using System.ComponentModel; + +namespace Yi.Framework.AiHub.Domain.Shared.Enums; public enum ModelApiTypeEnum { + [Description("OpenAI")] OpenAi, + + [Description("Claude")] Claude } \ No newline at end of file diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelTypeEnum.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelTypeEnum.cs index 3bfbdebe..ce2188bb 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelTypeEnum.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Enums/ModelTypeEnum.cs @@ -1,9 +1,18 @@ -namespace Yi.Framework.AiHub.Domain.Shared.Enums; +using System.ComponentModel; + +namespace Yi.Framework.AiHub.Domain.Shared.Enums; public enum ModelTypeEnum { + [Description("聊天")] Chat = 0, + + [Description("图片")] Image = 1, + + [Description("嵌入")] Embedding = 2, + + [Description("尊享包")] PremiumChat = 3 } \ No newline at end of file diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Extensions/EnumExtensions.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Extensions/EnumExtensions.cs new file mode 100644 index 00000000..e22166e9 --- /dev/null +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Extensions/EnumExtensions.cs @@ -0,0 +1,27 @@ +using System.ComponentModel; +using System.Reflection; + +namespace Yi.Framework.AiHub.Domain.Shared.Extensions; + +/// +/// 枚举扩展方法 +/// +public static class EnumExtensions +{ + /// + /// 获取枚举的Description特性值 + /// + /// 枚举值 + /// Description特性值,如果没有则返回枚举名称 + public static string GetDescription(this Enum value) + { + var field = value.GetType().GetField(value.ToString()); + if (field == null) + { + return value.ToString(); + } + + var attribute = field.GetCustomAttribute(); + return attribute?.Description ?? value.ToString(); + } +} diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Entities/Model/AiModelEntity.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Entities/Model/AiModelEntity.cs index 2a760dbf..991d0ff2 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Entities/Model/AiModelEntity.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Entities/Model/AiModelEntity.cs @@ -65,4 +65,19 @@ public class AiModelEntity : Entity, IOrderNum, ISoftDelete /// 模型倍率 /// public decimal Multiplier { get; set; } = 1; + + /// + /// 模型显示倍率 + /// + public decimal MultiplierShow { get; set; } = 1; + + /// + /// 供应商分组名称(如:OpenAI、Anthropic、Google等) + /// + public string? ProviderName { get; set; } + + /// + /// 模型图标URL + /// + public string? IconUrl { get; set; } } \ No newline at end of file diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs b/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs index 439eae7c..5b52af8b 100644 --- a/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs @@ -32,6 +32,7 @@ using Yi.Framework.AiHub.Application; using Yi.Framework.AiHub.Application.Services; using Yi.Framework.AiHub.Domain.Entities; using Yi.Framework.AiHub.Domain.Entities.Chat; +using Yi.Framework.AiHub.Domain.Entities.Model; using Yi.Framework.AiHub.Domain.Entities.OpenApi; using Yi.Framework.AspNetCore; using Yi.Framework.AspNetCore.Authentication.OAuth; @@ -357,7 +358,7 @@ namespace Yi.Abp.Web var app = context.GetApplicationBuilder(); app.UseRouting(); - // app.ApplicationServices.GetRequiredService().SqlSugarClient.CodeFirst.InitTables(); + // app.ApplicationServices.GetRequiredService().SqlSugarClient.CodeFirst.InitTables(); // app.ApplicationServices.GetRequiredService().SqlSugarClient.CodeFirst.InitTables(); // app.ApplicationServices.GetRequiredService().SqlSugarClient.CodeFirst.InitTables(); diff --git a/Yi.Ai.Vue3/.eslintrc-auto-import.json b/Yi.Ai.Vue3/.eslintrc-auto-import.json index af1083b7..313e6711 100644 --- a/Yi.Ai.Vue3/.eslintrc-auto-import.json +++ b/Yi.Ai.Vue3/.eslintrc-auto-import.json @@ -5,6 +5,8 @@ "ComputedRef": true, "DirectiveBinding": true, "EffectScope": true, + "ElMessage": true, + "ElMessageBox": true, "ExtractDefaultPropTypes": true, "ExtractPropTypes": true, "ExtractPublicPropTypes": true, diff --git a/Yi.Ai.Vue3/src/api/model/index.ts b/Yi.Ai.Vue3/src/api/model/index.ts index 91748029..8c496083 100644 --- a/Yi.Ai.Vue3/src/api/model/index.ts +++ b/Yi.Ai.Vue3/src/api/model/index.ts @@ -1,10 +1,56 @@ -import type { GetSessionListVO } from './types'; +import type { GetSessionListVO, ModelApiTypeOption, ModelLibraryDto, ModelLibraryGetListInput, ModelTypeOption, PagedResultDto } from './types'; import { del, get, post, put } from '@/utils/request'; // 获取当前用户的模型列表 export function getModelList() { return get('/ai-chat/model').json(); } + +// 获取模型库列表(公开接口,无需登录) +export function getModelLibraryList(params?: ModelLibraryGetListInput) { + const queryParams = new URLSearchParams(); + if (params?.searchKey) { + queryParams.append('SearchKey', params.searchKey); + } + if (params?.providerName) { + queryParams.append('ProviderName', params.providerName); + } + if (params?.modelType !== undefined) { + queryParams.append('ModelType', params.modelType.toString()); + } + if (params?.modelApiType !== undefined) { + queryParams.append('ModelApiType', params.modelApiType.toString()); + } + if (params?.isPremiumOnly !== undefined) { + queryParams.append('IsPremiumOnly', params.isPremiumOnly.toString()); + } + if (params?.skipCount !== undefined) { + queryParams.append('SkipCount', params.skipCount.toString()); + } + if (params?.maxResultCount !== undefined) { + queryParams.append('MaxResultCount', params.maxResultCount.toString()); + } + + const queryString = queryParams.toString(); + const url = queryString ? `/model?${queryString}` : '/model'; + + return get>(url).json(); +} + +// 获取供应商列表(公开接口,无需登录) +export function getProviderList() { + return get('/model/provider-list').json(); +} + +// 获取模型类型选项列表(公开接口,无需登录) +export function getModelTypeOptions() { + return get('/model/model-type-options').json(); +} + +// 获取API类型选项列表(公开接口,无需登录) +export function getApiTypeOptions() { + return get('/model/api-type-options').json(); +} // 申请ApiKey export function applyApiKey() { return post('/token').json(); diff --git a/Yi.Ai.Vue3/src/api/model/types.ts b/Yi.Ai.Vue3/src/api/model/types.ts index 30a43521..13f1f846 100644 --- a/Yi.Ai.Vue3/src/api/model/types.ts +++ b/Yi.Ai.Vue3/src/api/model/types.ts @@ -13,3 +13,61 @@ export interface GetSessionListVO { remark?: string; modelId?: string; } + +// 模型类型枚举 +export enum ModelTypeEnum { + Chat = 0, + Image = 1, + Embedding = 2, + PremiumChat = 3, +} + +// 模型API类型枚举 +export enum ModelApiTypeEnum { + OpenAi = 0, + Claude = 1, +} + +// 模型库展示数据 +export interface ModelLibraryDto { + modelId: string; + name: string; + description?: string; + modelType: ModelTypeEnum; + modelTypeName: string; + modelApiType: ModelApiTypeEnum; + modelApiTypeName: string; + multiplierShow: number; + providerName?: string; + iconUrl?: string; + isPremium: boolean; +} + +// 获取模型库列表查询参数 +export interface ModelLibraryGetListInput { + searchKey?: string; + providerName?: string; + modelType?: ModelTypeEnum; + modelApiType?: ModelApiTypeEnum; + isPremiumOnly?: boolean; + skipCount?: number; + maxResultCount?: number; +} + +// 分页结果 +export interface PagedResultDto { + items: T[]; + totalCount: number; +} + +// 模型类型选项 +export interface ModelTypeOption { + label: string; + value: number; +} + +// API类型选项 +export interface ModelApiTypeOption { + label: string; + value: number; +} diff --git a/Yi.Ai.Vue3/src/layouts/components/Header/components/ModelLibraryBtn.vue b/Yi.Ai.Vue3/src/layouts/components/Header/components/ModelLibraryBtn.vue new file mode 100644 index 00000000..3c8cba82 --- /dev/null +++ b/Yi.Ai.Vue3/src/layouts/components/Header/components/ModelLibraryBtn.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/Yi.Ai.Vue3/src/layouts/components/Header/index.vue b/Yi.Ai.Vue3/src/layouts/components/Header/index.vue index 9cd4ff9e..84a42ed5 100644 --- a/Yi.Ai.Vue3/src/layouts/components/Header/index.vue +++ b/Yi.Ai.Vue3/src/layouts/components/Header/index.vue @@ -10,6 +10,7 @@ import Avatar from './components/Avatar.vue'; import Collapse from './components/Collapse.vue'; import CreateChat from './components/CreateChat.vue'; import LoginBtn from './components/LoginBtn.vue'; +import ModelLibraryBtn from './components/ModelLibraryBtn.vue'; import TitleEditing from './components/TitleEditing.vue'; const userStore = useUserStore(); @@ -72,6 +73,7 @@ onKeyStroke(event => event.ctrlKey && event.key.toLowerCase() === 'k', handleCtr
+ diff --git a/Yi.Ai.Vue3/src/pages/modelLibrary/index.vue b/Yi.Ai.Vue3/src/pages/modelLibrary/index.vue new file mode 100644 index 00000000..cfd61355 --- /dev/null +++ b/Yi.Ai.Vue3/src/pages/modelLibrary/index.vue @@ -0,0 +1,804 @@ + + + + + diff --git a/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts b/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts index 33c16955..cf1991bb 100644 --- a/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts +++ b/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts @@ -37,12 +37,23 @@ export const layoutRouter: RouteRecordRaw[] = [ component: () => import('@/pages/products/index.vue'), meta: { title: '产品页面', - keepAlive: true, // 如果需要缓存 - isDefaultChat: false, // 根据实际情况设置 - layout: 'blankPage', // 如果需要自定义布局 + keepAlive: true, + isDefaultChat: false, + layout: 'blankPage', }, }, + { + path: '/model-library', + name: 'modelLibrary', + component: () => import('@/pages/modelLibrary/index.vue'), + meta: { + title: '模型库', + keepAlive: true, + isDefaultChat: false, + layout: 'blankPage', + }, + }, { path: '/pay-result', name: 'payResult', diff --git a/Yi.Ai.Vue3/types/components.d.ts b/Yi.Ai.Vue3/types/components.d.ts index 3c616a10..65aefeea 100644 --- a/Yi.Ai.Vue3/types/components.d.ts +++ b/Yi.Ai.Vue3/types/components.d.ts @@ -13,6 +13,43 @@ declare module 'vue' { CardFlipActivity: typeof import('./../src/components/userPersonalCenter/components/CardFlipActivity.vue')['default'] DailyTask: typeof import('./../src/components/userPersonalCenter/components/DailyTask.vue')['default'] DeepThinking: typeof import('./../src/components/DeepThinking/index.vue')['default'] + ElAlert: typeof import('element-plus/es')['ElAlert'] + ElAvatar: typeof import('element-plus/es')['ElAvatar'] + ElBadge: typeof import('element-plus/es')['ElBadge'] + ElButton: typeof import('element-plus/es')['ElButton'] + ElCard: typeof import('element-plus/es')['ElCard'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCollapse: typeof import('element-plus/es')['ElCollapse'] + ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] + ElContainer: typeof import('element-plus/es')['ElContainer'] + ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElDialog: typeof import('element-plus/es')['ElDialog'] + ElDivider: typeof import('element-plus/es')['ElDivider'] + ElEmpty: typeof import('element-plus/es')['ElEmpty'] + ElForm: typeof import('element-plus/es')['ElForm'] + ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElHeader: typeof import('element-plus/es')['ElHeader'] + ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] + ElInput: typeof import('element-plus/es')['ElInput'] + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] + ElMain: typeof import('element-plus/es')['ElMain'] + ElMenu: typeof import('element-plus/es')['ElMenu'] + ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] + ElProgress: typeof import('element-plus/es')['ElProgress'] + ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] + ElSwitch: typeof import('element-plus/es')['ElSwitch'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTabPane: typeof import('element-plus/es')['ElTabPane'] + ElTabs: typeof import('element-plus/es')['ElTabs'] + ElTag: typeof import('element-plus/es')['ElTag'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] + ElTooltip: typeof import('element-plus/es')['ElTooltip'] FilesSelect: typeof import('./../src/components/FilesSelect/index.vue')['default'] IconSelect: typeof import('./../src/components/IconSelect/index.vue')['default'] Indexl: typeof import('./../src/components/SupportModelProducts/indexl.vue')['default'] @@ -39,4 +76,7 @@ declare module 'vue' { VerificationCode: typeof import('./../src/components/LoginDialog/components/FormLogin/VerificationCode.vue')['default'] WelecomeText: typeof import('./../src/components/WelecomeText/index.vue')['default'] } + export interface GlobalDirectives { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } diff --git a/Yi.Ai.Vue3/types/import_meta.d.ts b/Yi.Ai.Vue3/types/import_meta.d.ts index d8a60d41..b3e9d275 100644 --- a/Yi.Ai.Vue3/types/import_meta.d.ts +++ b/Yi.Ai.Vue3/types/import_meta.d.ts @@ -6,7 +6,6 @@ interface ImportMetaEnv { readonly VITE_WEB_ENV: string; readonly VITE_WEB_BASE_API: string; readonly VITE_API_URL: string; - readonly VITE_BUILD_COMPRESS: string; readonly VITE_SSO_SEVER_URL: string; readonly VITE_APP_VERSION: string; }