@oods/components-vue

中文文档
0.11.3发布于 2026/11/02Apache-2.0TypeScriptESM + CJS

Vue 3 components for OODS Foundry: the controls, layouts and domain views its generated screens use.

原始使用文档
文档目录4 节
  1. Install
  2. First result
  3. Limits
  4. License

@oods/components-vue

Vue components used by screens generated with OODS Foundry. The package exports controls, layouts and domain views; @oods/component-styles provides their CSS.

Install

npm install @oods/components-vue @oods/component-styles @oods/tokens @oods/component-contracts vue

Use Vue 3. Bring your existing Vue app or use OODS Foundry's code_generate with options.output: "application" for an app entry and Vite configuration.

First result

<script setup>
import { Button } from '@oods/components-vue';
import '@oods/component-styles/css';
const review = () => window.alert('Connect this action to your application.');
</script>

<template>
  <Button content="Review stock" intent="primary" @activate="review" />
</template>

Set data-brand="A" and data-theme="light" on the root HTML element. The result is a button labelled “Review stock” that invokes the supplied handler. Set the theme to dark or hc for those scopes.

Generated sample screens identify their sample data. A workflow's local store is not a production database; supply your data, navigation and persistence handlers. Retained component evidence covers named scenarios and themes, not every application you build. For your own implementation of a shipped component, use OODS Foundry's substitution mapping and inspect its advisory contract report.

Limits

Generated apps pin the OODS release that generated them; to upgrade, regenerate the app or move all four pins together. These packages are separate from the local MCP server, @oods/foundry.

License

Apache License 2.0. See LICENSE and NOTICE. Generated output belongs to its user; installed package dependencies retain their own licenses.

版本与发布记录

@oods/components-vue 共发布 25 个版本,首次发布于 2026/09/26;过去 12 个月发布了 25 个版本。

版本发布日期距今
0.11.3latest2026/11/021 天前
0.11.22026/10/1123 天前
0.11.12026/10/1023 天前
0.11.02026/10/0925 天前
0.10.22026/10/0925 天前
0.10.12026/10/0825 天前

关于 @oods/components-vue 的常见问题

@oods/components-vue 是什么?

用于OODS Foundry的Vue 3组件:其生成的屏幕使用的控件、布局和域视图。

如何安装 @oods/components-vue?

在项目目录运行 npm install @oods/components-vue,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.5.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@oods/components-vue 支持 TypeScript 吗?

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

@oods/components-vue 支持 ESM 还是 CommonJS?

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

@oods/components-vue 需要什么版本的 Node.js?

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

@oods/components-vue 可以商用吗?

@oods/components-vue 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@oods/components-vue 还在维护吗?

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