@me-framework/me-ui-antdv-next 0.0.30 → 0.0.33
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/dist/card/index.js +2 -2
- package/dist/chunks/{modal-D4Tl-Qzk.js → modal-C2Lx5a9H.js} +1 -1
- package/dist/input-property/index.js +322 -294
- package/dist/input-property/index.vue.d.ts +10 -6
- package/dist/input-property/types.d.ts +23 -8
- package/dist/load-json/index.js +1 -1
- package/dist/me-ui-antdv-next.js +460 -432
- package/dist/me-ui-antdv-next.umd.cjs +3 -3
- package/dist/menu/index.vue.d.ts +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/modal/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { MeInputPropertyProps, MeInputPropertyValidation } from './types';
|
|
1
|
+
import { MeInputPropertyModel, MeInputPropertyProps, MeInputPropertyValidation } from './types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<MeInputPropertyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
-
change: (value:
|
|
4
|
-
"update:modelValue": (value:
|
|
3
|
+
change: (value: MeInputPropertyModel, validation?: MeInputPropertyValidation | undefined) => any;
|
|
4
|
+
"update:modelValue": (value: MeInputPropertyModel) => any;
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<MeInputPropertyProps> & Readonly<{
|
|
6
|
-
onChange?: ((value:
|
|
7
|
-
"onUpdate:modelValue"?: ((value:
|
|
6
|
+
onChange?: ((value: MeInputPropertyModel, validation?: MeInputPropertyValidation | undefined) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((value: MeInputPropertyModel) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
size: "small" | "middle" | "large";
|
|
10
10
|
disabled: boolean;
|
|
11
|
-
modelValue:
|
|
11
|
+
modelValue: MeInputPropertyModel;
|
|
12
|
+
keyField: string;
|
|
13
|
+
valueField: string;
|
|
12
14
|
draggable: boolean;
|
|
13
15
|
showType: boolean;
|
|
14
16
|
showRules: boolean;
|
|
@@ -16,6 +18,8 @@ declare const __VLS_export: import('vue').DefineComponent<MeInputPropertyProps,
|
|
|
16
18
|
keyPlaceholder: string;
|
|
17
19
|
valuePlaceholder: string;
|
|
18
20
|
emptyText: string;
|
|
21
|
+
keyColumnTitle: string;
|
|
22
|
+
valueColumnTitle: string;
|
|
19
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
24
|
declare const _default: typeof __VLS_export;
|
|
21
25
|
export default _default;
|
|
@@ -19,6 +19,8 @@ export declare const BOOLEAN_OPTIONS: ReadonlyArray<{
|
|
|
19
19
|
label: string;
|
|
20
20
|
value: boolean;
|
|
21
21
|
}>;
|
|
22
|
+
/** v-model 绑定的模型值:扁平 JSON 对象 或 数组(数组项为带 key/value 映射字段的对象) */
|
|
23
|
+
export type MeInputPropertyModel = Record<string, any> | Array<Record<string, any>>;
|
|
22
24
|
/** 内部行数据(一维属性项) */
|
|
23
25
|
export interface PropertyKV {
|
|
24
26
|
/** 行唯一 id(组件内部生成,用于定位编辑行,避免 key 变更导致表格重建) */
|
|
@@ -36,6 +38,11 @@ export interface PropertyKV {
|
|
|
36
38
|
value: any;
|
|
37
39
|
/** 该行校验规则(弹窗编辑后写入;未配置 → undefined) */
|
|
38
40
|
rules?: PropertyRuleSet;
|
|
41
|
+
/**
|
|
42
|
+
* 数组模式下原始数组项快照,同步输出时整块透传(key/value 映射字段会被当前值覆盖,
|
|
43
|
+
* 其余字段原样保留、字段顺序不变);对象模式下恒 undefined。
|
|
44
|
+
*/
|
|
45
|
+
raw?: Record<string, any>;
|
|
39
46
|
}
|
|
40
47
|
/**
|
|
41
48
|
* 属性校验规则集。
|
|
@@ -61,8 +68,12 @@ export interface PropertyRuleSet {
|
|
|
61
68
|
}
|
|
62
69
|
/** MeInputProperty Props */
|
|
63
70
|
export interface MeInputPropertyProps {
|
|
64
|
-
/** v-model 绑定的一维 JSON
|
|
65
|
-
modelValue?:
|
|
71
|
+
/** v-model 绑定的一维 JSON 对象,或数组。数组时自动切换数组模式:key 取 item[keyField]、value 取 item[valueField],其它字段保留透传 */
|
|
72
|
+
modelValue?: MeInputPropertyModel;
|
|
73
|
+
/** 数组模式下,数组项中作为「属性 key」的字段名(默认 'key';对象模式忽略) */
|
|
74
|
+
keyField?: string;
|
|
75
|
+
/** 数组模式下,数组项中作为「属性 value」的字段名(默认 'value';对象模式忽略) */
|
|
76
|
+
valueField?: string;
|
|
66
77
|
/** 是否禁用编辑(只读展示) */
|
|
67
78
|
disabled?: boolean;
|
|
68
79
|
/** 表格尺寸 */
|
|
@@ -71,9 +82,9 @@ export interface MeInputPropertyProps {
|
|
|
71
82
|
draggable?: boolean;
|
|
72
83
|
/** 是否显示类型列(string/int/float/boolean/date/time 下拉),默认 true;隐藏时类型保持推断结果 */
|
|
73
84
|
showType?: boolean;
|
|
74
|
-
/** 是否显示「校验」列(每行魔法图标弹窗编辑规则),默认 true
|
|
85
|
+
/** 是否显示「校验」列(每行魔法图标弹窗编辑规则),默认 true;**仅当 validate 开启时生效**(validate 关闭时不产生校验行为,整列隐藏),validate 开启时可再独立关闭 */
|
|
75
86
|
showRules?: boolean;
|
|
76
|
-
/** 是否启用校验,默认 false
|
|
87
|
+
/** 是否启用校验,默认 false:关闭时不校验(key 空/重复、value 违反规则均不标红)、change 校验报告为空,且「校验」列不显示;开启后按行内规则对 key 硬约束与 value 逐行校验、输出报告,并显示「校验」列(除非 showRules=false) */
|
|
77
88
|
validate?: boolean;
|
|
78
89
|
/** key 列占位符 */
|
|
79
90
|
keyPlaceholder?: string;
|
|
@@ -81,20 +92,24 @@ export interface MeInputPropertyProps {
|
|
|
81
92
|
valuePlaceholder?: string;
|
|
82
93
|
/** 空数据提示 */
|
|
83
94
|
emptyText?: string;
|
|
95
|
+
/** 属性列(key 列)标题,默认「属性」;用于业务化/本地化重命名列名 */
|
|
96
|
+
keyColumnTitle?: string;
|
|
97
|
+
/** 值列(value 列)标题,默认「值」;用于业务化/本地化重命名列名 */
|
|
98
|
+
valueColumnTitle?: string;
|
|
84
99
|
/** 外部注入的初始/持久化规则;键为属性 key(trim 后精确匹配)。外部重新赋值 modelValue 时,
|
|
85
100
|
* 会话内已有同 key 规则优先继承,新出现的 key 从这里取规则,消失的 key 规则丢弃 */
|
|
86
101
|
rules?: Record<string, PropertyRuleSet>;
|
|
87
102
|
}
|
|
88
103
|
/** MeInputProperty Events */
|
|
89
104
|
export interface MeInputPropertyEmits {
|
|
90
|
-
/** 更新 v-model
|
|
91
|
-
(e: 'update:modelValue', value:
|
|
105
|
+
/** 更新 v-model 绑定对象/数组 */
|
|
106
|
+
(e: 'update:modelValue', value: MeInputPropertyModel): void;
|
|
92
107
|
/**
|
|
93
108
|
* 数据变更(新增/删除/编辑/排序)
|
|
94
|
-
* @param value 合并后的一维 JSON 对象(同名 key 会被覆盖合并,空 key
|
|
109
|
+
* @param value 合并后的一维 JSON 对象(同名 key 会被覆盖合并,空 key 行被舍弃)或数组(行顺序保留,空 key 行被舍弃,额外字段透传)
|
|
95
110
|
* @param validation 行级校验报告(重复 key、是否含空 key 等对象输出无法体现的信息)
|
|
96
111
|
*/
|
|
97
|
-
(e: 'change', value:
|
|
112
|
+
(e: 'change', value: MeInputPropertyModel, validation?: MeInputPropertyValidation): void;
|
|
98
113
|
}
|
|
99
114
|
/** change 事件附带的校验报告(行级信息,对象输出无法体现的数据问题) */
|
|
100
115
|
export interface MeInputPropertyValidation {
|
package/dist/load-json/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../chunks/modal-
|
|
1
|
+
import { t as e } from "../chunks/modal-C2Lx5a9H.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, createTextVNode as r, createVNode as i, defineComponent as a, openBlock as o, ref as s, renderSlot as c, resolveComponent as l, unref as u, watch as d, withCtx as f } from "vue";
|
|
3
3
|
import { Download as p, Upload as m } from "@lucide/vue";
|
|
4
4
|
import { message as h } from "antdv-next";
|