@shaonq/vue 1.1.17 → 1.1.18

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.
Files changed (3) hide show
  1. package/lib/index.d.ts +92 -94
  2. package/lib/index.js +1637 -1637
  3. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -38,6 +38,8 @@ declare type __VLS_NonUndefinedable_4<T> = T extends undefined ? never : T;
38
38
 
39
39
  declare type __VLS_NonUndefinedable_5<T> = T extends undefined ? never : T;
40
40
 
41
+ declare type __VLS_NonUndefinedable_6<T> = T extends undefined ? never : T;
42
+
41
43
  declare type __VLS_Prettify<T> = {
42
44
  [K in keyof T]: T[K];
43
45
  } & {};
@@ -58,6 +60,10 @@ declare type __VLS_Prettify_5<T> = {
58
60
  [K in keyof T]: T[K];
59
61
  } & {};
60
62
 
63
+ declare type __VLS_Prettify_6<T> = {
64
+ [K in keyof T]: T[K];
65
+ } & {};
66
+
61
67
  declare type __VLS_TypePropsToRuntimeProps<T> = {
62
68
  [K in keyof T]-?: {} extends Pick<T, K> ? {
63
69
  type: PropType<__VLS_NonUndefinedable<T[K]>>;
@@ -103,6 +109,15 @@ declare type __VLS_TypePropsToRuntimeProps_5<T> = {
103
109
  };
104
110
  };
105
111
 
112
+ declare type __VLS_TypePropsToRuntimeProps_6<T> = {
113
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
114
+ type: PropType<__VLS_NonUndefinedable_6<T[K]>>;
115
+ } : {
116
+ type: PropType<T[K]>;
117
+ required: true;
118
+ };
119
+ };
120
+
106
121
  declare type __VLS_WithDefaults<P, D> = {
107
122
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
108
123
  default: D[K];
@@ -133,6 +148,12 @@ declare type __VLS_WithDefaults_5<P, D> = {
133
148
  }> : P[K];
134
149
  };
135
150
 
151
+ declare type __VLS_WithDefaults_6<P, D> = {
152
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_6<P[K] & {
153
+ default: D[K];
154
+ }> : P[K];
155
+ };
156
+
136
157
  declare type __VLS_WithTemplateSlots<T, S> = T & {
137
158
  new (): {
138
159
  $slots: S;
@@ -736,7 +757,7 @@ export declare const OrcDesignPrint: DefineComponent<{}, {
736
757
  getHtml(): any;
737
758
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
738
759
 
739
- export declare const OrcForm: __VLS_WithTemplateSlots_5< DefineComponent<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<{
760
+ export declare const OrcForm: __VLS_WithTemplateSlots_5< DefineComponent<ExtractPropTypes<__VLS_WithDefaults_4<__VLS_TypePropsToRuntimeProps_4<{
740
761
  config?: OrcFormItem[] | undefined;
741
762
  labelWidth?: string | undefined;
742
763
  labelAlign?: "left" | "right" | undefined;
@@ -771,7 +792,7 @@ export declare const OrcForm: __VLS_WithTemplateSlots_5< DefineComponent<Extract
771
792
  error: (...args: any[]) => void;
772
793
  submit: (...args: any[]) => void;
773
794
  "update:modelValue": (...args: any[]) => void;
774
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<{
795
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_4<__VLS_TypePropsToRuntimeProps_4<{
775
796
  config?: OrcFormItem[] | undefined;
776
797
  labelWidth?: string | undefined;
777
798
  labelAlign?: "left" | "right" | undefined;
@@ -804,9 +825,9 @@ export declare const OrcForm: __VLS_WithTemplateSlots_5< DefineComponent<Extract
804
825
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
805
826
  }>, {
806
827
  grid: Record<string, any>;
828
+ modelValue: Record<string, any>;
807
829
  loading: boolean;
808
830
  disabled: boolean;
809
- modelValue: Record<string, any>;
810
831
  span: number;
811
832
  config: OrcFormItem[];
812
833
  labelWidth: string;
@@ -831,7 +852,7 @@ export declare const OrcForm: __VLS_WithTemplateSlots_5< DefineComponent<Extract
831
852
  }): any;
832
853
  }>;
833
854
 
834
- export declare const OrcFormButton: __VLS_WithTemplateSlots_6< DefineComponent<ExtractPropTypes<__VLS_WithDefaults_4<__VLS_TypePropsToRuntimeProps_4<Props_2>, {
855
+ export declare const OrcFormButton: __VLS_WithTemplateSlots_6< DefineComponent<ExtractPropTypes<__VLS_WithDefaults_5<__VLS_TypePropsToRuntimeProps_5<Props_3>, {
835
856
  title: string;
836
857
  modelValue: undefined;
837
858
  gutter: number;
@@ -840,7 +861,7 @@ export declare const OrcFormButton: __VLS_WithTemplateSlots_6< DefineComponent<E
840
861
  "update:modelValue": (data: RecordAny) => void;
841
862
  submit: (data: OrcFormSubmit) => void;
842
863
  error: (data: any) => void;
843
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_4<__VLS_TypePropsToRuntimeProps_4<Props_2>, {
864
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_5<__VLS_TypePropsToRuntimeProps_5<Props_3>, {
844
865
  title: string;
845
866
  modelValue: undefined;
846
867
  gutter: number;
@@ -851,8 +872,8 @@ export declare const OrcFormButton: __VLS_WithTemplateSlots_6< DefineComponent<E
851
872
  "onUpdate:modelValue"?: ((data: RecordAny) => any) | undefined;
852
873
  }>, {
853
874
  title: string;
854
- size: "medium" | "small" | "mini" | "large";
855
875
  modelValue: RecordAny;
876
+ size: "medium" | "small" | "mini" | "large";
856
877
  gutter: number;
857
878
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
858
879
  icon?(_: {}): any;
@@ -1019,7 +1040,7 @@ export declare const OrcHiddenView: __VLS_WithTemplateSlots_2< DefineComponent<E
1019
1040
  default?(_: {}): any;
1020
1041
  }>;
1021
1042
 
1022
- export declare const OrcHiPrint: __VLS_WithTemplateSlots_8< DefineComponent<ExtractPropTypes<__VLS_WithDefaults_5<__VLS_TypePropsToRuntimeProps_5<Props_3>, {
1043
+ export declare const OrcHiPrint: __VLS_WithTemplateSlots_8< DefineComponent<ExtractPropTypes<__VLS_WithDefaults_6<__VLS_TypePropsToRuntimeProps_6<Props_4>, {
1023
1044
  template: undefined;
1024
1045
  fields: undefined;
1025
1046
  printData: undefined;
@@ -1106,7 +1127,7 @@ export declare const OrcHiPrint: __VLS_WithTemplateSlots_8< DefineComponent<Extr
1106
1127
  } | undefined>;
1107
1128
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1108
1129
  onSave: (...args: any[]) => void;
1109
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_5<__VLS_TypePropsToRuntimeProps_5<Props_3>, {
1130
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_6<__VLS_TypePropsToRuntimeProps_6<Props_4>, {
1110
1131
  template: undefined;
1111
1132
  fields: undefined;
1112
1133
  printData: undefined;
@@ -1343,9 +1364,9 @@ export declare const OrcSearch: __VLS_WithTemplateSlots_4< DefineComponent<Extra
1343
1364
  "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
1344
1365
  onOnSearch?: ((...args: any[]) => any) | undefined;
1345
1366
  }>, {
1367
+ modelValue: Record<string, any>;
1346
1368
  loading: boolean;
1347
1369
  size: string;
1348
- modelValue: Record<string, any>;
1349
1370
  labelWidth: string;
1350
1371
  options: OrcSearchItem[];
1351
1372
  readonly: boolean;
@@ -1388,45 +1409,15 @@ export declare interface OrcSearchItem extends RecordAny {
1388
1409
  rules?: RecordAny | RecordAny[];
1389
1410
  }
1390
1411
 
1391
- export declare const OrcTable: __VLS_WithTemplateSlots_3< DefineComponent<ExtractPropTypes<{
1392
- title: StringConstructor;
1393
- /** auto(铺满父容器,必须确保存在父节点且不允许存在相邻元素 ,), %, px */
1394
- height: (StringConstructor | NumberConstructor)[];
1395
- /** 隐藏工具栏 */
1396
- hideToolbar: BooleanConstructor;
1397
- hideSetting: BooleanConstructor;
1398
- hidePagination: BooleanConstructor;
1399
- isHover: {
1400
- type: BooleanConstructor;
1401
- default: boolean;
1402
- };
1403
- size: {
1404
- type: PropType<"medium" | "small" | "mini">;
1405
- default: string;
1406
- };
1407
- /** 用户选择列表 */
1408
- selectedKeys: {
1409
- type: ArrayConstructor;
1410
- default: () => never[];
1411
- };
1412
- /** 与 loadData 行为一致 */
1413
- data: {
1414
- type: PropType<RecordAny_2[]>;
1415
- default: () => never[];
1416
- };
1417
- /** 配置文件 */
1418
- option: {
1419
- type: PropType<OrcTableOption>;
1420
- default: () => {
1421
- columns: never[];
1422
- };
1412
+ export declare const OrcTable: __VLS_WithTemplateSlots_3< DefineComponent<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_2>, {
1413
+ isHover: boolean;
1414
+ size: string;
1415
+ selectedKeys: () => never[];
1416
+ data: () => never[];
1417
+ option: () => {
1418
+ columns: never[];
1423
1419
  };
1424
- /** 用户保存数据钩子函数 */
1425
- hook: PropType<{
1426
- getColumn: () => Promise<[boolean, RecordAny_2[]]>;
1427
- setColumn: (list: RecordAny_2[]) => void;
1428
- }>;
1429
- }>, {
1420
+ }>>, {
1430
1421
  getRowKey(): string;
1431
1422
  getTableData(): RecordAny_2[];
1432
1423
  getSelection(): RecordAny_2[];
@@ -1455,45 +1446,15 @@ export declare const OrcTable: __VLS_WithTemplateSlots_3< DefineComponent<Extrac
1455
1446
  onReset: (...args: any[]) => void;
1456
1447
  confirm: (...args: any[]) => void;
1457
1448
  cellDblclick: (...args: any[]) => void;
1458
- }, string, PublicProps, Readonly< ExtractPropTypes<{
1459
- title: StringConstructor;
1460
- /** auto(铺满父容器,必须确保存在父节点且不允许存在相邻元素 ,), %, px */
1461
- height: (StringConstructor | NumberConstructor)[];
1462
- /** 隐藏工具栏 */
1463
- hideToolbar: BooleanConstructor;
1464
- hideSetting: BooleanConstructor;
1465
- hidePagination: BooleanConstructor;
1466
- isHover: {
1467
- type: BooleanConstructor;
1468
- default: boolean;
1469
- };
1470
- size: {
1471
- type: PropType<"medium" | "small" | "mini">;
1472
- default: string;
1473
- };
1474
- /** 用户选择列表 */
1475
- selectedKeys: {
1476
- type: ArrayConstructor;
1477
- default: () => never[];
1478
- };
1479
- /** 与 loadData 行为一致 */
1480
- data: {
1481
- type: PropType<RecordAny_2[]>;
1482
- default: () => never[];
1483
- };
1484
- /** 配置文件 */
1485
- option: {
1486
- type: PropType<OrcTableOption>;
1487
- default: () => {
1488
- columns: never[];
1489
- };
1449
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_2>, {
1450
+ isHover: boolean;
1451
+ size: string;
1452
+ selectedKeys: () => never[];
1453
+ data: () => never[];
1454
+ option: () => {
1455
+ columns: never[];
1490
1456
  };
1491
- /** 用户保存数据钩子函数 */
1492
- hook: PropType<{
1493
- getColumn: () => Promise<[boolean, RecordAny_2[]]>;
1494
- setColumn: (list: RecordAny_2[]) => void;
1495
- }>;
1496
- }>> & Readonly<{
1457
+ }>>> & Readonly<{
1497
1458
  "onUpdate:selectedKeys"?: ((...args: any[]) => any) | undefined;
1498
1459
  onChange?: ((...args: any[]) => any) | undefined;
1499
1460
  onCellClick?: ((...args: any[]) => any) | undefined;
@@ -1504,11 +1465,8 @@ export declare const OrcTable: __VLS_WithTemplateSlots_3< DefineComponent<Extrac
1504
1465
  data: RecordAny_2[];
1505
1466
  option: OrcTableOption;
1506
1467
  size: "medium" | "small" | "mini";
1507
- hideToolbar: boolean;
1508
- hideSetting: boolean;
1509
- hidePagination: boolean;
1510
1468
  isHover: boolean;
1511
- selectedKeys: unknown[];
1469
+ selectedKeys: string[];
1512
1470
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
1513
1471
  default?(_: {}): any;
1514
1472
  tools?(_: {}): any;
@@ -1519,6 +1477,7 @@ export declare const OrcTable: __VLS_WithTemplateSlots_3< DefineComponent<Extrac
1519
1477
  rowIndex: number;
1520
1478
  columnIndex: number;
1521
1479
  value: any;
1480
+ modelValue: any;
1522
1481
  updateValue: (value: any) => void;
1523
1482
  formatValue: any;
1524
1483
  }): any;
@@ -1542,8 +1501,16 @@ declare interface OrcTableItem extends RecordAny_2 {
1542
1501
  width?: number;
1543
1502
  sort?: boolean;
1544
1503
  /** 开启编辑 */
1545
- cell?: boolean;
1546
- /** 影响性能 cell = true 有效 只显示编辑内容 */
1504
+ cell?: boolean | Component;
1505
+ /** @example
1506
+ * <a-badge status="normal" text="Normal" />
1507
+ * status: normal|processing|success|warning|danger
1508
+ */
1509
+ cellAttr?: {
1510
+ [key: string]: (v1: Record<'record' | 'dataIndex' | 'rowIndex' | 'columnIndex' | 'value' | 'modelValue' | 'updateValue' | 'formatValue', unknown>) => unknown;
1511
+ } | {
1512
+ [key: string]: unknown;
1513
+ };
1547
1514
  div?: boolean;
1548
1515
  /** 没内容时候得提示 */
1549
1516
  placeholder?: string;
@@ -1556,7 +1523,6 @@ declare interface OrcTableItem extends RecordAny_2 {
1556
1523
  style?: CssType | ((record: RecordAny_2) => CssType);
1557
1524
  /** 同 :title-prefix "{ content: '必填', icon: 'vxe-cell--required-icon' }" */
1558
1525
  help?: VxeColumnPropTypes.TitlePrefix;
1559
- columnProps?: any;
1560
1526
  }
1561
1527
 
1562
1528
  /**
@@ -1655,7 +1621,39 @@ declare interface Props {
1655
1621
  useErrData?: <T = Record<string, any>>(config: Record<string, any>) => Promise<[boolean, T]>;
1656
1622
  }
1657
1623
 
1658
- declare interface Props_2 {
1624
+ declare type Props_2 = {
1625
+ /** 表格标题 */
1626
+ title?: string;
1627
+ /** 高 */
1628
+ height?: number | string;
1629
+ /** 是否隐藏工具栏 */
1630
+ hideToolbar?: boolean;
1631
+ /** 是否隐藏设置按钮 */
1632
+ hideSetting?: boolean;
1633
+ /** 是否隐藏分页 */
1634
+ hidePagination?: boolean;
1635
+ /** 是否启用悬停效果,默认值为 true */
1636
+ isHover?: boolean;
1637
+ /** 表格尺寸,可选值为 'medium' | 'small' | 'mini',默认值为 'mini' */
1638
+ size?: 'medium' | 'small' | 'mini';
1639
+ /** 用户选择的列表,默认值为空数组 */
1640
+ selectedKeys?: string[];
1641
+ /** 数据源,默认值为空数组 */
1642
+ data?: RecordAny_2[];
1643
+ /** 配置文件,默认值为 { columns: [] } */
1644
+ option?: OrcTableOption;
1645
+ /**
1646
+ * 用户保存数据钩子函数
1647
+ * - getColumn: 异步获取列配置,返回一个包含布尔值和列数据的元组
1648
+ * - setColumn: 设置列配置
1649
+ */
1650
+ hook?: {
1651
+ getColumn: () => Promise<[boolean, RecordAny_2[]]>;
1652
+ setColumn: (list: RecordAny_2[]) => void;
1653
+ };
1654
+ };
1655
+
1656
+ declare interface Props_3 {
1659
1657
  isView?: boolean;
1660
1658
  disabled?: boolean;
1661
1659
  title?: string;
@@ -1669,7 +1667,7 @@ declare interface Props_2 {
1669
1667
  modalAttrs?: ModalInstance['$props'];
1670
1668
  }
1671
1669
 
1672
- declare type Props_3 = {
1670
+ declare type Props_4 = {
1673
1671
  /** 更新模板 hiprintTemplate.update */
1674
1672
  template?: Record<string, any>;
1675
1673
  /** 更新数据源 hiprintTemplate.setFields */