@robot-admin/naive-ui-components 0.13.5 → 0.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +61 -6
- package/README_EN.md +53 -6
- package/dist/C_Form.base.css +174 -169
- package/dist/C_Form.cjs +1 -1
- package/dist/C_Form.css +174 -169
- package/dist/C_Form.d.cts +2 -2
- package/dist/C_Form.d.ts +2 -2
- package/dist/C_Form.js +1 -1
- package/dist/C_Form2.cjs +1 -1
- package/dist/C_Form2.js +1 -1
- package/dist/C_FormModal.css +15 -15
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_Loading.cjs +1 -0
- package/dist/C_Loading.css +119 -0
- package/dist/C_Loading.d.cts +2 -0
- package/dist/C_Loading.d.ts +2 -0
- package/dist/C_Loading.js +1 -0
- package/dist/C_Loading2.cjs +1 -0
- package/dist/C_Loading2.js +1 -0
- package/dist/C_Login.d.cts +1 -1
- package/dist/C_Login.d.ts +1 -1
- package/dist/C_Markdown.d.cts +1 -1
- package/dist/C_Markdown.d.ts +1 -1
- package/dist/C_Menu.d.ts +1 -1
- package/dist/C_OrgChart.d.cts +1 -1
- package/dist/C_OrgChart.d.ts +1 -1
- package/dist/C_Progress.d.cts +1 -1
- package/dist/C_Progress.d.ts +1 -1
- package/dist/C_Skeleton.d.cts +1 -1
- package/dist/C_Skeleton.d.ts +1 -1
- package/dist/C_Steps.d.cts +1 -1
- package/dist/C_Steps.d.ts +1 -1
- package/dist/C_Table.base.css +407 -282
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +407 -282
- package/dist/C_Table.d.ts +2 -2
- package/dist/C_Table.js +1 -1
- package/dist/C_TagsView.d.cts +1 -1
- package/dist/C_TagsView.d.ts +1 -1
- package/dist/C_Theme.d.cts +1 -1
- package/dist/C_Theme.d.ts +1 -1
- package/dist/C_Timeline.d.cts +1 -1
- package/dist/C_Timeline.d.ts +1 -1
- package/dist/C_Transfer.d.cts +1 -1
- package/dist/C_Transfer.d.ts +1 -1
- package/dist/C_VtableGantt.d.cts +1 -1
- package/dist/C_VtableGantt.d.ts +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.js +1 -1
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants2.d.cts +4 -4
- package/dist/constants2.d.ts +4 -4
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +5 -5
- package/dist/constants4.d.ts +5 -5
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data.d.cts +6 -6
- package/dist/data.d.ts +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +29 -28
- package/dist/index.d.ts +29 -28
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +6 -6
- package/dist/index.vue.d.ts +6 -6
- package/dist/index10.vue.d.cts +2 -2
- package/dist/index10.vue.d.ts +1 -1
- package/dist/index11.vue.d.cts +1 -1
- package/dist/index11.vue.d.ts +3 -3
- package/dist/index12.vue.d.cts +3 -3
- package/dist/index12.vue.d.ts +1 -1
- package/dist/index13.vue.d.cts +1 -1
- package/dist/index13.vue.d.ts +5 -5
- package/dist/index14.vue.d.cts +5 -5
- package/dist/index14.vue.d.ts +5 -5
- package/dist/index15.vue.d.cts +5 -5
- package/dist/index15.vue.d.ts +1 -1
- package/dist/index16.vue.d.cts +1 -1
- package/dist/index16.vue.d.ts +13 -129
- package/dist/index17.vue.d.cts +13 -129
- package/dist/index17.vue.d.ts +129 -76
- package/dist/index18.vue.d.cts +129 -76
- package/dist/index18.vue.d.ts +75 -71
- package/dist/index19.vue.d.cts +75 -93
- package/dist/index19.vue.d.ts +68 -90
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +87 -40
- package/dist/index20.vue.d.ts +87 -40
- package/dist/index21.vue.d.cts +40 -89
- package/dist/index21.vue.d.ts +40 -89
- package/dist/index22.vue.d.cts +95 -37
- package/dist/index22.vue.d.ts +95 -37
- package/dist/index23.vue.d.cts +34 -8
- package/dist/index23.vue.d.ts +34 -8
- package/dist/index24.vue.d.cts +12 -654
- package/dist/index24.vue.d.ts +12 -654
- package/dist/index25.vue.d.cts +650 -85
- package/dist/index25.vue.d.ts +650 -85
- package/dist/index26.vue.d.cts +85 -100
- package/dist/index26.vue.d.ts +85 -100
- package/dist/index27.vue.d.cts +92 -61
- package/dist/index27.vue.d.ts +92 -61
- package/dist/index28.vue.d.cts +80 -0
- package/dist/index28.vue.d.ts +80 -0
- package/dist/index3.vue.d.cts +5 -5
- package/dist/index3.vue.d.ts +5 -5
- package/dist/index6.vue.d.ts +1 -1
- package/dist/index7.vue.d.cts +1 -1
- package/dist/index8.vue.d.ts +2 -2
- package/dist/index9.vue.d.cts +2 -2
- package/dist/index9.vue.d.ts +2 -2
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.js +1 -1
- package/dist/style.css +424 -297
- package/dist/useCollapsePanel.d.cts +2 -2
- package/dist/useCollapsePanel.d.ts +2 -2
- package/dist/useCropperCore.d.cts +9 -9
- package/dist/useCropperCore.d.ts +9 -9
- package/dist/useDraggableLayout.d.cts +5 -5
- package/dist/useDraggableLayout.d.ts +5 -5
- package/dist/useDynamicFormState.d.cts +27 -7
- package/dist/useDynamicFormState.d.ts +27 -7
- package/dist/useEdgeInteraction.d.cts +2 -2
- package/dist/useEdgeInteraction.d.ts +2 -2
- package/dist/useInfiniteScroll.d.cts +1 -1
- package/dist/useInfiniteScroll.d.ts +1 -1
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSearchState.d.cts +3 -3
- package/dist/useSearchState.d.ts +3 -3
- package/dist/useSignatureHistory.d.cts +3 -3
- package/dist/useSignatureHistory.d.ts +3 -3
- package/dist/useSplitResize.d.cts +3 -3
- package/dist/useSplitResize.d.ts +3 -3
- package/dist/useTableQuery.cjs +3 -3
- package/dist/useTableQuery.d.cts +2 -0
- package/dist/useTableQuery.d.ts +2 -0
- package/dist/useTableQuery.js +3 -3
- package/dist/useTimeSelection.d.cts +2 -2
- package/dist/useTimeSelection.d.ts +2 -2
- package/dist/useTreeOperations.d.cts +6 -6
- package/dist/useTreeOperations.d.ts +6 -6
- package/dist/useWorkflowValidation.d.cts +3 -3
- package/dist/useWorkflowValidation.d.ts +3 -3
- package/dist/verification.d.cts +1 -1
- package/dist/verification.d.ts +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @robot-admin/naive-ui-components
|
|
2
2
|
|
|
3
|
+
## 0.13.7
|
|
4
|
+
|
|
5
|
+
- `C_Form` 正式集成 `@robot-admin/form-validate@3.4.2`,统一消费原生规则、验证库规则和 `RuleSpec`,并通过表单入口导出已适配的 `PRESET_RULES`、`NAIVE_COMBOS` 与 `SPEC_RULES`。
|
|
6
|
+
- 提供默认步骤提交按钮和 `action-extra` 业务操作插槽,复用组件内部的校验、防重复提交、加载与错误反馈;成功/重置提示由业务按需配置。
|
|
7
|
+
- 修复规则回调异常后提交跳过校验的问题;提交支持取消信号,组件卸载后不继续触发提交事件或成功提示,禁用/只读状态不能通过实例方法绕过。
|
|
8
|
+
|
|
9
|
+
## 0.13.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 新增 `C_Loading`:内置机器人数据扫描 SVG,随 Naive UI 主色变化,支持尺寸、文案和颜色配置,无在线图标、定时器或新增依赖。动画尊重系统减少动态效果设置,提供读屏状态说明。
|
|
14
|
+
- `C_Table` 默认使用新的加载态,并开放 `loading` 插槽;全量、按需及 base 样式入口均包含加载组件样式。加载过程继续保留已有表格内容,不改变请求或交互锁定逻辑。
|
|
15
|
+
|
|
3
16
|
## 0.13.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**基于 Naive UI 的 Vue 3 企业级组件库**
|
|
6
6
|
|
|
7
|
-
从 Robot Admin 中提炼的
|
|
7
|
+
从 Robot Admin 中提炼的 54 个高质量业务组件,支持全量注册、按需导入(Tree-Shaking)和子路径独立导入。
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@robot-admin/naive-ui-components)
|
|
10
10
|
[](./LICENSE)
|
|
@@ -198,7 +198,42 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
|
|
|
198
198
|
</template>
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
表单已内置 `@robot-admin/form-validate`,使用侧无需另写类型适配,也不用重复安装验证依赖。`rules` / `rulesWhen` 直接接受 Naive UI 原生规则、验证库的 `NaiveRule` 和框架无关的 `RuleSpec`,可以混用;`required: true` 同样复用验证库的空值判断,`0` 和 `false` 不会被误判为空。
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
import {
|
|
205
|
+
defineFormOptions,
|
|
206
|
+
PRESET_RULES,
|
|
207
|
+
NAIVE_COMBOS,
|
|
208
|
+
SPEC_RULES,
|
|
209
|
+
} from '@robot-admin/naive-ui-components/C_Form'
|
|
210
|
+
|
|
211
|
+
const fields = defineFormOptions([
|
|
212
|
+
{
|
|
213
|
+
type: 'input',
|
|
214
|
+
prop: 'name',
|
|
215
|
+
label: '名称',
|
|
216
|
+
required: true,
|
|
217
|
+
rules: [SPEC_RULES.length('名称', 2, 20)],
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
type: 'input',
|
|
221
|
+
prop: 'email',
|
|
222
|
+
label: '邮箱',
|
|
223
|
+
rules: NAIVE_COMBOS.email('邮箱'),
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
type: 'input',
|
|
227
|
+
prop: 'mobile',
|
|
228
|
+
label: '手机号',
|
|
229
|
+
rules: [PRESET_RULES.mobile('手机号')],
|
|
230
|
+
},
|
|
231
|
+
])
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
普通表单默认提供提交与重置,步骤表单最后一步默认提供提交按钮。只需配置 `submitText`、`resetText` 和 `onSubmit`;要增加预览等业务操作,使用 `action-extra` 插槽即可保留默认按钮和加载管理。需要完全定制时仍可覆盖 `action` / `step-actions`,并调用插槽的 `submit()`,不要用 `validate()` 代替提交。
|
|
235
|
+
|
|
236
|
+
异步保存放在 `config.onSubmit` 中并等待完成;`@submit` 是完成后的通知事件,不等待监听器返回的 Promise。第二参数提供 `context?.signal`,可直接传给支持取消的请求;组件卸载会发出取消信号,并停止晚到的提交事件和提示。`submitSuccessText` / `resetSuccessText` 为可选反馈文案,默认不显示成功提示,也不代表数据已持久化。
|
|
202
237
|
|
|
203
238
|
新增/编辑场景推荐用 `C_FormModal` 直接消费 Headless CRUD 的结构化 `editor`。字段、校验和布局继续由 `C_Form` 配置驱动,页面不再重复编写 Modal、按钮、loading 和草稿状态;默认采用紧凑小尺寸表单和右下角带图标操作按钮,宽度、表单尺寸与动作文案仍可覆盖:
|
|
204
239
|
|
|
@@ -433,7 +468,18 @@ const config = defineTableConfig({
|
|
|
433
468
|
|
|
434
469
|
`C_Login` 的“记住我”只保存用户名,不保存密码。短信验证码仅对格式正确的手机号触发事件;组件会立即开始本地倒计时,发送结果和服务端限流仍由宿主处理。`C_City` 在首次打开时才加载城市索引,字母跳转只作用于当前实例;默认触发器、字母和城市项均可用键盘操作。
|
|
435
470
|
|
|
436
|
-
###
|
|
471
|
+
### 表格加载态
|
|
472
|
+
|
|
473
|
+
`C_Table` 默认显示跟随主题主色的机器人 SVG 加载动画,保留已有数据,并遵循系统减少动态效果设置,无需页面配置。可通过 `loading` 插槽替换默认内容。独立的 `C_Loading` 支持 `size`(16–120,默认 48)、`label`(可选说明)和 `color`(可选颜色);原生 `NSpin` 使用时请关闭旋转,避免 SVG 整体转动:
|
|
474
|
+
|
|
475
|
+
```vue
|
|
476
|
+
<NSpin :show="loading" :size="48" :rotate="false">
|
|
477
|
+
<template #icon><C_Loading /></template>
|
|
478
|
+
<section>页面内容</section>
|
|
479
|
+
</NSpin>
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### 📋 组件清单(54 个)
|
|
437
483
|
|
|
438
484
|
> 💡 所有组件均提供 **在线交互演示**,访问 [组件文档](https://www.tzagileteam.com/robot/components/preface) 可直接在页面中体验真实效果(通过 iframe 嵌入 Robot Admin 生产环境)。
|
|
439
485
|
|
|
@@ -442,6 +488,7 @@ const config = defineTableConfig({
|
|
|
442
488
|
| 组件 | 说明 | 外部依赖 |
|
|
443
489
|
| ---------------- | ----------------------- | ----------------------------- |
|
|
444
490
|
| `C_Icon` | Iconify 图标封装 | `@iconify/vue` |
|
|
491
|
+
| `C_Loading` | 主题化 SVG 加载态 | - |
|
|
445
492
|
| `C_Code` | 代码高亮显示 | `highlight.js` |
|
|
446
493
|
| `C_Barcode` | 条形码生成器 | `@chenfengyuan/vue-barcode` |
|
|
447
494
|
| `C_Captcha` | 拼图/ALTCHA 人机验证 | `vue3-puzzle-vcode`、`altcha` |
|
|
@@ -554,7 +601,7 @@ bun add vue naive-ui
|
|
|
554
601
|
|
|
555
602
|
```
|
|
556
603
|
bun run build
|
|
557
|
-
├── 1. tsdown → 多入口打包(
|
|
604
|
+
├── 1. tsdown → 多入口打包(54 组件 ESM/CJS/DTS)
|
|
558
605
|
├── 2. sass CLI → 编译共享变量入口 → global-scss.css
|
|
559
606
|
├── 3. merge-css.js → 合并 Vue 编译后的 SFC CSS + 全局变量 → style.css
|
|
560
607
|
├── 4. gen-exports.js → 自动生成 package.json exports 映射
|
|
@@ -564,7 +611,7 @@ bun run build
|
|
|
564
611
|
|
|
565
612
|
#### 技术要点
|
|
566
613
|
|
|
567
|
-
- **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),
|
|
614
|
+
- **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),54 个独立入口并行编译
|
|
568
615
|
- **SCSS 处理**:自定义 `scssTransformPlugin` 在 Rolldown 管线内编译 SFC SCSS,独立 Sass CLI 仅编译共享变量入口
|
|
569
616
|
- **CSS 合并**:构建后将 Vue 已完成 scoped 转换的 per-chunk CSS 与共享变量合并为单一 `style.css`,避免重复样式和原始 `:deep()` 选择器泄漏
|
|
570
617
|
- **类型导出**:统一 `export *` barrel 模式,自动生成完整 `.d.ts`
|
|
@@ -579,7 +626,7 @@ bun run build
|
|
|
579
626
|
```
|
|
580
627
|
dist/
|
|
581
628
|
├── index.js / index.cjs / index.d.ts # 主入口
|
|
582
|
-
├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(
|
|
629
|
+
├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(54 组件)
|
|
583
630
|
├── C_Form.base.css / C_Form.full.css # 基础/完整样式层级
|
|
584
631
|
├── C_Table.base.css / C_Table.full.css # 基础/完整样式层级
|
|
585
632
|
├── style.css # 合并后的全量样式
|
|
@@ -663,6 +710,14 @@ bun run release # 发布 Changesets 中待发布版本
|
|
|
663
710
|
|
|
664
711
|
本仓库的 GitHub 变更日志生成器要求在执行 `bun run version` 时提供 `GITHUB_TOKEN`,不要将令牌写入仓库。Windows 下如果 `bun run release` 在 npm 的 `prepublishOnly` 重复验证阶段停滞,可先单独确认 `bun run verify` 成功,再在 PowerShell 中用 `$env:npm_config_ignore_scripts='true'; bun run release` 发布;该设置仅跳过已手动完成的重复生命周期验证,不应省略前一步。
|
|
665
712
|
|
|
713
|
+
## 发布后的安全扫描记录(2026-10-06)
|
|
714
|
+
|
|
715
|
+
`0.13.5` 的 npm 产物与已验证产物内容一致。随后安全扫描更新了开发工具和解析依赖的锁文件,并将仓库 overrides 中的 `@xmldom/xmldom`、`fast-uri` 固定到 `0.8.15`、`3.1.8`;这部分仓库维护不覆盖已经发布的 npm 产物。
|
|
716
|
+
|
|
717
|
+
当前扫描仍报告 [braces](https://github.com/advisories/GHSA-vfj7-8cjw-p6xm) 和 [sprintf-js](https://github.com/advisories/GHSA-hp3w-g68c-fv3c) 两项上游尚无发布修复版本的告警,`bun run check:audit` 仍非零退出。保留 CI 安全门禁和真实扫描结果;待上游发布修复后更新锁文件并复验。
|
|
718
|
+
|
|
719
|
+
本机完整 `verify` 通过。同步后的 [GitHub CI](https://github.com/ChenyCHENYU/naive-ui-components/actions/runs/37463121552) 因账号 billing issue 未启动,不能将其写成远端验证通过;账号恢复后需重新运行。
|
|
720
|
+
|
|
666
721
|
## 📄 许可证
|
|
667
722
|
|
|
668
723
|
MIT License
|
package/README_EN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Enterprise-grade Vue 3 component library built on Naive UI**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
54 production-ready business components extracted from Robot Admin, supporting global registration, on-demand imports (Tree-Shaking), and subpath imports.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@robot-admin/naive-ui-components)
|
|
10
10
|
[](./LICENSE)
|
|
@@ -166,7 +166,42 @@ const { model, formRef, bindings } = useCForm({
|
|
|
166
166
|
})
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
`C_Form` includes `@robot-admin/form-validate`; consumers need no local type adapter or separate validation installation. `rules` and `rulesWhen` accept native Naive UI rules, the package's `NaiveRule`, and framework-independent `RuleSpec` objects, including mixed lists. `required: true` uses the same empty-value rules and preserves valid `0` and `false` values.
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import {
|
|
173
|
+
defineFormOptions,
|
|
174
|
+
PRESET_RULES,
|
|
175
|
+
NAIVE_COMBOS,
|
|
176
|
+
SPEC_RULES,
|
|
177
|
+
} from '@robot-admin/naive-ui-components/C_Form'
|
|
178
|
+
|
|
179
|
+
const fields = defineFormOptions([
|
|
180
|
+
{
|
|
181
|
+
type: 'input',
|
|
182
|
+
prop: 'name',
|
|
183
|
+
label: 'Name',
|
|
184
|
+
required: true,
|
|
185
|
+
rules: [SPEC_RULES.length('Name', 2, 20)],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: 'input',
|
|
189
|
+
prop: 'email',
|
|
190
|
+
label: 'Email',
|
|
191
|
+
rules: NAIVE_COMBOS.email('Email'),
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
type: 'input',
|
|
195
|
+
prop: 'mobile',
|
|
196
|
+
label: 'Mobile',
|
|
197
|
+
rules: [PRESET_RULES.mobile('Mobile')],
|
|
198
|
+
},
|
|
199
|
+
])
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Normal forms provide submit/reset controls; step forms provide a submit button on their last step. Configure `submitText`, `resetText`, and `onSubmit`. Use `action-extra` for business controls such as previews while retaining the built-in buttons and loading state. Full customization remains available through `action` and `step-actions`; call the slot's `submit()` rather than treating `validate()` as submission.
|
|
203
|
+
|
|
204
|
+
Put asynchronous work in `config.onSubmit`; `@submit` is a completion notification and does not await an event listener's promise. The second argument provides `context?.signal` for cancellable requests. Unmount aborts that signal and suppresses late submit events and feedback. `submitSuccessText` and `resetSuccessText` opt in to feedback; no success message is shown by default, and validation alone does not imply persistence.
|
|
170
205
|
|
|
171
206
|
For create/edit flows, `C_FormModal` consumes a structural headless `editor` directly. Fields, validation, and layout remain data-driven by `C_Form`, while pages no longer own duplicate modal, draft, or loading state:
|
|
172
207
|
|
|
@@ -374,7 +409,18 @@ With `require-server-verification`, a successful response must include a server
|
|
|
374
409
|
|
|
375
410
|
`C_Login` remembers only the username, never the password. SMS events require a valid phone number; the local countdown starts immediately, while delivery results and server-side rate limits remain the host's responsibility. `C_City` loads its city index on first open and scopes letter navigation to its own instance; the default trigger, letters, and city items are keyboard-operable.
|
|
376
411
|
|
|
377
|
-
###
|
|
412
|
+
### Table loading
|
|
413
|
+
|
|
414
|
+
`C_Table` uses a robot SVG loading indicator in the theme's primary color by default, retains existing data, and respects reduced-motion preferences. No page configuration is required. Override the `loading` slot for custom content. The standalone `C_Loading` accepts `size` (16–120, default 48), optional `label`, and optional `color`. Disable rotation when using it with native `NSpin`:
|
|
415
|
+
|
|
416
|
+
```vue
|
|
417
|
+
<NSpin :show="loading" :size="48" :rotate="false">
|
|
418
|
+
<template #icon><C_Loading /></template>
|
|
419
|
+
<section>Page content</section>
|
|
420
|
+
</NSpin>
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### 📋 Component List (54 Components)
|
|
378
424
|
|
|
379
425
|
> 💡 All components provide **interactive live demos**. Visit the [Component Docs](https://www.tzagileteam.com/robot/components/preface) to try them out in real-time (rendered via iframe from Robot Admin production).
|
|
380
426
|
|
|
@@ -383,6 +429,7 @@ With `require-server-verification`, a successful response must include a server
|
|
|
383
429
|
| Component | Description | External Deps |
|
|
384
430
|
| ---------------- | ------------------------- | ----------------------------- |
|
|
385
431
|
| `C_Icon` | Iconify icon wrapper | `@iconify/vue` |
|
|
432
|
+
| `C_Loading` | Theme-aware SVG loading | - |
|
|
386
433
|
| `C_Code` | Code highlighting | `highlight.js` |
|
|
387
434
|
| `C_Barcode` | Barcode generator | `@chenfengyuan/vue-barcode` |
|
|
388
435
|
| `C_Captcha` | Puzzle / ALTCHA captcha | `vue3-puzzle-vcode`, `altcha` |
|
|
@@ -495,7 +542,7 @@ Install optional peers per feature: `vue-router` for `C_Breadcrumb`/`C_TagsView`
|
|
|
495
542
|
|
|
496
543
|
```
|
|
497
544
|
bun run build
|
|
498
|
-
├── 1. tsdown → Multi-entry bundling (
|
|
545
|
+
├── 1. tsdown → Multi-entry bundling (54 components ESM/CJS/DTS)
|
|
499
546
|
├── 2. sass CLI → Compile the shared-variable entry → global-scss.css
|
|
500
547
|
├── 3. merge-css.js → Merge Vue-compiled SFC CSS + global variables → style.css
|
|
501
548
|
├── 4. gen-exports.js → Auto-generate package.json exports map
|
|
@@ -505,7 +552,7 @@ bun run build
|
|
|
505
552
|
|
|
506
553
|
#### Key Technical Details
|
|
507
554
|
|
|
508
|
-
- **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based),
|
|
555
|
+
- **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based), 54 independent entries compiled in parallel
|
|
509
556
|
- **SCSS processing**: Custom `scssTransformPlugin` compiles SFC SCSS within the Rolldown pipeline; standalone Sass CLI only compiles the shared-variable entry
|
|
510
557
|
- **CSS merging**: Post-build merges Vue scoped-compiled per-chunk CSS with shared variables into a single `style.css`, avoiding duplicate styles and leaked raw `:deep()` selectors
|
|
511
558
|
- **Type exports**: Unified `export *` barrel pattern with auto-generated `.d.ts`
|
|
@@ -520,7 +567,7 @@ bun run build
|
|
|
520
567
|
```
|
|
521
568
|
dist/
|
|
522
569
|
├── index.js / index.cjs / index.d.ts # Main entry
|
|
523
|
-
├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (
|
|
570
|
+
├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (54 components)
|
|
524
571
|
├── C_Form.base.css / C_Form.full.css # Base/full style tiers
|
|
525
572
|
├── C_Table.base.css / C_Table.full.css # Base/full style tiers
|
|
526
573
|
├── style.css # Merged full styles
|