@gcds-core/components-vue

中文文档
1.7.0发布于 2026/10/22MITTypeScriptCommonJS构建来源已验证近 30 天下载 2669

GC 设计系统组件的 Vue 包装器

中文使用文档
文档目录18 节
  1. 文档
  2. Vue 安装指令
  3. 1. 安装软件包
  4. 2. 进口GC设计系统
  5. 3. 导入GC设计系统样式
  6. 4. 开始建设
  7. 使用虚拟
  8. 如何捐款
  9. 许可证
  10. 文档
  11. 安装指令
  12. 1. 平板电脑安装器
  13. 2. 进口商Système de design GC
  14. 3. 设计风格进口商
  15. 4. 开始培训
  16. 使用维特
  17. Apportez votre 捐款
  18. 许可证

(原始内容存档于2018-10-21). La version française suit.

GC 设计系统组件 - Vue

方便整合 GC 设计系统网络组件 输入 Vue 项目 @gcds- core/ 组件- vue 软件包提供 Vue 包装.

通过这些包装,通过便于类型检查、与Vue生态系统的整合,更容易与网络组件合作 Vue Router,并支持 v-model 使用窗体控件.

网络组件继承了本土属性和互通性.

文档

您可以在 https://design-system.canada.ca/ 互联网档案馆的存檔,存档日期2014-12-02。 。 。 .

Vue 安装指令

遵循这些步骤在您的 Vue 项目中安装和使用GC Design System 组件.

1. 安装软件包

导航您的工程根文件夹并运行以下命令:

npm install @gcds-core/components-vue

2. 进口GC设计系统

在你身边 main.js 文件,导入GC设计系统组件插件并使用:

import { GcdsComponents } from '@gcds-core/components-vue';

createApp(App).use(GcdsComponents).mount('#app');

3. 导入GC设计系统样式

有两种方法可以做到这一点:

  • 导入样式到 main.js。 。 。 .
  • 导入样式到 App.vue。 。 。 .

a. 将样式导入到您的 main.js 文档,与您的 style.css数字 :

import '@gcds-core/components-vue/gcds.css';
import './style.css';

b. 向您导入样式 App.vue 使用 HTML 样式标记 :

<style src="@gcds-core/components-vue/gcds.css">
  /* global styles */
</style>

4. 开始建设

一旦安装了设计系统,就开始建设! 浏览我们可用的 组件 财务报告和审定财务报表 模板 将您需要的代码调入您的项目.

使用虚拟

如果使用 维特,需要添加额外的配置 vite.config.ts 防止 Vue 登录未解析组件的警告(例如 “ 未解析组件: gcds-header ” ).

export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          // treat all tags with a dash as custom elements
          isCustomElement: tag => tag.includes('-'),
        },
      },
    }),
  ],
});

如何捐款

如果您有兴趣为GC设计系统组件做出贡献,请阅读我们 提供指南。 。 。 .

许可证

代码根据 MIT 许可证。 。 。 .


建筑设计师

Pour Fanciliter l-Intération des 互联网档案馆的存檔,存档日期2013-12-02 建筑设计网 瓦伊、瓦克 @gcds- core/ 组件- vue (原始内容存档于2018-09-21). Project différentes enveloppes Vue.

Ces inveloppes focilition le travail avec les composants Web dans l-cosystème 互联网档案馆的存檔,存档日期2013-12-02. 类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型、类型 Vue Router,以及负责浮雕的兴起 v-model avec les contrôles de公式化.

(原始内容存档于2019-09-29). Les composants Web héritent les propriétés and l ' interopérabilité indienters.

文档

建筑设计图书 页:1。 。 。 .

安装指令

(c) 在设计上对安装和使用复合体进行试验.

1. 平板电脑安装器

Navíguez vers le folm racine de votre projet and exécute la commande suvante : (原始内容存档于2019-09-29)

npm install @gcds-core/components-vue

2. 进口商Système de design GC

丹斯・沃特尔・费希尔 main.js,在设计时使用 GC 和 le :

import { GcdsComponents } from '@gcds-core/components-vue';

createApp(App).use(GcdsComponents).mount('#app');

3. 设计风格进口商

需要2个Façons de lefaire:

  • 导入器 le 样式 dans main.js。 。 。 .
  • 样式导入器 App.vue。 。 。 .

a. 调味料 main.js, 法语 style.css数字 :

import '@gcds-core/components-vue/gcds.css';
import './style.css';

b. 外观风格 App.vue 使用 la balise HTML 软件 style 数字 :

<style src="@gcds-core/components-vue/gcds.css">
  /* global styles */
</style>

4. 开始培训

(原始内容存档于2013-10-12) (英语). Une fois le système de design s安装, startz à créer!. 纸牌号码 堆肥剂 页:1 摩尔语 倒出你的代码 不vous avez besoin 倒出votre projet.

使用维特

不错 维特, il faudra ajouter une controductnelle à'vite.config.ts' afin d'empêcher que Vue ne signe un facission d'chec p. for la récds-headers (“解决组件失败:gcds-header” ) [componsant的解决:gcds-header]].

export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          // treat all tags with a dash as custom elements
          isCustomElement: tag => tag.includes('-'),
        },
      },
    }),
  ],
});

Apportez votre 捐款

Si vous souhaitez contribuer aux unités de style de Système de design GC, veuillez lire nos (法语) (法语) 捐款指导。 。 。 .

许可证

宪法法典 麻省理工学院许可证 (安格拉斯语).

版本与发布记录

@gcds-core/components-vue 共发布 10 个版本,首次发布于 2026/02/04;过去 12 个月发布了 10 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.7.0latest2026/10/2225 天前
1.6.02026/09/092 个月前
1.5.02026/08/133 个月前
1.4.02026/07/283 个月前
1.3.12026/06/095 个月前
1.3.02026/05/285 个月前

其他发布通道:alpha → 0.0.0-alpha。

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

@gcds-core/components-vue 是什么?

GC 设计系统组件的 Vue 包装器

如何安装 @gcds-core/components-vue?

在项目目录运行 npm install @gcds-core/components-vue,或使用 pnpm add / yarn add / bun add。

@gcds-core/components-vue 支持 TypeScript 吗?

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

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

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@gcds-core/components-vue 可以商用吗?

@gcds-core/components-vue 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@gcds-core/components-vue 的下载量有多少?

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

@gcds-core/components-vue 还在维护吗?

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