@eaera-com/eaera-widgets-v2

中文文档
0.2.8发布于 2026/11/05UNLICENSEDTypeScriptESM + CJS零依赖近 30 天下载 2889

Vue 3 UI widget library shared across Eaera CRM products

原始使用文档
文档目录6 节
  1. Install
  2. Usage
  3. Styles
  4. Development (this repo)
  5. Attributions
  6. License

@eaera-com/eaera-widgets-v2

Shared Vue 3 UI widget library built with Vite + TypeScript, used across Eaera CRM products (Backoffice and Client Portals). Ships per-component ESM modules for tree-shaking, a full single-file bundle, and bundled type declarations.

Install

yarn add @eaera-com/eaera-widgets-v2

Required peer dependencies (Yarn does not install peers automatically):

yarn add vue@^3.5 element-plus@^2.14 @element-plus/icons-vue@^2.1 @lucide/vue@^1.14 vue-i18n@^9

Optional peers, only needed if you use the chart widgets:

yarn add echarts@^5.4 vue-echarts@^6.6 lightweight-charts@^5.2

Usage

Full import via the tree-shakable root facade:

import { EaeraButton, EaeraDateTimePicker } from '@eaera-com/eaera-widgets-v2';
import '@eaera-com/eaera-widgets-v2/style.css';

Per-component subpath import (pulls only that widget and its shared chunks):

import EaeraButton from '@eaera-com/eaera-widgets-v2/components/base/EaeraButton';

Single-file bundle (no tree-shaking, everything included):

import { EaeraButton } from '@eaera-com/eaera-widgets-v2/bundle';

Per-component type declarations are resolved automatically from the exports map; no extra types config is needed in consumers.

Styles

Widget-specific styles ship in the style.css export above. Element Plus styles are not injected — the host app must load them itself, e.g.:

import 'element-plus/dist/index.css';

Icon SVG assets (currency/flag icons) are emitted as separate files under assets/ and fetched only when referenced, keeping the shared chunks small.

Development (this repo)

yarn dev         # vite playground
yarn storybook   # component stories
yarn build       # umbrella bundle + per-component build + d.ts shims
yarn typecheck   # vue-tsc --noEmit

The library is published to the public npm registry with publishConfig.access: public.

Attributions

Country flag SVGs: 46 icons sourced from flag-icons v7.2.3.

Copyright (c) 2013 Panayiotis Lipiridis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, subject to the above copyright notice and this permission notice being included in all copies or substantial portions of the Software.

License

Copyright (c) 2026 EAERA. All rights reserved.

This package is UNLICENSED: it is published for internal use by Eaera products only. No rights to use, copy, modify, or redistribute are granted beyond what is necessary to install it as a dependency of an Eaera product. The flag-icons assets above remain subject to their own MIT license.

版本与发布记录

@eaera-com/eaera-widgets-v2 共发布 46 个版本,首次发布于 2026/09/16;过去 12 个月发布了 46 个版本。

版本发布日期距今
0.2.8latest2026/11/058 天前
0.2.72026/11/0211 天前
0.2.62026/11/0211 天前
0.2.52026/10/3014 天前
0.2.42026/10/2915 天前
0.2.32026/10/2915 天前

关于 @eaera-com/eaera-widgets-v2 的常见问题

@eaera-com/eaera-widgets-v2 是什么?

Vue 3 UI widget library shared across Eaera CRM products

如何安装 @eaera-com/eaera-widgets-v2?

在项目目录运行 npm install @eaera-com/eaera-widgets-v2,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.5.0)、shiki(^3.0.0)、marked(^15.0.0)、vue-i18n(^9.0.0)、dompurify(^3.2.0)、@lucide/vue(^1.14.0)、element-plus(^2.14.0)、@element-plus/icons-vue(^2.1.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@eaera-com/eaera-widgets-v2 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@eaera-com/eaera-widgets-v2 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@eaera-com/eaera-widgets-v2 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22 <23。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@eaera-com/eaera-widgets-v2 可以商用吗?

@eaera-com/eaera-widgets-v2 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@eaera-com/eaera-widgets-v2 的下载量有多少?

根据 npm 官方下载统计,@eaera-com/eaera-widgets-v2 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,889 次,日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@eaera-com/eaera-widgets-v2 还在维护吗?

最新版本 0.2.8 发布于 2026/11/05(8 天前);至今共发布 46 个版本,其中过去 12 个月发布了 46 个;首次发布于 2026/09/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。