cc1-form 1.2.5 → 1.2.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.
@@ -147,6 +147,8 @@ export interface CurdConfig<T = any> {
147
147
  * 表格配置 - 更多配置:https://element-plus.org/zh-CN/component/table#table-%E5%B1%9E%E6%80%A7
148
148
  */
149
149
  table?: Partial<{
150
+ /** 是否表格编辑模式 - 直接对table数据进行操作 不触发api 默认为false */
151
+ editMode: boolean;
150
152
  /**
151
153
  * 行键 默认_id
152
154
  */
@@ -228,6 +230,10 @@ export interface CurdConfig<T = any> {
228
230
  * 是否显示搜索 默认显示
229
231
  */
230
232
  search: boolean;
233
+ /**
234
+ * 是否显示收起展开所有列控制 默认不显示
235
+ */
236
+ expandColumn: boolean;
231
237
  /**
232
238
  * 是否显示重置 默认显示
233
239
  */
@@ -406,6 +412,10 @@ export interface CurdConfigColumn<T = any> {
406
412
  * 是否禁止操作
407
413
  */
408
414
  disabled?: Partial<{
415
+ /**
416
+ * 是否表格编辑模式下禁用-默认不限制
417
+ */
418
+ table: boolean;
409
419
  /**
410
420
  * 是否新增禁用-默认不限制
411
421
  */
@@ -537,8 +547,17 @@ export interface CurdConfigColumn<T = any> {
537
547
  */
538
548
  color?: string;
539
549
  };
540
- /** 气泡提示内容,配置后显示问号提示 */
541
- tooltip: string;
550
+ /** 表头配置 */
551
+ header: Partial<{
552
+ /** 气泡提示内容,配置后显示问号提示 */
553
+ tooltip: string;
554
+ /** 主分组值 - 用于控制表头是否显示加减号 */
555
+ group: boolean;
556
+ /** 被控制显示的分组键值 - 用于主分组值修改时是否显示 */
557
+ groupKey: keyof T;
558
+ /** 是否显示 - 默认显示,如果有分组时会根据主分组值修改时是否显示 */
559
+ show: boolean;
560
+ }>;
542
561
  }>;
543
562
  /**
544
563
  * 验证规则
@@ -644,6 +663,10 @@ export type CurdOptions<T = any> = {
644
663
  */
645
664
  input?: Partial<{
646
665
  [key: string]: any;
666
+ /**
667
+ * 前缀内容
668
+ */
669
+ prepend: string | ((item: T) => string);
647
670
  /**
648
671
  * 事件 文档:https://element-plus.org/zh-CN/component/input#events
649
672
  */
@@ -1,6 +1,8 @@
1
1
  import { curdConf } from '.';
2
2
  import type { CurdConfig, CurdConfigColumn } from './indexType';
3
3
  import questionFilled from './icon/questionFilled.vue';
4
+ import CirclePlusFilled from './icon/CirclePlusFilled.vue';
5
+ import RemoveFilled from './icon/RemoveFilled.vue';
4
6
  import { ElInput, ElOption, ElSelect, ElSwitch, ElTableColumn } from 'element-plus';
5
7
  import TSys from '../../utils/TSys';
6
8
  import TForm from '../../utils/TForm';
@@ -14,19 +16,31 @@ declare const self: any;
14
16
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
15
17
  declare var __VLS_6: string, __VLS_7: {
16
18
  item: CurdConfigColumn<any>;
17
- }, __VLS_21: string | number, __VLS_22: any, __VLS_41: string, __VLS_42: {
19
+ }, __VLS_27: string | number, __VLS_28: any, __VLS_31: string, __VLS_32: {
20
+ row: any;
21
+ item: CurdConfigColumn<any>;
22
+ }, __VLS_51: string, __VLS_52: {
23
+ row: any;
24
+ item: CurdConfigColumn<any>;
25
+ }, __VLS_71: string, __VLS_72: {
18
26
  row: any;
19
27
  item: CurdConfigColumn<any>;
20
28
  };
21
29
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
22
30
  [K in NonNullable<typeof __VLS_6>]?: (props: typeof __VLS_7) => any;
23
31
  } & {
24
- [K in NonNullable<typeof __VLS_21>]?: (props: typeof __VLS_22) => any;
32
+ [K in NonNullable<typeof __VLS_27>]?: (props: typeof __VLS_28) => any;
33
+ } & {
34
+ [K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any;
35
+ } & {
36
+ [K in NonNullable<typeof __VLS_51>]?: (props: typeof __VLS_52) => any;
25
37
  } & {
26
- [K in NonNullable<typeof __VLS_41>]?: (props: typeof __VLS_42) => any;
38
+ [K in NonNullable<typeof __VLS_71>]?: (props: typeof __VLS_72) => any;
27
39
  }>;
28
40
  declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
29
41
  questionFilled: typeof questionFilled;
42
+ CirclePlusFilled: typeof CirclePlusFilled;
43
+ RemoveFilled: typeof RemoveFilled;
30
44
  ElInput: typeof ElInput;
31
45
  ElOption: typeof ElOption;
32
46
  ElSelect: typeof ElSelect;
@@ -73,6 +73,10 @@ export default class TFormConfig {
73
73
  };
74
74
  /** 工具栏配置 */
75
75
  tools: {
76
+ /**
77
+ * 是否显示收起展开所有列控制 默认不显示
78
+ */
79
+ expandColumn: boolean;
76
80
  /**
77
81
  * 是否显示刷新-默认显示
78
82
  */
@@ -32,6 +32,8 @@ declare const curdI18n: {
32
32
  switchOff: string;
33
33
  confirmModify: string;
34
34
  confirmSwitchMessage: string;
35
+ mergeColumn: string;
36
+ expandColumn: string;
35
37
  };
36
38
  /**
37
39
  * 国际化管理,所有 TCurd 组件内部的文案均通过此类获取
@@ -107,6 +109,8 @@ export default class TFormI18n {
107
109
  switchOff: string;
108
110
  confirmModify: string;
109
111
  confirmSwitchMessage: string;
112
+ mergeColumn: string;
113
+ expandColumn: string;
110
114
  };
111
115
  }
112
116
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-form",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "我来助你-表单组件库",
5
5
  "repository": {
6
6
  "type": "git",