@qin-ui/antd-vue-pro 2.1.7 → 2.1.9

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.
@@ -36,23 +36,23 @@
36
36
  .pro-table_column-control_button[data-v-d503f78a] svg {
37
37
  transform: scale(1.2, 1.4);
38
38
  }
39
- .pro-table_header[data-v-0e17ddec] {
39
+ .pro-table_header[data-v-8502b3b9] {
40
40
  display: flex;
41
41
  align-items: center;
42
42
  justify-content: flex-end;
43
43
  }
44
- .pro-table_header[data-v-0e17ddec]:empty {
44
+ .pro-table_header[data-v-8502b3b9]:empty {
45
45
  display: none;
46
46
  }
47
- .pro-table_header + .pro-table_header_content[data-v-0e17ddec] {
47
+ .pro-table_header + .pro-table_header_content[data-v-8502b3b9] {
48
48
  margin-top: 16px;
49
49
  }
50
- .pro-table_header_button-bar[data-v-0e17ddec] {
50
+ .pro-table_header_button-bar[data-v-8502b3b9] {
51
51
  flex: 1;
52
52
  }
53
- .pro-table_header_toolbar[data-v-0e17ddec] {
53
+ .pro-table_header_toolbar[data-v-8502b3b9] {
54
54
  margin-left: 12px;
55
55
  }
56
- .pro-table[data-v-0e17ddec] [class*='-pagination'] [class*='-pagination-total-text'] {
56
+ .pro-table[data-v-8502b3b9] [class*='-pagination'] [class*='-pagination-total-text'] {
57
57
  flex: 1;
58
58
  }
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, provide, renderSlot } from "vue";
2
- import { g as getObject } from "../core/index-BWMfavD1.js";
2
+ import { g as getObject } from "../core/index-C98RSrpN.js";
3
3
  const getPopupContainer = (triggerNode) => triggerNode.closest("form[class*='-form']");
4
4
  const INJECT_COMPONENTS = Symbol("INJECT_COMPONENTS");
5
5
  const INJECT_CONFIG = {
@@ -268,8 +268,6 @@ const useTable = (params) => {
268
268
  } else if (columnItem.dataIndex) {
269
269
  const dataIndexKey = Array.isArray(columnItem.dataIndex) ? columnItem.dataIndex.join(".") : columnItem.dataIndex;
270
270
  matched = dataIndexKey === key;
271
- } else {
272
- matched = key === i;
273
271
  }
274
272
  if (matched) {
275
273
  updater({
package/es/form/index.js CHANGED
@@ -6,8 +6,8 @@ import { colProps } from "ant-design-vue/es/grid/Col";
6
6
  import { formItemProps, useInjectFormItemContext } from "ant-design-vue/es/form";
7
7
  import { defineComponent, provide, inject, useSlots, watchEffect, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, renderSlot, computed, toValue, normalizeProps, guardReactiveProps, resolveComponent, createElementBlock, Fragment, renderList, createSlots, ref, useAttrs, createCommentVNode, resolveDynamicComponent, isVNode, createTextVNode, toDisplayString } from "vue";
8
8
  import { INJECT_CONFIG, getInjectConfig, INJECT_COMPONENTS } from "../component-provider/index.js";
9
- import { I as InjectionFormKey, c as camelizeProperties, a as InjectionPathKey, g as getObject, u as useForm$1, b as useFields$1, d as useFormRef$1 } from "../core/index-BWMfavD1.js";
10
- import { e } from "../core/index-BWMfavD1.js";
9
+ import { I as InjectionFormKey, c as camelizeProperties, a as InjectionPathKey, g as getObject, u as useForm$1, b as useFields$1, d as useFormRef$1 } from "../core/index-C98RSrpN.js";
10
+ import { e } from "../core/index-C98RSrpN.js";
11
11
  import { i as isPlainObject, t as toPath, o as omit, c as cloneDeep } from "../vendor/utils/lodash-es-p6jau26B.js";
12
12
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13
13
  ...{ name: "ProForm", inheritAttrs: false },
package/es/index.d.ts CHANGED
@@ -118,8 +118,8 @@ declare type AdditionalMethods<FormItemInstance> = {
118
118
  };
119
119
 
120
120
  declare type AllowStringKey<T, Prefix extends string = ''> = {
121
- [K in keyof T]: K extends string ? T[K] extends (infer U)[] ? `${Prefix}${K}` | (IsRecord<U> extends true ? AllowStringKey<U, `${Prefix}${K}[index].`> : never) : IsRecord<T[K]> extends true ? `${Prefix}${K}` | AllowStringKey<T[K], `${Prefix}${K}.`> : `${Prefix}${K}` : never;
122
- }[keyof T];
121
+ [K in keyof T as string extends K ? never : number extends K ? never : K extends string ? K : never]: T[K] extends (infer U)[] ? `${Prefix}${K & string}` | (IsRecord<U> extends true ? AllowStringKey<U, `${Prefix}${K & string}[index].`> : never) : IsRecord<T[K]> extends true ? `${Prefix}${K & string}` | AllowStringKey<T[K], `${Prefix}${K & string}.`> : `${Prefix}${K & string}`;
122
+ } extends infer Obj ? Obj[keyof Obj] : never;
123
123
 
124
124
  /**
125
125
  * @type {Object} Base - 基础公共字段类型
@@ -812,7 +812,7 @@ declare type SearchFormProps = {
812
812
  expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps>;
813
813
  } & /* @vue-ignore */ _FormProps & AllowedComponentProps;
814
814
 
815
- declare type SetColumn<D extends Data = Data, C extends BaseColumn<D> = BaseColumn<D>> = (key: Path<D>, column: C | ((pre: Readonly<C>) => C), options?: {
815
+ declare type SetColumn<T extends Data = Data, C extends BaseColumn<T> = BaseColumn<T>> = (key: Path<T>, column: C | ((pre: Readonly<C>) => C), options?: {
816
816
  updateType?: 'rewrite' | 'merge';
817
817
  } & UpdateColumnOptions) => void;
818
818
 
@@ -835,19 +835,19 @@ export declare type Slots = {
835
835
  };
836
836
 
837
837
  /**
838
- * 重新定义 Table 类型,将 Column 类型绑定为 antd-vue-pro 的 Column<D>
838
+ * 重新定义 Table 类型,将 Column 类型绑定为 antd-vue-pro 的 Column<T>
839
839
  */
840
- export declare type Table<D extends Data = Data, T extends object = ExtendWithAny<D>> = Table_2<D, T, Column<D>>;
840
+ export declare type Table<D extends Data = Data, T extends Data = ExtendWithAny<D>> = Table_2<D, T, Column<T>>;
841
841
 
842
- declare type Table_2<D extends Data = Data, T extends object = ExtendWithAny<D>, C extends BaseColumn<D> = BaseColumn<D>> = {
843
- columns: Ref<Columns_2<D, C>>;
842
+ declare type Table_2<D extends Data = Data, T extends Data = ExtendWithAny<D>, C extends BaseColumn<T> = BaseColumn<T>> = {
843
+ columns: Ref<Columns_2<T, C>>;
844
844
  dataSource: Ref<T[]>;
845
845
  pageParam: Reactive<PageParam>;
846
846
  searchForm: Form_2<D>;
847
- setColumn: SetColumn<D, C>;
848
- deleteColumn: (path: Path<D> | ColumnFindBy<D, C>, options?: UpdateColumnOptions) => void;
849
- appendColumn: (path: Path<D> | ColumnFindBy<D, C> | undefined, column: C | Columns_2<D, C>, options?: UpdateColumnOptions) => void;
850
- prependColumn: (path: Path<D> | ColumnFindBy<D, C> | undefined, column: C | Columns_2<D, C>, options?: UpdateColumnOptions) => void;
847
+ setColumn: SetColumn<T, C>;
848
+ deleteColumn: (path: Path<T> | ColumnFindBy<T, C>, options?: UpdateColumnOptions) => void;
849
+ appendColumn: (path: Path<T> | ColumnFindBy<T, C> | undefined, column: C | Columns_2<T, C>, options?: UpdateColumnOptions) => void;
850
+ prependColumn: (path: Path<T> | ColumnFindBy<T, C> | undefined, column: C | Columns_2<T, C>, options?: UpdateColumnOptions) => void;
851
851
  setPageParam: SetPageParam;
852
852
  resetQueryParams: () => void;
853
853
  };
@@ -947,10 +947,10 @@ declare const useFormRef_2: <F = any>() => {
947
947
 
948
948
  /**
949
949
  * 类型断言 re-export @qin-ui/core 的 useTable,
950
- * 将默认的 BaseColumn<D> 覆盖为本地的 Column<D>。
950
+ * 将默认的 BaseColumn<T> 覆盖为本地的 Column<T>。
951
951
  */
952
- export declare const useTable: <D extends Data = Data, T extends object = ExtendWithAny<D>>(params: {
953
- columns?: Columns<D>;
952
+ export declare const useTable: <D extends Data = Data, T extends Data = ExtendWithAny<D>>(params: {
953
+ columns?: Columns<T>;
954
954
  dataSource?: T[];
955
955
  pageParam?: PageParam;
956
956
  searchParam?: ExtendWithAny<DeepPartial<D>>;
@@ -979,8 +979,8 @@ declare type WithCommonBase<T = unknown> = T & Omit<FormItemProps, 'label'> & Co
979
979
  * @template D - 数据对象类型
980
980
  */
981
981
  declare type WithComponent<T extends abstract new (...args: any) => any, D extends Data = Data> = WithCommon<{
982
- slots?: ComponentSlots<T>;
983
- } & Omit<ComponentProps<T>, keyof VNodeProps>, D>;
982
+ slots?: Partial<ComponentSlots<T>>;
983
+ } & Partial<Omit<ComponentProps<T>, keyof VNodeProps>>, D>;
984
984
 
985
985
  declare type WithFields<D extends Data = Data> = WithRef<WithCommonBase & BaseWithFields<D>>;
986
986
 
package/es/index.js CHANGED
@@ -5,7 +5,7 @@ import BaseTable from "./table/index.js";
5
5
  import { useTable } from "./table/index.js";
6
6
  import _sfc_main$1 from "./component-provider/index.js";
7
7
  import { INJECT_COMPONENTS, INJECT_CONFIG, ensureInjectConfig, getInjectConfig } from "./component-provider/index.js";
8
- import { I, a, e } from "./core/index-BWMfavD1.js";
8
+ import { I, a, e } from "./core/index-C98RSrpN.js";
9
9
  const withInstall = (comp) => {
10
10
  comp.install = (app) => {
11
11
  app.component(comp.name, comp);
package/es/table/index.js CHANGED
@@ -3,7 +3,7 @@ import { INJECT_CONFIG } from "../component-provider/index.js";
3
3
  import _sfc_main$9, { ContainerFragment as _sfc_main$a } from "../form/index.js";
4
4
  import { Space, Button, theme, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
5
5
  import { p as pick } from "../vendor/utils/lodash-es-p6jau26B.js";
6
- import { g as getObject, c as camelizeProperties, f as useTable$1 } from "../core/index-BWMfavD1.js";
6
+ import { g as getObject, c as camelizeProperties, f as useTable$1 } from "../core/index-C98RSrpN.js";
7
7
  import { useConfigContextInject } from "ant-design-vue/es/config-provider/context";
8
8
  import { tableProps } from "ant-design-vue/es/table";
9
9
  const _export_sfc = (sfc, props) => {
@@ -690,7 +690,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
690
690
  };
691
691
  }
692
692
  });
693
- const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0e17ddec"]]);
693
+ const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8502b3b9"]]);
694
694
  const useTable = useTable$1;
695
695
  export {
696
696
  BaseTable as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "module": "es/index.js",
@@ -43,8 +43,7 @@
43
43
  "@types/lodash-es": "^4.17.12",
44
44
  "ant-design-vue": "^4",
45
45
  "lodash-es": "^4.17.21",
46
- "scroll-into-view-if-needed": "^3.1.0",
47
- "vue": "^3.5.18"
46
+ "scroll-into-view-if-needed": "^3.1.0"
48
47
  },
49
48
  "sideEffects": false,
50
49
  "publishConfig": {