@robot-admin/naive-ui-components 0.17.1 → 0.17.3
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 +18 -0
- package/dist/C_AntV.css +105 -105
- package/dist/C_AntV2.cjs +3 -3
- package/dist/C_AntV2.js +3 -3
- package/dist/C_AudioPlayer.css +53 -53
- package/dist/C_AudioPlayer2.cjs +1 -1
- package/dist/C_AudioPlayer2.js +1 -1
- package/dist/C_FilePreview.css +38 -38
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_FullCalendar.css +10 -11
- package/dist/C_FullCalendar2.cjs +1 -1
- package/dist/C_FullCalendar2.js +1 -1
- package/dist/C_Table.base.css +109 -109
- package/dist/C_Table.css +109 -109
- package/dist/C_Tabs.css +18 -18
- package/dist/C_TagsView.css +51 -51
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_VideoPlayer.css +20 -20
- package/dist/C_VideoPlayer2.cjs +2 -2
- package/dist/C_VideoPlayer2.js +3 -3
- package/dist/C_VtableGantt.css +44 -29
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/C_WorkFlow.css +111 -111
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants2.d.cts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants4.d.cts +6 -6
- package/dist/constants4.d.ts +6 -6
- package/dist/constants5.d.cts +11 -10
- package/dist/constants5.d.ts +11 -10
- package/dist/data.d.cts +13 -13
- package/dist/data.d.ts +13 -13
- package/dist/data2.cjs +1 -1
- package/dist/data2.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 +5 -5
- package/dist/index10.vue.d.ts +4 -4
- package/dist/index11.vue.d.cts +4 -4
- package/dist/index11.vue.d.ts +6 -6
- package/dist/index12.vue.d.cts +6 -6
- 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 +2 -2
- package/dist/index16.vue.d.cts +2 -2
- package/dist/index17.vue.d.ts +1 -1
- package/dist/index18.vue.d.cts +1 -1
- package/dist/index18.vue.d.ts +6 -6
- package/dist/index19.vue.d.cts +6 -6
- package/dist/index19.vue.d.ts +5 -5
- 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 +2 -2
- package/dist/index22.vue.d.ts +2 -2
- package/dist/index23.vue.d.cts +1 -1
- package/dist/index23.vue.d.ts +1 -1
- package/dist/index25.vue.d.cts +8 -3
- package/dist/index25.vue.d.ts +8 -3
- package/dist/index27.vue.d.cts +2 -2
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index28.vue.d.cts +4 -4
- package/dist/index28.vue.d.ts +4 -4
- package/dist/index3.vue.d.cts +2 -2
- package/dist/index3.vue.d.ts +2 -2
- package/dist/index4.vue.d.cts +5 -5
- package/dist/index5.vue.d.ts +2 -2
- package/dist/index6.vue.d.cts +2 -2
- package/dist/index6.vue.d.ts +4 -4
- package/dist/index7.vue.d.cts +4 -4
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index8.vue.d.cts +2 -2
- package/dist/index8.vue.d.ts +4 -4
- package/dist/index9.vue.d.cts +4 -4
- package/dist/index9.vue.d.ts +5 -5
- 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/style.css +559 -545
- package/dist/useCalendarEvents.d.cts +10 -0
- package/dist/useCalendarEvents.d.ts +10 -0
- package/dist/useCollapsePanel.d.cts +3 -3
- package/dist/useCollapsePanel.d.ts +3 -3
- package/dist/useCropperCore.d.cts +5 -5
- package/dist/useCropperCore.d.ts +5 -5
- package/dist/useDraggableLayout.d.cts +7 -7
- package/dist/useDraggableLayout.d.ts +7 -7
- package/dist/useDynamicFormState.d.cts +3 -3
- package/dist/useDynamicFormState.d.ts +3 -3
- package/dist/useEdgeInteraction.d.cts +4 -2
- package/dist/useEdgeInteraction.d.ts +4 -2
- package/dist/useFullscreen.d.cts +5 -3
- package/dist/useFullscreen.d.ts +5 -3
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSearchState.d.cts +5 -5
- package/dist/useSearchState.d.ts +5 -5
- package/dist/useSignatureHistory.d.cts +6 -6
- package/dist/useSignatureHistory.d.ts +6 -6
- package/dist/useSplitResize.d.cts +8 -8
- package/dist/useSplitResize.d.ts +8 -8
- package/dist/useTableQuery.cjs +3 -3
- package/dist/useTableQuery.d.cts +12 -12
- package/dist/useTableQuery.d.ts +12 -12
- package/dist/useTableQuery.js +3 -3
- package/dist/useTimeSelection.d.cts +4 -4
- package/dist/useTimeSelection.d.ts +4 -4
- package/dist/useWorkflowValidation.d.cts +9 -4
- package/dist/useWorkflowValidation.d.ts +9 -4
- package/dist/verification.d.cts +5 -5
- package/dist/verification.d.ts +5 -5
- package/docs/components.en.md +4 -0
- package/docs/components.md +4 -0
- package/docs/guides/table-density.md +6 -0
- package/package.json +1 -1
|
@@ -118,6 +118,8 @@ interface WorkflowProps {
|
|
|
118
118
|
departments?: Department[];
|
|
119
119
|
modelValue?: WorkflowData;
|
|
120
120
|
readonly?: boolean;
|
|
121
|
+
/** 是否允许循环连接,默认 true。无环审批流程应设为 false;执行规则由业务后端校验。 */
|
|
122
|
+
allowCycles?: boolean;
|
|
121
123
|
theme?: 'light' | 'dark';
|
|
122
124
|
}
|
|
123
125
|
interface WorkflowEmits {
|
|
@@ -237,25 +239,26 @@ declare const __VLS_export: vue.DefineComponent<WorkflowProps, {
|
|
|
237
239
|
conditionNodes: number;
|
|
238
240
|
}>;
|
|
239
241
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
240
|
-
change: (value: WorkflowData) => any;
|
|
241
242
|
"update:modelValue": (value: WorkflowData) => any;
|
|
243
|
+
change: (value: WorkflowData) => any;
|
|
242
244
|
save: (data: WorkflowData) => any;
|
|
243
|
-
"validate-error": (errors: ValidationError[]) => any;
|
|
244
245
|
"node-click": (node: WorkflowNode) => any;
|
|
245
246
|
"edge-click": (edge: WorkflowEdge) => any;
|
|
247
|
+
"validate-error": (errors: ValidationError[]) => any;
|
|
246
248
|
}, string, vue.PublicProps, Readonly<WorkflowProps> & Readonly<{
|
|
247
|
-
onChange?: ((value: WorkflowData) => any) | undefined;
|
|
248
249
|
"onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
|
|
250
|
+
onChange?: ((value: WorkflowData) => any) | undefined;
|
|
249
251
|
onSave?: ((data: WorkflowData) => any) | undefined;
|
|
250
|
-
"onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
|
|
251
252
|
"onNode-click"?: ((node: WorkflowNode) => any) | undefined;
|
|
252
253
|
"onEdge-click"?: ((edge: WorkflowEdge) => any) | undefined;
|
|
254
|
+
"onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
|
|
253
255
|
}>, {
|
|
254
256
|
theme: "light" | "dark";
|
|
255
257
|
readonly: boolean;
|
|
256
258
|
users: User[];
|
|
257
259
|
roles: Role[];
|
|
258
260
|
departments: Department[];
|
|
261
|
+
allowCycles: boolean;
|
|
259
262
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
260
263
|
declare const _default: typeof __VLS_export;
|
|
261
264
|
//#endregion
|
|
@@ -1019,6 +1022,8 @@ interface WorkflowValidationOptions {
|
|
|
1019
1022
|
onShowNodeConfig?: (node: WorkflowNode) => void;
|
|
1020
1023
|
/** 验证失败时的外部回调(通常用于 emit) */
|
|
1021
1024
|
onValidateError?: (errors: ValidationError[]) => void;
|
|
1025
|
+
/** 默认允许循环以兼容通用流程;审批业务可显式关闭。 */
|
|
1026
|
+
allowCycles?: boolean | (() => boolean);
|
|
1022
1027
|
}
|
|
1023
1028
|
/** 工作流验证 —— 封装流程校验逻辑、错误展示和节点定位 */
|
|
1024
1029
|
declare function useWorkflowValidation(nodes: Ref<WorkflowNode[]>, edges: Ref<WorkflowEdge[]>, vueFlowRef: Ref, options?: WorkflowValidationOptions): {
|
package/dist/verification.d.cts
CHANGED
|
@@ -77,23 +77,23 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
|
77
77
|
show: () => void;
|
|
78
78
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
79
79
|
change: (valid: boolean) => any;
|
|
80
|
-
success: (data: CaptchaSuccessPayload) => any;
|
|
81
|
-
"load-error": (error: unknown) => any;
|
|
82
80
|
reset: () => any;
|
|
81
|
+
success: (data: CaptchaSuccessPayload) => any;
|
|
83
82
|
fail: (error: string) => any;
|
|
84
83
|
"verify-error": (error: unknown) => any;
|
|
84
|
+
"load-error": (error: unknown) => any;
|
|
85
85
|
"visible-change": (visible: boolean) => any;
|
|
86
86
|
}, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
|
|
87
87
|
onChange?: ((valid: boolean) => any) | undefined;
|
|
88
|
-
onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
|
|
89
|
-
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
90
88
|
onReset?: (() => any) | undefined;
|
|
89
|
+
onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
|
|
91
90
|
onFail?: ((error: string) => any) | undefined;
|
|
92
91
|
"onVerify-error"?: ((error: unknown) => any) | undefined;
|
|
92
|
+
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
93
93
|
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
|
-
theme: "light" | "dark";
|
|
96
95
|
disabled: boolean;
|
|
96
|
+
theme: "light" | "dark";
|
|
97
97
|
provider: CaptchaProvider;
|
|
98
98
|
images: string[];
|
|
99
99
|
verificationTimeout: number;
|
package/dist/verification.d.ts
CHANGED
|
@@ -77,23 +77,23 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
|
77
77
|
show: () => void;
|
|
78
78
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
79
79
|
change: (valid: boolean) => any;
|
|
80
|
-
success: (data: CaptchaSuccessPayload) => any;
|
|
81
|
-
"load-error": (error: unknown) => any;
|
|
82
80
|
reset: () => any;
|
|
81
|
+
success: (data: CaptchaSuccessPayload) => any;
|
|
83
82
|
fail: (error: string) => any;
|
|
84
83
|
"verify-error": (error: unknown) => any;
|
|
84
|
+
"load-error": (error: unknown) => any;
|
|
85
85
|
"visible-change": (visible: boolean) => any;
|
|
86
86
|
}, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
|
|
87
87
|
onChange?: ((valid: boolean) => any) | undefined;
|
|
88
|
-
onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
|
|
89
|
-
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
90
88
|
onReset?: (() => any) | undefined;
|
|
89
|
+
onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
|
|
91
90
|
onFail?: ((error: string) => any) | undefined;
|
|
92
91
|
"onVerify-error"?: ((error: unknown) => any) | undefined;
|
|
92
|
+
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
93
93
|
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
|
-
theme: "light" | "dark";
|
|
96
95
|
disabled: boolean;
|
|
96
|
+
theme: "light" | "dark";
|
|
97
97
|
provider: CaptchaProvider;
|
|
98
98
|
images: string[];
|
|
99
99
|
verificationTimeout: number;
|
package/docs/components.en.md
CHANGED
|
@@ -99,6 +99,8 @@ Image/calendar behavior notes: `C_ImageCropper` flips the actual source and rese
|
|
|
99
99
|
|
|
100
100
|
`C_VtableGantt` merges presets and `options` without dropping untouched nested settings, replaces arrays as a whole, and ignores prototype-related keys. Its fullscreen button reflects the actual fullscreen state of that Gantt container.
|
|
101
101
|
|
|
102
|
+
If Gantt initialization or rebuilding fails, a released `ganttInstance` is cleared, an error and retry button appear, and an `error` event emits an `Error`. The component instance exposes `loading`, `error`, and asynchronous `reload()` for status feedback and retries. Wait for `ganttCreated` before operating on a replacement engine instance.
|
|
103
|
+
|
|
102
104
|
`C_AudioPlayer` enters the playing state and emits `play` only after the browser accepts `play()`. A rejected autoplay emits `error`, and an empty playlist cannot emit a false play event. Mute, playlist tracks, and seeking are keyboard operable.
|
|
103
105
|
|
|
104
106
|
`C_CollapsePanel` and `C_TagsView` validate persisted data before restoring it, so corrupt or outdated JSON cannot break initialization. Persisted tags restore only in-app paths, and special characters in a path are no longer interpolated into CSS selectors.
|
|
@@ -107,6 +109,8 @@ Image/calendar behavior notes: `C_ImageCropper` flips the actual source and rese
|
|
|
107
109
|
|
|
108
110
|
`C_WorkFlow` loads the supplied `modelValue` on first render and returns isolated snapshots from `getCurrentWorkflowData()`, `save`, `change`, and `node-click`, so callers cannot accidentally mutate its internal nodes. Editing conditions cannot change canvas data before Save, and incomplete conditions are not silently dropped. `readonly` blocks dragging, connecting, configuring, adding/removing, and saving while leaving preview, validation, and fit-to-view available. Node and condition IDs remain unique when created in the same tick.
|
|
109
111
|
|
|
112
|
+
Workflow validation requires unique, nonempty node and edge IDs, exactly one start node, existing edge endpoints, and directed reachability from the start to every node. `allowCycles` defaults to `true` for general workflows with loops. Use `:allow-cycles="false"` for acyclic approval flows; a detected cycle blocks saving and produces a structural error that can be located on the canvas. This option supports runtime changes. Passing validation confirms graph structure and node configuration; execution, permissions, and business rules remain the responsibility of the business backend.
|
|
113
|
+
|
|
110
114
|
Type verification covers TypeScript source, Vue SFC templates, and consumer examples built against the package. `C_Table` summary rendering expects an object keyed by column (`{ columnKey: { value, colSpan? } }`). `C_FormSearch` preserves existing numeric timestamp ranges and also supports formatted string ranges, binding each to the matching Naive UI value API.
|
|
111
115
|
|
|
112
116
|
Runtime component dependencies are declared by this package and resolved automatically. Every consumer needs:
|
package/docs/components.md
CHANGED
|
@@ -99,6 +99,8 @@
|
|
|
99
99
|
|
|
100
100
|
`C_VtableGantt` 合并预设与 `options` 时会保留未覆盖的嵌套配置、以新数组整体替换旧数组,并忽略原型相关键;全屏按钮状态仅反映该甘特图容器的实际全屏状态。
|
|
101
101
|
|
|
102
|
+
甘特图初始化或重建失败时,会清空已释放的 `ganttInstance`、显示错误及重试按钮,并触发 `error` 事件(参数为 `Error`)。组件实例公开 `loading`、`error` 和异步 `reload()`,使用侧可据此展示状态或主动重试;等待 `ganttCreated` 后再操作新的底层实例。
|
|
103
|
+
|
|
102
104
|
`C_AudioPlayer` 只在浏览器确认 `play()` 成功后进入播放状态并触发 `play`;自动播放被拒绝时会触发 `error`,空播放列表不会产生虚假的播放事件。静音、曲目和进度条均可用键盘操作。
|
|
103
105
|
|
|
104
106
|
`C_CollapsePanel` 与 `C_TagsView` 会校验本地持久化数据结构;损坏或旧格式数据会安全回退,不会阻断组件初始化。持久化标签仅恢复站内路径,特殊字符路径的定位不会拼接 CSS 选择器。
|
|
@@ -107,6 +109,8 @@
|
|
|
107
109
|
|
|
108
110
|
`C_WorkFlow` 会在首次渲染时加载传入的 `modelValue`,并在 `getCurrentWorkflowData()` / `save` / `change` / `node-click` 中输出隔离的数据快照,避免调用方意外修改内部节点。条件编辑弹窗在保存前不会修改画布数据,未填完整的条件不会被静默丢弃。`readonly` 禁止节点拖拽、连线、配置、增删与保存,但仍允许预览、验证和适应视图;节点与条件 ID 在同一时刻连续创建时保持唯一。
|
|
109
111
|
|
|
112
|
+
流程校验要求节点与连线标识唯一且非空、恰有一个开始节点、连线两端存在,且所有节点可从开始节点按连线方向到达。`allowCycles` 默认 `true`,兼容包含回路的通用流程;无环审批流程使用 `:allow-cycles="false"`,发现循环时阻止保存并定位结构错误。该选项可动态更新;校验结果仅代表图结构与节点配置合法,审批执行、权限和业务规则仍由业务后端负责。
|
|
113
|
+
|
|
110
114
|
类型验证同时覆盖 TypeScript 源码、Vue 单文件组件模板和发布后的使用侧示例。`C_Table` 合计行的 `summary.render` 应返回按列键组织的对象(`{ columnKey: { value, colSpan? } }`);`C_FormSearch` 的日期范围兼容原有数字时间戳数组,也支持格式化字符串数组,两种值会分别绑定 Naive UI 对应的值接口。
|
|
111
115
|
|
|
112
116
|
组件运行依赖已由本包声明,安装组件库时会自动解析。所有场景都需要:
|
|
@@ -85,3 +85,9 @@ const columns: TableColumn<Order>[] = [
|
|
|
85
85
|
若所有业务列都显式指定宽度,且总宽小于容器,保留原生表格的剩余空间分配规则;这时声明的 `width` 不保证等于最后测量的像素。通常让名称或描述列保持弹性,比给所有列设宽更合适。虚拟横向滚动仍需按 Naive UI 的契约提供具体列宽。
|
|
86
86
|
|
|
87
87
|
独立的列 `renderExpand` 直接转交原生表格;配置 `config.expand.onLoadData / renderContent` 后由组件的加载、失败重试和内容渲染器接管展开区。不要同时配置两套展开内容并依赖原生渲染器优先。自动横向滚动宽度按最终可见列计算,包含辅助列、动态选择列和操作列,不再额外追加固定留白。
|
|
88
|
+
|
|
89
|
+
## 行拖拽的组合范围
|
|
90
|
+
|
|
91
|
+
`config.rowDrag: true` 按稳定 `rowKey` 重排当前页的顶层行。树表的子行、详情展开内容及合计行不参与拖拽;移动父行时其子树数据整体保留,不改变父子关系。过滤、排序与分页后的行位置会映射回原始数据,其余页和隐藏行保持不变。使用侧继续接收 `update:data` 和 `row-move`,无须自行计算 DOM 下标。
|
|
92
|
+
|
|
93
|
+
纵向 `config.virtualScroll` 或横向 `virtualScrollX` 开启时,行拖拽自动停用,避免局部窗口错误重排完整数据;退出虚拟模式后恢复。拖拽期间数据被替换或身份变化,会丢弃该次排序。行键必须唯一、稳定,数字与字符串按各自类型区分。空数据后加载、错误视图恢复等表体重新出现的场景会自动连接拖拽实例。
|