@robot-admin/naive-ui-components 0.13.8 → 0.14.0
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 +17 -0
- package/README.md +63 -5
- package/README_EN.md +63 -5
- package/dist/C_ActionBar.css +11 -10
- package/dist/C_AntV.css +206 -204
- package/dist/C_AudioPlayer.css +11 -10
- package/dist/C_AvatarGroup.css +7 -5
- package/dist/C_Barcode.css +3 -1
- package/dist/C_Breadcrumb.css +17 -16
- package/dist/C_Captcha.css +14 -13
- package/dist/C_Cascade.css +7 -5
- package/dist/C_Chat.css +9 -8
- package/dist/C_City.css +8 -6
- package/dist/C_Code.css +15 -14
- package/dist/C_CollapsePanel.css +12 -11
- package/dist/C_ContextMenu.css +28 -28
- package/dist/C_Cron.cjs +1 -1
- package/dist/C_Cron.css +472 -251
- package/dist/C_Cron.d.cts +2 -2
- package/dist/C_Cron.d.ts +2 -2
- package/dist/C_Cron.js +1 -1
- package/dist/C_Cron2.cjs +1 -1
- package/dist/C_Cron2.js +1 -1
- package/dist/C_Date.css +2 -1
- package/dist/C_Draggable.css +2 -1
- package/dist/C_Editor.css +2 -1
- package/dist/C_FilePreview.css +185 -184
- package/dist/C_Form.base.css +334 -332
- package/dist/C_Form.css +333 -332
- package/dist/C_FormModal.css +13 -11
- package/dist/C_FormSearch.css +2 -1
- package/dist/C_FormulaEditor.cjs +1 -1
- package/dist/C_FormulaEditor.css +430 -273
- package/dist/C_FormulaEditor.d.cts +2 -2
- package/dist/C_FormulaEditor.d.ts +2 -2
- package/dist/C_FormulaEditor.js +1 -1
- package/dist/C_FullCalendar.css +12 -11
- package/dist/C_GlobalSearch.css +13 -11
- package/dist/C_Guide.css +8 -8
- package/dist/C_Icon.css +9 -7
- package/dist/C_ImageCropper.css +70 -68
- package/dist/C_Language.css +8 -8
- package/dist/C_Loading.css +10 -8
- package/dist/C_Login.css +20 -21
- package/dist/C_Map.css +24 -22
- package/dist/C_Markdown.css +8 -6
- package/dist/C_Menu.css +2 -1
- package/dist/C_NotificationCenter.css +362 -360
- package/dist/C_OrgChart.css +6 -5
- package/dist/C_PageLoading.cjs +1 -0
- package/dist/C_PageLoading.css +153 -0
- package/dist/C_PageLoading.d.cts +2 -0
- package/dist/C_PageLoading.d.ts +2 -0
- package/dist/C_PageLoading.js +1 -0
- package/dist/C_Progress.css +1 -1
- package/dist/C_QRCode.css +7 -5
- package/dist/C_Signature.css +7 -5
- package/dist/C_Skeleton.css +8 -6
- package/dist/C_SplitPane.css +25 -23
- package/dist/C_Steps.css +7 -5
- package/dist/C_Table.base.css +536 -537
- package/dist/C_Table.css +536 -538
- package/dist/C_Tabs.css +78 -1
- package/dist/C_TagsView.css +8 -8
- package/dist/C_Theme.css +9 -7
- package/dist/C_Time.css +3 -1
- package/dist/C_Timeline.css +9 -8
- package/dist/C_Transfer.css +10 -9
- package/dist/C_Tree.css +2 -1
- package/dist/C_Upload.css +176 -174
- package/dist/C_VideoPlayer.css +186 -184
- package/dist/C_VtableGantt.css +2 -1
- package/dist/C_WaterFall.css +19 -17
- package/dist/C_WorkFlow.css +976 -976
- package/dist/constants.d.cts +15 -20
- package/dist/constants.d.ts +15 -20
- package/dist/constants2.d.cts +44 -19
- package/dist/constants2.d.ts +44 -19
- package/dist/constants3.d.cts +4 -4
- package/dist/constants3.d.ts +4 -4
- package/dist/constants4.d.cts +6 -6
- package/dist/constants4.d.ts +6 -6
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/createPageLoading.cjs +1 -0
- package/dist/createPageLoading.d.cts +32 -0
- package/dist/createPageLoading.d.ts +32 -0
- package/dist/createPageLoading.js +1 -0
- package/dist/data.d.cts +8 -8
- package/dist/data.d.ts +8 -8
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +24 -23
- package/dist/index.d.ts +24 -23
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +4 -4
- package/dist/index.vue.d.ts +4 -4
- package/dist/index10.vue.d.cts +3 -3
- package/dist/index10.vue.d.ts +1 -1
- package/dist/index11.vue.d.cts +1 -1
- package/dist/index11.vue.d.ts +2 -2
- package/dist/index12.vue.d.cts +2 -2
- package/dist/index12.vue.d.ts +2 -2
- package/dist/index13.vue.d.cts +2 -2
- package/dist/index13.vue.d.ts +5 -5
- package/dist/index14.vue.d.cts +5 -5
- package/dist/index14.vue.d.ts +6 -6
- package/dist/index15.vue.d.cts +6 -6
- package/dist/index15.vue.d.ts +1 -1
- package/dist/index16.vue.d.cts +1 -1
- package/dist/index17.vue.d.ts +1 -1
- package/dist/index18.vue.d.cts +1 -1
- package/dist/index18.vue.d.ts +5 -5
- package/dist/index19.vue.d.cts +5 -5
- package/dist/index19.vue.d.ts +1 -1
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index21.vue.d.cts +1 -1
- package/dist/index21.vue.d.ts +1 -1
- package/dist/index22.vue.d.cts +1 -1
- package/dist/index22.vue.d.ts +1 -1
- package/dist/index23.vue.d.cts +2 -2
- package/dist/index23.vue.d.ts +2 -2
- package/dist/index25.vue.d.cts +4 -4
- package/dist/index25.vue.d.ts +4 -4
- package/dist/index27.vue.d.cts +2 -2
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index28.vue.d.cts +1 -1
- package/dist/index28.vue.d.ts +1 -1
- package/dist/index3.vue.d.cts +4 -4
- package/dist/index3.vue.d.ts +4 -4
- package/dist/index4.vue.d.cts +1 -1
- package/dist/index6.vue.d.ts +2 -2
- package/dist/index7.vue.d.cts +2 -2
- package/dist/index8.vue.d.ts +3 -3
- package/dist/index9.vue.d.cts +3 -3
- package/dist/index9.vue.d.ts +3 -3
- 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 +9976 -9652
- package/dist/useCropperCore.d.cts +9 -9
- package/dist/useCropperCore.d.ts +9 -9
- package/dist/useDraggableLayout.d.cts +6 -6
- package/dist/useDraggableLayout.d.ts +6 -6
- package/dist/useDynamicFormState.d.cts +2 -2
- package/dist/useDynamicFormState.d.ts +2 -2
- package/dist/useEdgeInteraction.d.cts +2 -2
- package/dist/useEdgeInteraction.d.ts +2 -2
- package/dist/useFormulaEvaluator.cjs +2 -0
- package/dist/useFormulaEvaluator.js +2 -0
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSearchState.d.cts +8 -8
- package/dist/useSearchState.d.ts +8 -8
- package/dist/useSignatureHistory.d.cts +3 -3
- package/dist/useSignatureHistory.d.ts +3 -3
- package/dist/useSplitResize.d.cts +4 -4
- package/dist/useSplitResize.d.ts +4 -4
- package/dist/useTableQuery.d.cts +1 -1
- package/dist/useTableQuery.d.ts +1 -1
- package/dist/useTimeSelection.d.cts +1 -1
- package/dist/useTimeSelection.d.ts +1 -1
- package/dist/useTreeOperations.d.cts +5 -5
- package/dist/useTreeOperations.d.ts +5 -5
- package/dist/useWorkflowValidation.d.cts +4 -4
- package/dist/useWorkflowValidation.d.ts +4 -4
- package/dist/verification.d.cts +4 -4
- package/dist/verification.d.ts +4 -4
- package/package.json +1 -1
- package/dist/C_FormulaEditor2.cjs +0 -2
- package/dist/C_FormulaEditor2.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @robot-admin/naive-ui-components
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 修复按需样式丢失的构建根因:样式归属改为源模块编译记录,移除按 chunk 文件名猜测及别名补丁;Cron / 公式按需入口包含内部依赖和主题默认变量,发布门禁验证实际选择器。
|
|
8
|
+
|
|
9
|
+
- `C_Cron` 与 `C_FormulaEditor` 推荐使用 `v-model + config` 扁平接入;保留原有独立属性和实例方法,组件内部统一处理模板、编辑、校验、重置与结果反馈。
|
|
10
|
+
- Cron 重构为计划模板、时间字段与执行预览三段工作区;非法或待应用表达式清除过期预览,隐藏预览不启动计算,卸载取消待执行任务。空指定值不再意外扩大为每个值执行;日与星期始终互斥。重置恢复挂载时的初始规则。
|
|
11
|
+
- 公式使用有界安全语法树统一校验与求值,不运行 JavaScript。新增完整语法和函数参数校验、错误字符定位、IF/三元/AND/OR 短路语义;同一公式编译结果随试算数据复用。常量也能直接试算,字符串中的括号和变量名称不会误报。
|
|
12
|
+
- 公式输入改用原生 textarea,保留中文输入、纯文本粘贴和选择区插入;高亮使用 Vue 转义后的独立结构预览。试算值可编辑、与调用方数据隔离,空数字区别于零;只读状态阻止编辑入口,重置同时恢复公式和试算值。
|
|
13
|
+
- 两个工作区按组件容器宽度自适应,样式只使用组件作用域和主题变量;新增打包消费类型与真实浏览器回归,无额外依赖。
|
|
14
|
+
|
|
15
|
+
## 0.13.9
|
|
16
|
+
|
|
17
|
+
- 新增 `C_PageLoading`:同心轨道与波形 SVG、柔和主题卡片,支持明暗主题、按需导入、独立文案和减少动态效果;所有样式隔离,不依赖路由或宿主的 UnoCSS。
|
|
18
|
+
- 新增 `createPageLoading({ delay })`:默认延迟 160ms 显示,快速完成不闪烁;任务编号隔离并发完成,提供重置清理,不强制延长导航时间。
|
|
19
|
+
|
|
3
20
|
## 0.13.8
|
|
4
21
|
|
|
5
22
|
- 表格内置子表与主表统一默认居中;列类型保留 Naive UI 普通列的排序、筛选和单元格配置,原生表格迁移后不丢交互能力。
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**基于 Naive UI 的 Vue 3 企业级组件库**
|
|
6
6
|
|
|
7
|
-
从 Robot Admin 中提炼的
|
|
7
|
+
从 Robot Admin 中提炼的 55 个高质量业务组件,支持全量注册、按需导入(Tree-Shaking)和子路径独立导入。
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@robot-admin/naive-ui-components)
|
|
10
10
|
[](./LICENSE)
|
|
@@ -105,6 +105,47 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
|
|
|
105
105
|
// 完整模式也可显式使用 C_Form/full.css、C_Table/full.css
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
### Cron 与公式工作区
|
|
109
|
+
|
|
110
|
+
一个模型加一份扁平配置即可。原有独立属性继续兼容,组件内部统一处理模板、校验、预览与初始状态重置。
|
|
111
|
+
|
|
112
|
+
```vue
|
|
113
|
+
<script setup lang="ts">
|
|
114
|
+
import { ref } from 'vue'
|
|
115
|
+
import {
|
|
116
|
+
C_Cron,
|
|
117
|
+
type CronConfig,
|
|
118
|
+
} from '@robot-admin/naive-ui-components/C_Cron'
|
|
119
|
+
import {
|
|
120
|
+
C_FormulaEditor,
|
|
121
|
+
type FormulaEditorConfig,
|
|
122
|
+
} from '@robot-admin/naive-ui-components/C_FormulaEditor'
|
|
123
|
+
import '@robot-admin/naive-ui-components/C_Cron/style.css'
|
|
124
|
+
import '@robot-admin/naive-ui-components/C_FormulaEditor/style.css'
|
|
125
|
+
|
|
126
|
+
const expression = ref('0 30 8 * * ?')
|
|
127
|
+
const cronConfig: CronConfig = { previewCount: 5 }
|
|
128
|
+
const formula = ref('IF([完成值] > 0, 100 / [完成值], 0)')
|
|
129
|
+
const formulaConfig: FormulaEditorConfig = {
|
|
130
|
+
variables: [{ name: '完成值', field: 'completed', type: 'number' }],
|
|
131
|
+
sampleData: { completed: 5 },
|
|
132
|
+
editableSampleData: true,
|
|
133
|
+
}
|
|
134
|
+
</script>
|
|
135
|
+
<template>
|
|
136
|
+
<C_Cron
|
|
137
|
+
v-model="expression"
|
|
138
|
+
:config="cronConfig"
|
|
139
|
+
/>
|
|
140
|
+
<C_FormulaEditor
|
|
141
|
+
v-model="formula"
|
|
142
|
+
:config="formulaConfig"
|
|
143
|
+
/>
|
|
144
|
+
</template>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Cron 支持秒到星期的六个数字字段、范围、间隔、列表及日/星期 `?` 互斥,不实现 L/W/# 扩展;预览按浏览器本地时区计算,不会调度任务。公式试算只在本地进行,不修改传入的 `sampleData`;校验和计算复用有界解析器,条件分支按需执行。通过 `showPreview`、`showKeyboard`、`showVariablePanel` 控制嵌入布局,`disabled` 同时保护试算输入。重置恢复初始模型及数据;切换独立记录时使用新 key 重新挂载。
|
|
148
|
+
|
|
108
149
|
### C_Guide 配置引导
|
|
109
150
|
|
|
110
151
|
项目只需要提供目标和步骤,组件内置主题、可选 SVG 示意图及退出清理,不依赖项目的路由或 Store:
|
|
@@ -479,7 +520,7 @@ const config = defineTableConfig({
|
|
|
479
520
|
</NSpin>
|
|
480
521
|
```
|
|
481
522
|
|
|
482
|
-
### 📋 组件清单(
|
|
523
|
+
### 📋 组件清单(55 个)
|
|
483
524
|
|
|
484
525
|
> 💡 所有组件均提供 **在线交互演示**,访问 [组件文档](https://www.tzagileteam.com/robot/components/preface) 可直接在页面中体验真实效果(通过 iframe 嵌入 Robot Admin 生产环境)。
|
|
485
526
|
|
|
@@ -489,6 +530,7 @@ const config = defineTableConfig({
|
|
|
489
530
|
| ---------------- | ----------------------- | ----------------------------- |
|
|
490
531
|
| `C_Icon` | Iconify 图标封装 | `@iconify/vue` |
|
|
491
532
|
| `C_Loading` | 主题化 SVG 加载态 | - |
|
|
533
|
+
| `C_PageLoading` | 主题化页面切换加载 | - |
|
|
492
534
|
| `C_Code` | 代码高亮显示 | `highlight.js` |
|
|
493
535
|
| `C_Barcode` | 条形码生成器 | `@chenfengyuan/vue-barcode` |
|
|
494
536
|
| `C_Captcha` | 拼图/ALTCHA 人机验证 | `vue3-puzzle-vcode`、`altcha` |
|
|
@@ -601,7 +643,7 @@ bun add vue naive-ui
|
|
|
601
643
|
|
|
602
644
|
```
|
|
603
645
|
bun run build
|
|
604
|
-
├── 1. tsdown → 多入口打包(
|
|
646
|
+
├── 1. tsdown → 多入口打包(55 组件 ESM/CJS/DTS)
|
|
605
647
|
├── 2. sass CLI → 编译共享变量入口 → global-scss.css
|
|
606
648
|
├── 3. merge-css.js → 合并 Vue 编译后的 SFC CSS + 全局变量 → style.css
|
|
607
649
|
├── 4. gen-exports.js → 自动生成 package.json exports 映射
|
|
@@ -611,7 +653,7 @@ bun run build
|
|
|
611
653
|
|
|
612
654
|
#### 技术要点
|
|
613
655
|
|
|
614
|
-
- **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),
|
|
656
|
+
- **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),55 个独立入口并行编译
|
|
615
657
|
- **SCSS 处理**:自定义 `scssTransformPlugin` 在 Rolldown 管线内编译 SFC SCSS,独立 Sass CLI 仅编译共享变量入口
|
|
616
658
|
- **CSS 合并**:构建后将 Vue 已完成 scoped 转换的 per-chunk CSS 与共享变量合并为单一 `style.css`,避免重复样式和原始 `:deep()` 选择器泄漏
|
|
617
659
|
- **类型导出**:统一 `export *` barrel 模式,自动生成完整 `.d.ts`
|
|
@@ -626,7 +668,7 @@ bun run build
|
|
|
626
668
|
```
|
|
627
669
|
dist/
|
|
628
670
|
├── index.js / index.cjs / index.d.ts # 主入口
|
|
629
|
-
├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(
|
|
671
|
+
├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(55 组件)
|
|
630
672
|
├── C_Form.base.css / C_Form.full.css # 基础/完整样式层级
|
|
631
673
|
├── C_Table.base.css / C_Table.full.css # 基础/完整样式层级
|
|
632
674
|
├── style.css # 合并后的全量样式
|
|
@@ -735,3 +777,19 @@ MIT License
|
|
|
735
777
|
### C_Login 扩展表单
|
|
736
778
|
|
|
737
779
|
`password-fields` 插槽位于密码输入框下方,提供 `username`、`loading`,可配置工作空间或其他业务字段。`username-change` 在初始预填、恢复记住的账号和输入变化时同步触发。宿主通过 `submitDisabled` 阻止扩展字段尚未就绪时的按钮与回车提交;`loading` 期间凭据输入禁用。公司查询、成员关系和权限始终由宿主认证服务处理,组件不保存业务上下文。
|
|
780
|
+
|
|
781
|
+
### 页面切换加载
|
|
782
|
+
|
|
783
|
+
路由生命周期只需要关联 `start()` / `finish(id)`;动画、主题和减少动态效果由组件库处理。默认延迟 160ms 显示,快速切换不闪烁,旧任务完成不会关闭新任务。
|
|
784
|
+
|
|
785
|
+
```vue
|
|
786
|
+
<C_PageLoading :show="loading.visible.value" />
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
```ts
|
|
790
|
+
import { createPageLoading } from '@robot-admin/naive-ui-components/C_PageLoading'
|
|
791
|
+
const loading = createPageLoading({ delay: 160 })
|
|
792
|
+
const id = loading.start()
|
|
793
|
+
// 路由完成、取消或失败后
|
|
794
|
+
loading.finish(id)
|
|
795
|
+
```
|
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
|
+
55 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)
|
|
@@ -105,6 +105,47 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
|
|
|
105
105
|
// Full mode is also available as C_Form/full.css and C_Table/full.css.
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
### Cron and formula workspaces
|
|
109
|
+
|
|
110
|
+
Use a model and one flat config. Existing individual props remain supported; templates, validation, previews and initial-state reset are owned by the components.
|
|
111
|
+
|
|
112
|
+
```vue
|
|
113
|
+
<script setup lang="ts">
|
|
114
|
+
import { ref } from 'vue'
|
|
115
|
+
import {
|
|
116
|
+
C_Cron,
|
|
117
|
+
type CronConfig,
|
|
118
|
+
} from '@robot-admin/naive-ui-components/C_Cron'
|
|
119
|
+
import {
|
|
120
|
+
C_FormulaEditor,
|
|
121
|
+
type FormulaEditorConfig,
|
|
122
|
+
} from '@robot-admin/naive-ui-components/C_FormulaEditor'
|
|
123
|
+
import '@robot-admin/naive-ui-components/C_Cron/style.css'
|
|
124
|
+
import '@robot-admin/naive-ui-components/C_FormulaEditor/style.css'
|
|
125
|
+
|
|
126
|
+
const expression = ref('0 30 8 * * ?')
|
|
127
|
+
const cronConfig: CronConfig = { previewCount: 5 }
|
|
128
|
+
const formula = ref('IF([完成值] > 0, 100 / [完成值], 0)')
|
|
129
|
+
const formulaConfig: FormulaEditorConfig = {
|
|
130
|
+
variables: [{ name: '完成值', field: 'completed', type: 'number' }],
|
|
131
|
+
sampleData: { completed: 5 },
|
|
132
|
+
editableSampleData: true,
|
|
133
|
+
}
|
|
134
|
+
</script>
|
|
135
|
+
<template>
|
|
136
|
+
<C_Cron
|
|
137
|
+
v-model="expression"
|
|
138
|
+
:config="cronConfig"
|
|
139
|
+
/>
|
|
140
|
+
<C_FormulaEditor
|
|
141
|
+
v-model="formula"
|
|
142
|
+
:config="formulaConfig"
|
|
143
|
+
/>
|
|
144
|
+
</template>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Cron supports six numeric fields, ranges, steps, lists and day/weekday exclusion with `?`; L/W/# extensions are not supported. Preview dates use the browser local timezone and never schedule jobs. Formula trials do not mutate caller `sampleData`; validation and calculation share a bounded parser with lazy conditions. Compact modes use `showPreview`, `showKeyboard` and `showVariablePanel`. Read-only mode protects trial inputs too. Reset restores the initial model and data; remount with a new key when switching independent records.
|
|
148
|
+
|
|
108
149
|
### Configure C_Guide
|
|
109
150
|
|
|
110
151
|
Provide targets and steps; the component owns its theme, optional SVG illustrations, and cleanup without depending on a host router or store:
|
|
@@ -420,7 +461,7 @@ With `require-server-verification`, a successful response must include a server
|
|
|
420
461
|
</NSpin>
|
|
421
462
|
```
|
|
422
463
|
|
|
423
|
-
### 📋 Component List (
|
|
464
|
+
### 📋 Component List (55 Components)
|
|
424
465
|
|
|
425
466
|
> 💡 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).
|
|
426
467
|
|
|
@@ -430,6 +471,7 @@ With `require-server-verification`, a successful response must include a server
|
|
|
430
471
|
| ---------------- | ------------------------- | ----------------------------- |
|
|
431
472
|
| `C_Icon` | Iconify icon wrapper | `@iconify/vue` |
|
|
432
473
|
| `C_Loading` | Theme-aware SVG loading | - |
|
|
474
|
+
| `C_PageLoading` | Theme-aware page loading | - |
|
|
433
475
|
| `C_Code` | Code highlighting | `highlight.js` |
|
|
434
476
|
| `C_Barcode` | Barcode generator | `@chenfengyuan/vue-barcode` |
|
|
435
477
|
| `C_Captcha` | Puzzle / ALTCHA captcha | `vue3-puzzle-vcode`, `altcha` |
|
|
@@ -542,7 +584,7 @@ Install optional peers per feature: `vue-router` for `C_Breadcrumb`/`C_TagsView`
|
|
|
542
584
|
|
|
543
585
|
```
|
|
544
586
|
bun run build
|
|
545
|
-
├── 1. tsdown → Multi-entry bundling (
|
|
587
|
+
├── 1. tsdown → Multi-entry bundling (55 components ESM/CJS/DTS)
|
|
546
588
|
├── 2. sass CLI → Compile the shared-variable entry → global-scss.css
|
|
547
589
|
├── 3. merge-css.js → Merge Vue-compiled SFC CSS + global variables → style.css
|
|
548
590
|
├── 4. gen-exports.js → Auto-generate package.json exports map
|
|
@@ -552,7 +594,7 @@ bun run build
|
|
|
552
594
|
|
|
553
595
|
#### Key Technical Details
|
|
554
596
|
|
|
555
|
-
- **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based),
|
|
597
|
+
- **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based), 55 independent entries compiled in parallel
|
|
556
598
|
- **SCSS processing**: Custom `scssTransformPlugin` compiles SFC SCSS within the Rolldown pipeline; standalone Sass CLI only compiles the shared-variable entry
|
|
557
599
|
- **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
|
|
558
600
|
- **Type exports**: Unified `export *` barrel pattern with auto-generated `.d.ts`
|
|
@@ -567,7 +609,7 @@ bun run build
|
|
|
567
609
|
```
|
|
568
610
|
dist/
|
|
569
611
|
├── index.js / index.cjs / index.d.ts # Main entry
|
|
570
|
-
├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (
|
|
612
|
+
├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (55 components)
|
|
571
613
|
├── C_Form.base.css / C_Form.full.css # Base/full style tiers
|
|
572
614
|
├── C_Table.base.css / C_Table.full.css # Base/full style tiers
|
|
573
615
|
├── style.css # Merged full styles
|
|
@@ -667,3 +709,19 @@ MIT License
|
|
|
667
709
|
### C_Login form extension
|
|
668
710
|
|
|
669
711
|
The `password-fields` slot appears below the password field and exposes `username` and `loading`. The synchronous `username-change` event covers initial defaults, remembered usernames and input changes. Use `submitDisabled` to block clicks and Enter while application fields are incomplete. Credential inputs are disabled while `loading`. Workspace discovery and authorization remain in the host application.
|
|
712
|
+
|
|
713
|
+
### Page navigation loading
|
|
714
|
+
|
|
715
|
+
Connect navigation lifecycles through `start()` / `finish(id)`. The component handles visuals, themes and reduced motion. A 160ms default delay avoids flashes; stale completions cannot hide a newer task.
|
|
716
|
+
|
|
717
|
+
```vue
|
|
718
|
+
<C_PageLoading :show="loading.visible.value" />
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
```ts
|
|
722
|
+
import { createPageLoading } from '@robot-admin/naive-ui-components/C_PageLoading'
|
|
723
|
+
const loading = createPageLoading({ delay: 160 })
|
|
724
|
+
const id = loading.start()
|
|
725
|
+
// After completion, cancellation or failure
|
|
726
|
+
loading.finish(id)
|
|
727
|
+
```
|
package/dist/C_ActionBar.css
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
:root{--c-primary: var(--primary-color, #2080f0);--c-primary-hover: var(--primary-color-hover, #4098fc);--c-primary-pressed: var(--primary-color-pressed, #1060c9);--c-success: var(--success-color, #18a058);--c-warning: var(--warning-color, #f0a020);--c-error: var(--error-color, #d03050);--c-info: var(--info-color, #2080f0);--c-bg-body: var(--body-color, #ffffff);--c-bg-card: var(--card-color, #ffffff);--c-bg-surface: var(--popover-color, #ffffff);--c-text-1: var(--text-color-1, #262626);--c-text-2: var(--text-color-2, #525252);--c-text-3: var(--text-color-3, #a3a3a3);--c-text-4: var(--text-color-4, #c0c0c0);--c-border: var(--border-color, #e5e7eb);--c-radius-sm: var(--border-radius-small, 4px);--c-radius: var(--border-radius, 6px);--c-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);--c-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);--c-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);--c-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);--c-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1)}
|
|
2
|
+
|
|
3
|
+
/* unplugin-vue-components disabled */
|
|
4
|
+
/* layer: default */
|
|
5
|
+
.inline-flex[data-v-075758a0]{display:inline-flex;}
|
|
6
|
+
.transform[data-v-075758a0]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
|
|
7
|
+
.px[data-v-075758a0]{padding-left:1rem;padding-right:1rem;}
|
|
8
|
+
|
|
1
9
|
/* unplugin-vue-components disabled */.c-icon[data-v-075758a0] {
|
|
2
10
|
display: inline-flex;
|
|
3
11
|
align-items: center;
|
|
@@ -59,10 +67,8 @@
|
|
|
59
67
|
}
|
|
60
68
|
/* unplugin-vue-components disabled */
|
|
61
69
|
/* layer: default */
|
|
62
|
-
.inline
|
|
63
|
-
.
|
|
64
|
-
.px[data-v-075758a0]{padding-left:1rem;padding-right:1rem;}
|
|
65
|
-
|
|
70
|
+
.inline[data-v-325a50d2]{display:inline;}
|
|
71
|
+
.px[data-v-325a50d2]{padding-left:1rem;padding-right:1rem;}
|
|
66
72
|
|
|
67
73
|
/* unplugin-vue-components disabled *//* 通用操作按钮组件样式 */
|
|
68
74
|
/* ================= 主容器 ================= */
|
|
@@ -266,9 +272,4 @@ html.dark .action-divider[data-v-325a50d2] {
|
|
|
266
272
|
}
|
|
267
273
|
html.dark .action-divider[data-v-325a50d2]:hover {
|
|
268
274
|
opacity: 0.4;
|
|
269
|
-
}
|
|
270
|
-
/* unplugin-vue-components disabled */
|
|
271
|
-
/* layer: default */
|
|
272
|
-
.inline[data-v-325a50d2]{display:inline;}
|
|
273
|
-
.px[data-v-325a50d2]{padding-left:1rem;padding-right:1rem;}
|
|
274
|
-
|
|
275
|
+
}
|