@robot-admin/naive-ui-components 0.40.4 → 0.40.5
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 +6 -0
- package/README.md +101 -79
- package/README_EN.md +110 -67
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +1 -1
- package/dist/constants4.d.ts +1 -1
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data2.d.cts +6 -6
- package/dist/data2.d.ts +6 -6
- package/dist/editors.d.cts +9 -9
- package/dist/editors.d.ts +9 -9
- package/dist/index.vue.d.cts +6 -6
- package/dist/index.vue.d.ts +6 -6
- package/dist/index10.vue.d.ts +2 -2
- package/dist/index11.vue.d.cts +2 -2
- package/dist/index11.vue.d.ts +3 -3
- package/dist/index12.vue.d.cts +3 -3
- package/dist/index13.vue.d.ts +4 -4
- package/dist/index14.vue.d.cts +4 -4
- package/dist/index16.vue.d.ts +3 -3
- package/dist/index17.vue.d.cts +3 -3
- package/dist/index17.vue.d.ts +4 -4
- package/dist/index18.vue.d.cts +4 -4
- package/dist/index19.vue.d.ts +1 -1
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +2 -2
- package/dist/index24.vue.d.cts +1 -1
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index27.vue.d.cts +1 -1
- package/dist/index27.vue.d.ts +1 -1
- package/dist/index30.vue.d.cts +1 -1
- package/dist/index30.vue.d.ts +1 -1
- package/dist/index31.vue.d.cts +3 -3
- package/dist/index31.vue.d.ts +3 -3
- package/dist/index4.vue.d.cts +5 -5
- package/dist/index4.vue.d.ts +5 -5
- package/dist/index8.vue.d.ts +1 -1
- package/dist/index9.vue.d.cts +1 -1
- package/dist/mapUtils.d.cts +4 -4
- package/dist/mapUtils.d.ts +4 -4
- package/dist/useCalendarEvents.d.cts +2 -2
- package/dist/useCalendarEvents.d.ts +2 -2
- package/dist/useCollapsePanel.d.cts +4 -4
- package/dist/useCollapsePanel.d.ts +4 -4
- package/dist/useCropperCore.d.cts +8 -8
- package/dist/useCropperCore.d.ts +8 -8
- package/dist/useEdgeInteraction.d.cts +1 -1
- package/dist/useEdgeInteraction.d.ts +1 -1
- package/dist/useFullscreen.d.cts +2 -2
- package/dist/useFullscreen.d.ts +2 -2
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useQRCode.d.cts +2 -2
- package/dist/useQRCode.d.ts +2 -2
- package/dist/useSignatureHistory.d.cts +3 -3
- package/dist/useSignatureHistory.d.ts +3 -3
- package/dist/useSplitResize.d.cts +6 -6
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useTimeSelection.d.cts +3 -3
- package/dist/useTimeSelection.d.ts +3 -3
- package/dist/useWorkflowValidation.d.cts +102 -102
- package/dist/useWorkflowValidation.d.ts +102 -102
- package/dist/verification.d.cts +2 -2
- package/dist/verification.d.ts +2 -2
- package/docs/engineering.en.md +6 -0
- package/docs/engineering.md +6 -0
- package/docs/guides/api-migration.md +17 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<p>
|
|
9
9
|
<a href="https://www.npmjs.com/package/@robot-admin/naive-ui-components"><img src="https://img.shields.io/npm/v/@robot-admin/naive-ui-components?style=flat-square&color=249D70&labelColor=183C2E" alt="npm version"></a>
|
|
10
10
|
<a href="./package.json"><img src="https://img.shields.io/badge/Vue-3.5+-249D70?style=flat-square&logo=vue.js&logoColor=white&labelColor=183C2E" alt="Vue 3.5+"></a>
|
|
11
|
-
<a href="./
|
|
11
|
+
<a href="./docs/engineering.md#typescript-构建与消费"><img src="https://img.shields.io/badge/TypeScript-5.9.3-3178C6?style=flat-square&logo=typescript&logoColor=white&labelColor=183C2E" alt="Build: TypeScript 5.9.3"></a>
|
|
12
12
|
<a href="https://github.com/ChenyCHENYU/naive-ui-components/actions/workflows/ci.yml"><img src="https://github.com/ChenyCHENYU/naive-ui-components/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
13
13
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-64748B?style=flat-square&labelColor=183C2E" alt="MIT License"></a>
|
|
14
14
|
</p>
|
|
@@ -33,42 +33,18 @@
|
|
|
33
33
|
| 按需消费 | 63 个独立组件入口、自动导入 Resolver、组件样式入口,以及表单/表格的基础样式层级 |
|
|
34
34
|
| 独立接入 | 支持全量注册与局部导入;反馈、文案和全局配置可由宿主提供,表单弹窗可接入结构兼容的 Headless CRUD |
|
|
35
35
|
|
|
36
|
-
组件库负责界面与交互。业务接口、身份权限、上传服务和第三方平台配置由应用接入。当前仓库版本 **0.40.
|
|
36
|
+
组件库负责界面与交互。业务接口、身份权限、上传服务和第三方平台配置由应用接入。当前仓库版本 **0.40.5**,版本变化见 [CHANGELOG](./CHANGELOG.md)。
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
0.34 完善树的动态图标、自定义节点状态与操作配置,以及组织架构图的数据映射、受控交互和连线。目录选择使用 `C_Tree`,卡片式汇报关系使用独立的 `C_OrgChart`。见[组织场景示例](./docs/guides/tree-org-examples.md)。
|
|
41
|
-
|
|
42
|
-
0.36 增加组织人员选择入口 `C_UserPicker`,共用分页、草稿和确认机制;完善审批节点端口、显式条件分支及统一选人配置。见[人员选择](./docs/guides/user-picker.md)与[工作流设计](./docs/guides/workflow.md)。
|
|
43
|
-
|
|
44
|
-
搜索条件、录入字段和操作按钮可以由响应式配置生成。筛选和编辑共享紧凑密度,支持校验、异步选项和业务弹窗。后端字典或权限由项目接入,表单和搜索消费普通选项,表格消费普通列配置。
|
|
45
|
-
|
|
46
|
-
`C_Select` 支持独立单选、多选与自由标签。表单和搜索多选共用紧凑标签摘要,日期时间字段可直接读写接口字符串。见[多选与日期时间用法](./docs/guides/data-workflows.md#多选标签和日期时间)。
|
|
47
|
-
|
|
48
|
-
远程选项、自由文本建议和多列实体选择分别使用 `C_Select`、`C_AutoComplete`、`C_DataPicker`,共享请求契约;表单与搜索字段可直接配置 `source`。见[搜索与选择用法](./docs/guides/search-workflows.md#远程选项与自由文本建议)及[产销场景核对](./docs/search-selection-coverage.md)。
|
|
49
|
-
|
|
50
|
-
列表按场景组合 `C_FormSearch`、`C_ActionBar`、`C_FormModal` 和 `C_DataPicker`。同一套表单与搜索可搭配 `C_Table` 或 MachTable,各自使用原生表格配置和分页。见[组合用法](./docs/guides/data-workflows.md#搜索表单与弹窗组合)、[表单密度](./docs/guides/form-density.md)和[运行时性能](./docs/guides/runtime-performance.md)。
|
|
51
|
-
|
|
52
|
-
搜索区用 `columns: 3` 或 `columns: 4` 限定每行字段数,操作按钮保持靠右。表单内的实体选择用 `presentation="inline"` 在原处展开,复杂的进阶查询可通过选择器的 `#query` 插槽接入多个条件。见[搜索区用法](./docs/guides/search-workflows.md)和[数据选择器](./docs/guides/data-picker.md)。
|
|
53
|
-
|
|
54
|
-
设置 `searchOnReset: true`,让重置与搜索共用 `onSearch`。表单选择字段通过 `createDataPickerField` 接入,列表行操作使用 `config.actions.inline`。见[工作台组合](./docs/guides/data-workflows.md)。
|
|
38
|
+
接入时直接使用组件 props、业务数据和公开类型;复杂表单、查询与弹窗再使用对应组合函数。已有项目见 [0.40.4 接入收敛说明](./docs/guides/api-migration.md#0404-接入收敛),可逐页简化配置,现有兼容入口继续保留。
|
|
55
39
|
|
|
56
40
|
## 能力地图
|
|
57
41
|
|
|
58
|
-
`C_Table` 保留 Naive UI 原生空态,继承 Provider 的主题、语言与 `componentOptions.DataTable.renderEmpty`。使用 `#empty` 可替换单个表格的空态内容。
|
|
59
|
-
|
|
60
|
-
`C_Table` 窄列编辑时操作组可自然换行,输入保持可见。功能列保持紧凑;普通自动业务列按表头与内容基准比例均衡分配余量,列多时保留基准横向滚动。显式宽度和已保存的列宽偏好继续生效。
|
|
61
|
-
|
|
62
|
-
`C_Table` 默认显示序号和分页,数字与其他内容默认居中。通过 `:row-number="false"` 和 `:pagination="false"` 分别关闭自动序号与分页。后端返回列和行可直接绑定,详见[动态表格示例](./docs/guides/usage.md#后端返回列和行)。
|
|
63
|
-
|
|
64
|
-
勾选行默认显示左侧主题色标识,可通过 `--c-table-selected-marker-width: 0px` 关闭。异步导出使用发起时的列、格式化和文件配置,卸载后停止下载。`createComponentTheme({ primary: '#409eff' })` 默认让填充按钮和选中控件使用白色前景;需要其他配色时集中设置 `onSolid`,或在局部 Provider 覆盖,详见[主题标准](./docs/guides/theme.md)。
|
|
65
|
-
|
|
66
|
-
列中声明 `{ type: 'selection' }` 即启用多选,无需再写 `selection: true`。显式全局或单表 `selection: false` / `{ enabled: false }` 继续优先,动态列沿用同一规则。
|
|
67
|
-
|
|
68
42
|
| 场景 | 代表组件 | 覆盖能力 |
|
|
69
43
|
| ---------- | ---------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
70
44
|
| 数据录入 | `C_Form` · `C_FormModal` · `C_FormSearch` | 动态字段、校验、异步提交、搜索与新增/编辑弹窗 |
|
|
71
45
|
| 数据操作 | `C_Table` · `C_ActionBar` · `C_Tree` · `C_Transfer` | 分页、树形数据、常显录入、行/单元格编辑、跨页选择、导出与批量操作 |
|
|
46
|
+
| 搜索与选择 | `C_Select` · `C_AutoComplete` · `C_DataPicker` · `C_UserPicker` | 远程选项、文本建议、多列表格选择与组织选人 |
|
|
47
|
+
| 结构与卡片 | `C_OrgChart` · `C_WaterFall` | 汇报关系、响应式卡片布局、长列表窗口化与业务字段推导 |
|
|
72
48
|
| 专业编辑 | `C_Editor` · `C_Markdown` · `C_Cron` · `C_FormulaEditor` | 富文本、Markdown、Cron 预览、公式编辑与本地试算 |
|
|
73
49
|
| 流程与计划 | `C_AntV` · `C_WorkFlow` · `C_VtableGantt` · `C_FullCalendar` | ER/BPMN/UML、审批流程、甘特与日历 |
|
|
74
50
|
| 文件与媒体 | `C_Upload` · `C_FilePreview` · `C_VideoPlayer` · `C_AudioPlayer` | 分片上传、PDF/Word/Excel 预览、音视频播放 |
|
|
@@ -78,6 +54,17 @@
|
|
|
78
54
|
|
|
79
55
|
查看 [全部 63 个组件与依赖](./docs/components.md),或在 [Robot Admin](https://robotadmin.cn) 中体验组件场景。Cron 预览只计算时间,公式只进行本地试算;生产人机验证需接入服务端校验,详见[使用指南](./docs/guides/usage.md)。
|
|
80
56
|
|
|
57
|
+
### 按任务选择组件
|
|
58
|
+
|
|
59
|
+
| 需要完成的任务 | 推荐入口与用法 |
|
|
60
|
+
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| 筛选、编辑与批量操作 | 组合 `C_FormSearch`、`C_FormModal` 与 `C_ActionBar`,共享表单字段和紧凑密度;见[工作台组合](./docs/guides/data-workflows.md) |
|
|
62
|
+
| 选项、文本建议或实体选择 | `C_Select` 选值,`C_AutoComplete` 补全文本,`C_DataPicker` 展示多列实体;远程字段直接配置 `source`,见[搜索与选择](./docs/guides/search-workflows.md) |
|
|
63
|
+
| 目录、汇报关系或人员选择 | 分别使用 `C_Tree`、`C_OrgChart`、`C_UserPicker`;见[组织场景](./docs/guides/tree-org-examples.md)与[人员选择](./docs/guides/user-picker.md) |
|
|
64
|
+
| 表格展示与录入 | `C_Table` 默认带序号和分页;选择列即可启用多选,`config.edit` 切换编辑模式;见[编辑指南](./docs/guides/table-editing.md)与[列宽及密度](./docs/guides/table-density.md) |
|
|
65
|
+
|
|
66
|
+
表单和搜索可搭配 `C_Table` 或其他表格,各自保留原生列与分页契约。流程、上传、地图等组件提供界面和接入点,真实审批执行、文件服务及平台权限仍由应用负责。
|
|
67
|
+
|
|
81
68
|
## 快速开始
|
|
82
69
|
|
|
83
70
|
### 安装
|
|
@@ -144,6 +131,70 @@ bun add vue@^3.5.3 naive-ui@^2.35.0
|
|
|
144
131
|
|
|
145
132
|
表单内置提交、重置与校验流程。实际保存时,将异步请求放入 `config.onSubmit` 并等待完成;`@submit` 用于完成通知。表单布局、验证规则、弹窗与远程表格示例见[使用指南](./docs/guides/usage.md)。
|
|
146
133
|
|
|
134
|
+
### 直接使用公开 Props
|
|
135
|
+
|
|
136
|
+
简单组件直接写 props 即可;需要抽出配置时,用组件公开的类型检查字段,无需重复声明接口或增加配置工厂:
|
|
137
|
+
|
|
138
|
+
```vue
|
|
139
|
+
<script setup lang="ts">
|
|
140
|
+
import {
|
|
141
|
+
C_Progress,
|
|
142
|
+
type ProgressProps,
|
|
143
|
+
} from '@robot-admin/naive-ui-components/C_Progress'
|
|
144
|
+
import '@robot-admin/naive-ui-components/C_Progress/style.css'
|
|
145
|
+
|
|
146
|
+
const progress = {
|
|
147
|
+
percentage: 62.5,
|
|
148
|
+
isAnimation: true,
|
|
149
|
+
} satisfies ProgressProps
|
|
150
|
+
</script>
|
|
151
|
+
|
|
152
|
+
<template>
|
|
153
|
+
<C_Progress v-bind="progress" />
|
|
154
|
+
</template>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`BarcodeProps`、`CascadeProps`、`StepsProps`、`CodeProps`、`EditorProps` 和 `MarkdownProps` 同样可从对应组件子路径导入,字段与组件实际 props 共用声明。
|
|
158
|
+
|
|
159
|
+
### 瀑布流自动推导业务字段
|
|
160
|
+
|
|
161
|
+
`items` 提供 `id`、`src`、`width`、`height`,其余业务字段自动传递到插槽和事件。无需转换成基础 `WaterFallItem[]`:
|
|
162
|
+
|
|
163
|
+
```vue
|
|
164
|
+
<script setup lang="ts">
|
|
165
|
+
import { C_WaterFall } from '@robot-admin/naive-ui-components/C_WaterFall'
|
|
166
|
+
import '@robot-admin/naive-ui-components/C_WaterFall/style.css'
|
|
167
|
+
|
|
168
|
+
const products = [
|
|
169
|
+
{
|
|
170
|
+
id: 1,
|
|
171
|
+
src: '/images/product.jpg',
|
|
172
|
+
width: 640,
|
|
173
|
+
height: 480,
|
|
174
|
+
productCode: 'A-01',
|
|
175
|
+
price: 125.5,
|
|
176
|
+
},
|
|
177
|
+
]
|
|
178
|
+
</script>
|
|
179
|
+
|
|
180
|
+
<template>
|
|
181
|
+
<C_WaterFall :items="products">
|
|
182
|
+
<template #item="{ item, width, height }">
|
|
183
|
+
<img
|
|
184
|
+
:src="item.src"
|
|
185
|
+
:alt="item.productCode"
|
|
186
|
+
:width="width"
|
|
187
|
+
:height="height"
|
|
188
|
+
loading="lazy"
|
|
189
|
+
/>
|
|
190
|
+
<p>{{ item.productCode }} · {{ item.price.toFixed(2) }}</p>
|
|
191
|
+
</template>
|
|
192
|
+
</C_WaterFall>
|
|
193
|
+
</template>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
图片路径替换为应用自己的资源。插槽和事件中的条目只读,嵌套 `ref` 保持 Vue 解包语义;编辑时更新应用持有的源数据。长列表、变高卡片与滚动容器配置见[瀑布流指南](./docs/guides/waterfall.md)。
|
|
197
|
+
|
|
147
198
|
### 表格偏好按账号隔离
|
|
148
199
|
|
|
149
200
|
应用启动时注册一次。`session` 是项目已有的响应式身份状态,未登录或身份尚未就绪时为 `undefined`:
|
|
@@ -206,35 +257,37 @@ Resolver 默认解析到组件子路径;`importStyle` 默认是 `false`,需
|
|
|
206
257
|
|
|
207
258
|
组件样式入口会加载组合组件及共享设计变量,无需额外导入。手动导入时可选 `C_Form/base.css`、`C_Table/base.css`;完整样式也提供 `full.css` 别名。重型编辑器、流程、地图和媒体组件建议随业务路由加载。完整策略与全量注册示例见[导入指南](./docs/guides/usage.md#导入方式)。
|
|
208
259
|
|
|
209
|
-
|
|
260
|
+
仓库按独立入口构建最小消费场景,校验首屏 JS gzip、重型依赖边界和首次打开增量;数据包含 Vue 与 Naive UI,不能相加作为整站体积,也不替代业务页面的交互测量。检查范围见[开发与构建](./docs/engineering.md#开发);[0.15.0 体积记录](./docs/performance-0.15.0.md)仅保留为历史对照。
|
|
210
261
|
|
|
211
262
|
根入口聚合导航组件,运行时也需要 `vue-router`。不使用路由的项目请选择组件子路径,无需因此补装无关可选 peer。
|
|
212
263
|
|
|
213
264
|
## 文档导航
|
|
214
265
|
|
|
215
|
-
| 文档
|
|
216
|
-
|
|
|
217
|
-
| [架构与隔离](./docs/architecture.md)
|
|
218
|
-
| [组件目录](./docs/components.md)
|
|
219
|
-
| [使用指南](./docs/guides/usage.md)
|
|
220
|
-
| [密度与多表工作台](./docs/guides/table-density.md)
|
|
221
|
-
| [主题与视觉标准](./docs/guides/theme.md)
|
|
222
|
-
| [大列表与异步任务](./docs/guides/runtime-performance.md)
|
|
223
|
-
| [瀑布流长列表](./docs/guides/waterfall.md)
|
|
224
|
-
| [兼容 API 迁移](./docs/guides/api-migration.md)
|
|
225
|
-
| [真实场景覆盖](./docs/wl-ui-produce-coverage.md)
|
|
226
|
-
| [
|
|
227
|
-
| [开发与构建](./docs/engineering.md)
|
|
228
|
-
| [品牌资源](./docs/assets/README.md)
|
|
229
|
-
| [变更记录](./CHANGELOG.md)
|
|
230
|
-
| [安全策略](./SECURITY.md)
|
|
231
|
-
|
|
232
|
-
|
|
266
|
+
| 文档 | 内容 |
|
|
267
|
+
| --------------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
268
|
+
| [架构与隔离](./docs/architecture.md) | 依赖边界、实例所有权与独立 Element Plus 演进路线 |
|
|
269
|
+
| [组件目录](./docs/components.md) | 63 个组件、外部依赖与各组件的使用边界 |
|
|
270
|
+
| [使用指南](./docs/guides/usage.md) | 导入、表单表格、Cron/公式、地图、引导、人机验证、登录与页面加载 |
|
|
271
|
+
| [密度与多表工作台](./docs/guides/table-density.md) | 表单/搜索/表格统一密度、编辑模式、分屏与树能力 |
|
|
272
|
+
| [主题与视觉标准](./docs/guides/theme.md) | 统一色彩、明暗主题、尺寸层级与局部覆盖,不增加 Provider |
|
|
273
|
+
| [大列表与异步任务](./docs/guides/runtime-performance.md) | 自动窗口化、聊天滚动、搜索索引、字幕与图片任务 |
|
|
274
|
+
| [瀑布流长列表](./docs/guides/waterfall.md) | 自动窗口化、嵌套滚动、变高卡片与键盘导航 |
|
|
275
|
+
| [兼容 API 迁移](./docs/guides/api-migration.md) | 0.40.4 接入收敛、标准模型、应用渲染器与只读迁移检查 |
|
|
276
|
+
| [真实场景覆盖](./docs/wl-ui-produce-coverage.md) | wl-ui-produce 对照、可组合能力与需要适配的边界 |
|
|
277
|
+
| [0.40.4 组件审计记录](./docs/component-audit-closure-0.40.4.md) | 该版本的逐组件修复、类型收敛、兼容边界与正式产物验证 |
|
|
278
|
+
| [开发与构建](./docs/engineering.md) | 工程结构、六阶段构建、组件扩展、校验与发布流程 |
|
|
279
|
+
| [品牌资源](./docs/assets/README.md) | Robot 系列 Logo、可编辑 SVG 与高清 PNG 封面 |
|
|
280
|
+
| [变更记录](./CHANGELOG.md) | 版本更新与兼容变化 |
|
|
281
|
+
| [安全策略](./SECURITY.md) | 漏洞报告与维护约定 |
|
|
282
|
+
|
|
283
|
+
依赖安全以实际锁文件和当次审计为准:`bun run check:audit` 保留原始发现,并核验精确的本地缓解或不受影响证据;`check:audit:raw` 提供原始报告。仓库 overrides 与开发补丁不会自动传给使用侧,应用需审计自己的锁文件。历史扫描不代表当前结果,已打包运行时与消费依赖的边界见[安全策略](./SECURITY.md)。
|
|
233
284
|
|
|
234
285
|
## 本地开发
|
|
235
286
|
|
|
236
287
|
维护本仓库需要 **Node.js ≥20.19.0**、固定的 **Bun 1.4.2**;CI 按 `.node-version` 与冻结锁文件安装,并校验实际依赖覆盖。消费者的 Bun 最低版本仍为 1.3.14。
|
|
237
288
|
|
|
289
|
+
源码检查与构建使用锁定的 **TypeScript 5.9.3**。CI 另用 **TypeScript 5.8.3** 验证构建后声明的消费兼容性,不代表以 5.8 构建本仓库源码;详见[TypeScript 构建与消费](./docs/engineering.md#typescript-构建与消费)。
|
|
290
|
+
|
|
238
291
|
```bash
|
|
239
292
|
git clone https://github.com/ChenyCHENYU/naive-ui-components.git
|
|
240
293
|
cd naive-ui-components
|
|
@@ -263,34 +316,3 @@ bun run check:audit # 单独运行依赖安全审计,CI 在 verify 前执行
|
|
|
263
316
|
## 许可证
|
|
264
317
|
|
|
265
318
|
[MIT License](./LICENSE) · Made by [CHENY](https://github.com/ChenyCHENYU)
|
|
266
|
-
|
|
267
|
-
## 内容列宽与状态颜色(0.24)
|
|
268
|
-
|
|
269
|
-
`C_Table` 未声明 `width` 的业务列默认按表头和显示文字测宽,均匀抽样最多 100 条已加载数据,测量基准默认 80–360px;少列时实际显示宽度可按比例扩展。`minWidth/maxWidth` 可调整边界;显式列宽、原生百分比宽度、列设置后的宽度和 `display.columnWidth` 优先。`autoWidth: false` 恢复原统一默认 180px。横向虚拟化同样使用数值测宽,不依赖浏览器扫描所有行;长内容默认省略并提供 tooltip。
|
|
270
|
-
|
|
271
|
-
```ts
|
|
272
|
-
const columns = [
|
|
273
|
-
{ type: 'index' },
|
|
274
|
-
{ key: 'customer', title: '客户', maxWidth: 280 },
|
|
275
|
-
{ key: 'status', title: '状态', status: true },
|
|
276
|
-
{
|
|
277
|
-
key: 'planStatus',
|
|
278
|
-
title: '计划状态',
|
|
279
|
-
status: {
|
|
280
|
-
S1B: { label: '待复核', color: 'danger' },
|
|
281
|
-
S1C: { label: '已完成', color: 'success' },
|
|
282
|
-
special: { label: '特殊处理', color: '#8b5cf6' },
|
|
283
|
-
},
|
|
284
|
-
},
|
|
285
|
-
]
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
状态列复用 Naive UI 标签和主题。支持 `success/warning/danger/info/neutral`,也支持 Naive 的 `error/default/primary` 和 CSS 颜色。未知代码保持中性;`0/false` 是有效值,空值保留空态。显式 render 优先;formatter 文字会用于默认颜色判断和测宽。状态配置只改变展示,不会改写数据、排序、筛选或导出。
|
|
289
|
-
|
|
290
|
-
默认智能布局会在缓存的内容基准上分配可用宽度;空间充足时自动业务列按基准比例铺满,空间不足时不压缩表头。数值列宽控制业务列与横向滚动,`scrollX` 不再挑某一列单独撑大。拖动只改变目标列,保存后继续保留原来的单行省略、提示和默认下限。操作列默认固定右侧;缩列后空余画布由包内承接,右固定区持续贴住视口,其他业务列保持原宽。需要 Naive UI 原生铺满或强制最小滚动宽度时,显式传 `table-layout="fixed"` / `table-layout="auto"`;百分比等非数值列宽也沿用原生布局。
|
|
291
|
-
|
|
292
|
-
测宽不额外挂载或执行 render;图标、进度条和复杂自定义内容请显式指定 width。数据与列配置更新会触发新的有界测量,配置和缓存只属于当前组件实例。此版本将未声明宽度的业务列由自然布局改为有界内容宽度;既有显式布局及原生 table-layout 覆盖仍保留。
|
|
293
|
-
|
|
294
|
-
表头默认完整展示,不随单元格 ellipsis 配置省略。所有业务列的最小宽度计入完整标题及排序/筛选控件;初始布局、显式窄列宽、恢复列设置与拖拽缩列均受此下限保护。360px 仅限制数据内容测宽;标题更长时允许超过该值,并使用表格内部横向滚动。复杂自定义标题请配置 minWidth。 自动列内的原生链接、按钮随省略容器收缩,悬停可查看完整内容;明确配置 `ellipsis: false` 时保留多行呈现。
|
|
295
|
-
|
|
296
|
-
紧凑表单与搜索的纵向间距收紧至 4px,空反馈区 2px,校验按内容自然撑高。表单弹窗同步收紧并支持内部滚动;移除逐字段排队入场和布局尺寸动画。详情的左右同排展示见 Robot_Admin 产销模块。
|
package/README_EN.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<p>
|
|
9
9
|
<a href="https://www.npmjs.com/package/@robot-admin/naive-ui-components"><img src="https://img.shields.io/npm/v/@robot-admin/naive-ui-components?style=flat-square&color=249D70&labelColor=183C2E" alt="npm version"></a>
|
|
10
10
|
<a href="./package.json"><img src="https://img.shields.io/badge/Vue-3.5+-249D70?style=flat-square&logo=vue.js&logoColor=white&labelColor=183C2E" alt="Vue 3.5+"></a>
|
|
11
|
-
<a href="./
|
|
11
|
+
<a href="./docs/engineering.en.md#typescript-build-and-consumption"><img src="https://img.shields.io/badge/TypeScript-5.9.3-3178C6?style=flat-square&logo=typescript&logoColor=white&labelColor=183C2E" alt="Build: TypeScript 5.9.3"></a>
|
|
12
12
|
<a href="https://github.com/ChenyCHENYU/naive-ui-components/actions/workflows/ci.yml"><img src="https://github.com/ChenyCHENYU/naive-ui-components/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
13
13
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-64748B?style=flat-square&labelColor=183C2E" alt="MIT License"></a>
|
|
14
14
|
</p>
|
|
@@ -33,50 +33,39 @@
|
|
|
33
33
|
| Selective loading | 63 component entries, an auto-import resolver, component CSS and base styles for forms and tables |
|
|
34
34
|
| Application integration | Global registration or local imports; injectable feedback, locale and defaults; form dialogs compatible with structurally matching headless CRUD controllers |
|
|
35
35
|
|
|
36
|
-
The library handles UI and interaction. Applications supply business APIs, authentication, authorization, upload services and platform configuration. The current repository version is **0.40.
|
|
36
|
+
The library handles UI and interaction. Applications supply business APIs, authentication, authorization, upload services and platform configuration. The current repository version is **0.40.5**. See the [changelog](./CHANGELOG.md) for release details.
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
0.34 adds state-aware tree icons, richer node contexts and action states, plus organization-chart field mapping, controlled interaction and measured connectors. Use `C_Tree` for hierarchical selection and the independent `C_OrgChart` for reporting relationships. See the [organization examples](./docs/guides/tree-org-examples.md) (Chinese).
|
|
41
|
-
|
|
42
|
-
0.36 adds `C_UserPicker` for organization-based person selection, sharing pagination, drafts and confirmation. Workflow nodes gain real connection ports, explicit conditional targets and the same person-selection interface. See [person selection](./docs/guides/user-picker.md) and [workflow design](./docs/guides/workflow.md) (Chinese).
|
|
43
|
-
|
|
44
|
-
Use `C_Select` for standalone selections and freeform tags. Multiple selections in forms and search share the compact tag summary. Date and time fields can bind directly to formatted API strings. See the [composition examples](./docs/guides/data-workflows.md#多选标签和日期时间) (Chinese).
|
|
45
|
-
|
|
46
|
-
Remote options, free text suggestions and multi-column entity selection use `C_Select`, `C_AutoComplete` and `C_DataPicker` with a shared request contract. Form and search fields accept `source` directly. See [search workflows](./docs/guides/search-workflows.md#远程选项与自由文本建议) and [scenario coverage](./docs/search-selection-coverage.md) (Chinese).
|
|
47
|
-
|
|
48
|
-
Search fields, form fields, and actions can be generated from reactive configuration. Compact density applies consistently across search and data entry, including validation, async options, and dialogs. The application owns dictionaries and permissions, supplying ordinary options and column definitions to components.
|
|
49
|
-
|
|
50
|
-
Compose `C_FormSearch`, `C_ActionBar`, `C_FormModal`, and `C_DataPicker` around either `C_Table` or MachTable. Each grid uses its own column definitions and pagination. See [workspace composition](./docs/guides/data-workflows.md), [form density](./docs/guides/form-density.en.md), and [runtime performance](./docs/guides/runtime-performance.md).
|
|
51
|
-
|
|
52
|
-
Set search `columns` to `3` or `4` for responsive field tracks with right-aligned actions. Use `presentation="inline"` for selection inside an edit form and the picker's `#query` slot for multiple filters. See [search workflows](./docs/guides/search-workflows.md) and [data picker](./docs/guides/data-picker.md).
|
|
53
|
-
|
|
54
|
-
Set `searchOnReset: true` to run both search and reset through `onSearch`. Use `createDataPickerField` for form lookup fields and `config.actions.inline` for row actions. See [workspace composition](./docs/guides/data-workflows.md).
|
|
38
|
+
Start with component props, business data and public types. Use composables when coordinating forms, queries and dialogs. Existing projects can simplify one page at a time using the [0.40.4 adoption notes](./docs/guides/api-migration.md#0404-接入收敛) (Chinese); existing compatibility APIs remain available.
|
|
55
39
|
|
|
56
40
|
## Capability map
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
| Scenario | Representative components | Capabilities |
|
|
43
|
+
| --------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| Data entry | `C_Form` · `C_FormModal` · `C_FormSearch` | Dynamic fields, validation, async submission, search and create/edit dialogs |
|
|
45
|
+
| Data operations | `C_Table` · `C_ActionBar` · `C_Tree` · `C_Transfer` | Pagination, trees, inline/row/cell editing, cross-page selection, exports and batch actions |
|
|
46
|
+
| Search and selection | `C_Select` · `C_AutoComplete` · `C_DataPicker` · `C_UserPicker` | Remote options, text suggestions, multi-column entity selection and organization-based people selection |
|
|
47
|
+
| Structures and cards | `C_OrgChart` · `C_WaterFall` | Reporting relationships, responsive cards, list windowing and inferred business fields |
|
|
48
|
+
| Editing | `C_Editor` · `C_Markdown` · `C_Cron` · `C_FormulaEditor` | Rich text, Markdown, Cron previews and local formula evaluation |
|
|
49
|
+
| Workflow and planning | `C_AntV` · `C_WorkFlow` · `C_VtableGantt` · `C_FullCalendar` | ER/BPMN/UML, approval flows, Gantt charts and calendars |
|
|
50
|
+
| Files and media | `C_Upload` · `C_FilePreview` · `C_VideoPlayer` · `C_AudioPlayer` | Chunked uploads, PDF/Word/Excel previews and audio/video playback |
|
|
51
|
+
| Images and maps | `C_Signature` · `C_ImageCropper` · `C_QRCode` · `C_Map` | Signatures, cropping, QR codes, OpenStreetMap and AMap |
|
|
52
|
+
| Workspace | `C_Menu` · `C_Tabs` · `C_TagsView` · `C_GlobalSearch` | Menus, view switching, tab navigation and global search |
|
|
53
|
+
| Common interactions | `C_Login` · `C_Captcha` · `C_Guide` · `C_PageLoading` | Login UI, human verification, onboarding and navigation feedback |
|
|
61
54
|
|
|
62
|
-
|
|
55
|
+
Browse [all 63 components and dependencies](./docs/components.en.md), or explore scenarios in [Robot Admin](https://robotadmin.cn). Cron previews calculate times only; formulas run locally. Production human verification requires server validation. See the [usage guide](./docs/guides/usage.en.md).
|
|
63
56
|
|
|
64
|
-
|
|
57
|
+
### Choose by task
|
|
65
58
|
|
|
66
|
-
|
|
59
|
+
The focused guides below are in Chinese.
|
|
67
60
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
| Files and media | `C_Upload` · `C_FilePreview` · `C_VideoPlayer` · `C_AudioPlayer` | Chunked uploads, PDF/Word/Excel previews and audio/video playback |
|
|
75
|
-
| Images and maps | `C_Signature` · `C_ImageCropper` · `C_QRCode` · `C_Map` | Signatures, cropping, QR codes, OpenStreetMap and AMap |
|
|
76
|
-
| Workspace | `C_Menu` · `C_Tabs` · `C_TagsView` · `C_GlobalSearch` | Menus, view switching, tab navigation and global search |
|
|
77
|
-
| Common interactions | `C_Login` · `C_Captcha` · `C_Guide` · `C_PageLoading` | Login UI, human verification, onboarding and navigation feedback |
|
|
61
|
+
| Task | Recommended entry and usage |
|
|
62
|
+
| ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| Filter, edit and run batch actions | Compose `C_FormSearch`, `C_FormModal` and `C_ActionBar`, sharing field definitions and compact density; see [workspace composition](./docs/guides/data-workflows.md) |
|
|
64
|
+
| Select values, suggest text or choose entities | Use `C_Select`, `C_AutoComplete` or `C_DataPicker` respectively; remote fields accept `source` directly. See [search and selection](./docs/guides/search-workflows.md) |
|
|
65
|
+
| Browse a hierarchy, display reporting lines or choose people | Use `C_Tree`, `C_OrgChart` or `C_UserPicker`; see [organization examples](./docs/guides/tree-org-examples.md) and [person selection](./docs/guides/user-picker.md) |
|
|
66
|
+
| Display and edit tabular data | `C_Table` includes row numbers and pagination by default; a selection column enables selection, and `config.edit` selects the editing mode. See [table editing](./docs/guides/table-editing.md) and [widths and density](./docs/guides/table-density.md) |
|
|
78
67
|
|
|
79
|
-
|
|
68
|
+
Forms and search can accompany `C_Table` or another grid, retaining each grid's native column and pagination contracts. Workflow, upload and map components provide UI and integration points; applications own approval execution, file services and platform authorization.
|
|
80
69
|
|
|
81
70
|
## Quick start
|
|
82
71
|
|
|
@@ -144,6 +133,70 @@ Place this example in `App.vue`. It uses a component subpath and its CSS entry,
|
|
|
144
133
|
|
|
145
134
|
The form includes submission, reset and validation. For persistence, await your async request inside `config.onSubmit`; use `@submit` for completion notifications. See the [usage guide](./docs/guides/usage.en.md) for layouts, validation rules, dialogs and remote tables.
|
|
146
135
|
|
|
136
|
+
### Use public Props directly
|
|
137
|
+
|
|
138
|
+
For simple components, bind props directly. When extracting configuration, use the component's public type to check fields without duplicating an interface or adding a configuration factory:
|
|
139
|
+
|
|
140
|
+
```vue
|
|
141
|
+
<script setup lang="ts">
|
|
142
|
+
import {
|
|
143
|
+
C_Progress,
|
|
144
|
+
type ProgressProps,
|
|
145
|
+
} from '@robot-admin/naive-ui-components/C_Progress'
|
|
146
|
+
import '@robot-admin/naive-ui-components/C_Progress/style.css'
|
|
147
|
+
|
|
148
|
+
const progress = {
|
|
149
|
+
percentage: 62.5,
|
|
150
|
+
isAnimation: true,
|
|
151
|
+
} satisfies ProgressProps
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<template>
|
|
155
|
+
<C_Progress v-bind="progress" />
|
|
156
|
+
</template>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`BarcodeProps`, `CascadeProps`, `StepsProps`, `CodeProps`, `EditorProps` and `MarkdownProps` are also available from their component subpaths. They share declarations with the actual component props.
|
|
160
|
+
|
|
161
|
+
### Infer waterfall business fields
|
|
162
|
+
|
|
163
|
+
Provide `id`, `src`, `width` and `height` in `items`. Additional business fields flow into slots and events automatically, without converting your data to a base `WaterFallItem[]`:
|
|
164
|
+
|
|
165
|
+
```vue
|
|
166
|
+
<script setup lang="ts">
|
|
167
|
+
import { C_WaterFall } from '@robot-admin/naive-ui-components/C_WaterFall'
|
|
168
|
+
import '@robot-admin/naive-ui-components/C_WaterFall/style.css'
|
|
169
|
+
|
|
170
|
+
const products = [
|
|
171
|
+
{
|
|
172
|
+
id: 1,
|
|
173
|
+
src: '/images/product.jpg',
|
|
174
|
+
width: 640,
|
|
175
|
+
height: 480,
|
|
176
|
+
productCode: 'A-01',
|
|
177
|
+
price: 125.5,
|
|
178
|
+
},
|
|
179
|
+
]
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<template>
|
|
183
|
+
<C_WaterFall :items="products">
|
|
184
|
+
<template #item="{ item, width, height }">
|
|
185
|
+
<img
|
|
186
|
+
:src="item.src"
|
|
187
|
+
:alt="item.productCode"
|
|
188
|
+
:width="width"
|
|
189
|
+
:height="height"
|
|
190
|
+
loading="lazy"
|
|
191
|
+
/>
|
|
192
|
+
<p>{{ item.productCode }} · {{ item.price.toFixed(2) }}</p>
|
|
193
|
+
</template>
|
|
194
|
+
</C_WaterFall>
|
|
195
|
+
</template>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Replace the image path with an application asset. Slot and event records are read-only and preserve Vue's nested `ref` unwrapping; edit the source data owned by your application. See the [waterfall guide](./docs/guides/waterfall.md) (Chinese) for long lists, variable-height cards and scroll containers.
|
|
199
|
+
|
|
147
200
|
### Scope table preferences per account
|
|
148
201
|
|
|
149
202
|
Register once when the app starts. `session` is your existing reactive identity state; keep it `undefined` until the identity is fully resolved:
|
|
@@ -206,35 +259,37 @@ The resolver uses component subpaths by default. `importStyle` defaults to `fals
|
|
|
206
259
|
|
|
207
260
|
Each component CSS entry loads its composed styles and shared design tokens automatically. Manual imports can use `C_Form/base.css` and `C_Table/base.css`; full styles also have `full.css` aliases. Load heavy editors, flows, maps and media with their business routes. See [import strategies](./docs/guides/usage.en.md#import-strategies) for details and global registration examples.
|
|
208
261
|
|
|
209
|
-
|
|
262
|
+
The repository builds minimal consumers per entry and checks initial JS gzip, heavy dependency boundaries and first-open increments. Measurements include Vue and Naive UI, cannot be summed into a whole-app estimate, and do not replace page-level interaction measurements. See [development and build](./docs/engineering.en.md#development) for coverage; the [0.15.0 size report](./docs/performance-0.15.0.md) (Chinese) is retained as historical context only.
|
|
210
263
|
|
|
211
264
|
Root imports aggregate navigation components and require `vue-router` at runtime. Applications without it should use component subpaths; their unrelated optional peers are not required.
|
|
212
265
|
|
|
213
266
|
## Documentation
|
|
214
267
|
|
|
215
|
-
| Document
|
|
216
|
-
|
|
|
217
|
-
| [Architecture and isolation](./docs/architecture.en.md)
|
|
218
|
-
| [Component catalog](./docs/components.en.md)
|
|
219
|
-
| [Usage guide](./docs/guides/usage.en.md)
|
|
220
|
-
| [Density and workbenches](./docs/guides/table-density.md)
|
|
221
|
-
| [Theme and visual standard](./docs/guides/theme.md)
|
|
222
|
-
| [Lists and async tasks](./docs/guides/runtime-performance.md)
|
|
223
|
-
| [Waterfall lists](./docs/guides/waterfall.md)
|
|
224
|
-
| [Compatible API migration](./docs/guides/api-migration.md)
|
|
225
|
-
| [Production coverage review](./docs/wl-ui-produce-coverage.md)
|
|
226
|
-
| [
|
|
227
|
-
| [Development and build](./docs/engineering.en.md)
|
|
228
|
-
| [Brand assets](./docs/assets/README.md)
|
|
229
|
-
| [Changelog](./CHANGELOG.md)
|
|
230
|
-
| [Security policy](./SECURITY.md)
|
|
231
|
-
|
|
232
|
-
|
|
268
|
+
| Document | Contents |
|
|
269
|
+
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
|
270
|
+
| [Architecture and isolation](./docs/architecture.en.md) | Dependency boundaries, instance ownership and the independent Element Plus roadmap |
|
|
271
|
+
| [Component catalog](./docs/components.en.md) | All 63 components, dependencies and behavior boundaries |
|
|
272
|
+
| [Usage guide](./docs/guides/usage.en.md) | Imports, forms/tables, Cron/formulas, maps, onboarding, captcha, login and page loading |
|
|
273
|
+
| [Density and workbenches](./docs/guides/table-density.md) | Shared form/search/table density, edit modes, split panes and tree capabilities (Chinese) |
|
|
274
|
+
| [Theme and visual standard](./docs/guides/theme.md) | Semantic colors, light/dark mode, control sizes and local overrides with the existing provider (Chinese) |
|
|
275
|
+
| [Lists and async tasks](./docs/guides/runtime-performance.md) | Automatic list windows, chat scrolling, search indexes and media task ownership (Chinese) |
|
|
276
|
+
| [Waterfall lists](./docs/guides/waterfall.md) | Automatic windows, nested scrolling, measured cards and keyboard navigation (Chinese) |
|
|
277
|
+
| [Compatible API migration](./docs/guides/api-migration.md) | 0.40.4 adoption notes, standard models, application renderers and read-only migration checks (Chinese) |
|
|
278
|
+
| [Production coverage review](./docs/wl-ui-produce-coverage.md) | wl-ui-produce capability mapping and adapter boundaries (Chinese) |
|
|
279
|
+
| [0.40.4 component audit](./docs/component-audit-closure-0.40.4.md) | That release's fixes, type improvements, compatibility boundaries and packaged-consumer validation (Chinese) |
|
|
280
|
+
| [Development and build](./docs/engineering.en.md) | Source structure, six-stage build, adding components, checks and releases |
|
|
281
|
+
| [Brand assets](./docs/assets/README.md) | Robot family logo, editable SVG sources and high-resolution PNGs |
|
|
282
|
+
| [Changelog](./CHANGELOG.md) | Releases and compatibility changes |
|
|
283
|
+
| [Security policy](./SECURITY.md) | Vulnerability reporting and maintenance policy |
|
|
284
|
+
|
|
285
|
+
Dependency security depends on the actual lockfile and audit run. `bun run check:audit` retains raw findings and verifies evidence for narrowly scoped local mitigations or unaffected paths; `check:audit:raw` provides the original report. Repository overrides and development patches do not propagate to consumers, so applications must audit their own lockfiles. Historical scans are not current results. See the [security policy](./SECURITY.md) for bundled-runtime and consumer-dependency boundaries.
|
|
233
286
|
|
|
234
287
|
## Local development
|
|
235
288
|
|
|
236
289
|
Maintaining this repository requires **Node.js ≥20.19.0** and the pinned **Bun 1.4.2**. CI uses `.node-version`, the frozen lockfile and checks actual dependency overrides. The minimum Bun version for consumers remains 1.3.14.
|
|
237
290
|
|
|
291
|
+
Source checks and builds use locked **TypeScript 5.9.3**. CI additionally verifies consumption of the built declarations with **TypeScript 5.8.3**; this does not claim support for building repository source with 5.8. See [TypeScript build and consumption](./docs/engineering.en.md#typescript-build-and-consumption).
|
|
292
|
+
|
|
238
293
|
```bash
|
|
239
294
|
git clone https://github.com/ChenyCHENYU/naive-ui-components.git
|
|
240
295
|
cd naive-ui-components
|
|
@@ -263,15 +318,3 @@ See [development and build](./docs/engineering.en.md) for individual checks and
|
|
|
263
318
|
## License
|
|
264
319
|
|
|
265
320
|
[MIT License](./LICENSE) · Made by [CHENY](https://github.com/ChenyCHENYU)
|
|
266
|
-
|
|
267
|
-
## Content widths and status columns (0.24)
|
|
268
|
-
|
|
269
|
-
Columns without `width` now measure their header and up to 100 evenly sampled loaded rows, using formatted values and status labels. Content measurement bases default to 80–360px; final automatic widths may grow proportionally to fill available space. Saving a manual width preserves the original ellipsis, tooltip and default minimum. Action columns default to the right edge; the internal canvas absorbs spare space after shrinking without resizing peer business columns. Native links and buttons inside an ellipsis cell also shrink with a trailing ellipsis. Use `minWidth/maxWidth` to adjust the bounds. Explicit widths (including native strings), saved column widths and `display.columnWidth` take precedence. `autoWidth: false` restores the 180px default. Long automatic cells use ellipsis and a tooltip; horizontal virtualization uses the same numeric widths.
|
|
270
|
-
|
|
271
|
-
Use `{ key: 'status', status: true }` for themed status tags, or `status: { S1B: { label: 'Review', color: 'danger' }, S1C: 'success' }`. Semantic colors and CSS colors are supported. Unknown codes stay neutral, zero/false stay valid, and explicit render functions win. Display changes never rewrite data or export policy. Measurement does not invoke render functions; give graphical/custom columns explicit widths. Data and column updates remeasure a bounded sample; all caches remain component-local.
|
|
272
|
-
|
|
273
|
-
Headers display their full text by default, independently of cell ellipsis. Initial layout, explicit or restored narrow widths, and interactive resizing share a minimum that includes the entire title and its sort/filter controls. The 360px measurement cap applies only to cell content; longer headers use internal horizontal scrolling. Custom header content should declare an appropriate minWidth.
|
|
274
|
-
|
|
275
|
-
Compact forms and searches use a 4px row gap and a 2px empty feedback reserve; validation messages grow naturally. Compact form dialogs use tighter padding and internal scrolling. Per-field entrance and layout-size animations have been removed.
|
|
276
|
-
|
|
277
|
-
The default adaptive layout distributes spare viewport space proportionally among automatic business columns; crowded tables keep their measured bases and scroll horizontally. Utility, explicit-width and manually resized columns retain their widths. Resolved numeric widths drive both the table and horizontal scroll range. Resizing changes only the target column, including after preferences are committed. Explicit native `table-layout` attributes or nonnumeric widths retain Naive UI layout semantics and its `scrollX` minimum.
|
package/dist/constants.d.cts
CHANGED
|
@@ -117,8 +117,8 @@ declare const __VLS_export: vue.DefineComponent<CronProps, CronExpose, {}, {}, {
|
|
|
117
117
|
"onValidation-change"?: ((result: CronValidation) => any) | undefined;
|
|
118
118
|
}>, {
|
|
119
119
|
disabled: boolean;
|
|
120
|
-
showPreview: boolean;
|
|
121
120
|
showTemplates: boolean;
|
|
121
|
+
showPreview: boolean;
|
|
122
122
|
showSecond: boolean;
|
|
123
123
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
124
124
|
declare const _default: typeof __VLS_export;
|
package/dist/constants.d.ts
CHANGED
|
@@ -117,8 +117,8 @@ declare const __VLS_export: vue.DefineComponent<CronProps, CronExpose, {}, {}, {
|
|
|
117
117
|
"onValidation-change"?: ((result: CronValidation) => any) | undefined;
|
|
118
118
|
}>, {
|
|
119
119
|
disabled: boolean;
|
|
120
|
-
showPreview: boolean;
|
|
121
120
|
showTemplates: boolean;
|
|
121
|
+
showPreview: boolean;
|
|
122
122
|
showSecond: boolean;
|
|
123
123
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
124
124
|
declare const _default: typeof __VLS_export;
|
package/dist/constants3.d.cts
CHANGED
|
@@ -231,8 +231,8 @@ interface NotificationCenterExpose {
|
|
|
231
231
|
type __VLS_Slots = NotificationCenterSlots;
|
|
232
232
|
declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, NotificationCenterExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
233
233
|
delete: (ids: string[]) => any;
|
|
234
|
-
read: (ids: string[]) => any;
|
|
235
234
|
itemClick: (message: NotificationMessage) => any;
|
|
235
|
+
read: (ids: string[]) => any;
|
|
236
236
|
allRead: (category?: NotificationCategory | undefined) => any;
|
|
237
237
|
unreadChange: (count: number) => any;
|
|
238
238
|
wsStatusChange: (status: WSConnectionStatus) => any;
|
|
@@ -241,8 +241,8 @@ declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, Notificat
|
|
|
241
241
|
viewAll: () => any;
|
|
242
242
|
}, string, vue.PublicProps, Readonly<NotificationCenterProps> & Readonly<{
|
|
243
243
|
onDelete?: ((ids: string[]) => any) | undefined;
|
|
244
|
-
onRead?: ((ids: string[]) => any) | undefined;
|
|
245
244
|
onItemClick?: ((message: NotificationMessage) => any) | undefined;
|
|
245
|
+
onRead?: ((ids: string[]) => any) | undefined;
|
|
246
246
|
onAllRead?: ((category?: NotificationCategory | undefined) => any) | undefined;
|
|
247
247
|
onUnreadChange?: ((count: number) => any) | undefined;
|
|
248
248
|
onWsStatusChange?: ((status: WSConnectionStatus) => any) | undefined;
|
|
@@ -250,12 +250,12 @@ declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, Notificat
|
|
|
250
250
|
onNavigate?: ((url: string) => any) | undefined;
|
|
251
251
|
onViewAll?: (() => any) | undefined;
|
|
252
252
|
}>, {
|
|
253
|
-
storageKey: string;
|
|
254
253
|
autoStart: boolean;
|
|
255
254
|
desktopNotification: boolean;
|
|
256
255
|
maxBadgeCount: number;
|
|
257
256
|
pollingInterval: number;
|
|
258
257
|
pageSize: number;
|
|
258
|
+
storageKey: string;
|
|
259
259
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
260
260
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
261
261
|
declare const _default: typeof __VLS_export;
|
package/dist/constants3.d.ts
CHANGED
|
@@ -231,8 +231,8 @@ interface NotificationCenterExpose {
|
|
|
231
231
|
type __VLS_Slots = NotificationCenterSlots;
|
|
232
232
|
declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, NotificationCenterExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
233
233
|
delete: (ids: string[]) => any;
|
|
234
|
-
read: (ids: string[]) => any;
|
|
235
234
|
itemClick: (message: NotificationMessage) => any;
|
|
235
|
+
read: (ids: string[]) => any;
|
|
236
236
|
allRead: (category?: NotificationCategory | undefined) => any;
|
|
237
237
|
unreadChange: (count: number) => any;
|
|
238
238
|
wsStatusChange: (status: WSConnectionStatus) => any;
|
|
@@ -241,8 +241,8 @@ declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, Notificat
|
|
|
241
241
|
viewAll: () => any;
|
|
242
242
|
}, string, vue.PublicProps, Readonly<NotificationCenterProps> & Readonly<{
|
|
243
243
|
onDelete?: ((ids: string[]) => any) | undefined;
|
|
244
|
-
onRead?: ((ids: string[]) => any) | undefined;
|
|
245
244
|
onItemClick?: ((message: NotificationMessage) => any) | undefined;
|
|
245
|
+
onRead?: ((ids: string[]) => any) | undefined;
|
|
246
246
|
onAllRead?: ((category?: NotificationCategory | undefined) => any) | undefined;
|
|
247
247
|
onUnreadChange?: ((count: number) => any) | undefined;
|
|
248
248
|
onWsStatusChange?: ((status: WSConnectionStatus) => any) | undefined;
|
|
@@ -250,12 +250,12 @@ declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, Notificat
|
|
|
250
250
|
onNavigate?: ((url: string) => any) | undefined;
|
|
251
251
|
onViewAll?: (() => any) | undefined;
|
|
252
252
|
}>, {
|
|
253
|
-
storageKey: string;
|
|
254
253
|
autoStart: boolean;
|
|
255
254
|
desktopNotification: boolean;
|
|
256
255
|
maxBadgeCount: number;
|
|
257
256
|
pollingInterval: number;
|
|
258
257
|
pageSize: number;
|
|
258
|
+
storageKey: string;
|
|
259
259
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
260
260
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
261
261
|
declare const _default: typeof __VLS_export;
|