@qin-ui/element-plus-pro 1.0.1 → 1.0.2

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.
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, provide, renderSlot } from "vue";
2
- import { g as getObject } from "../core/index-VQxpXgLX.js";
2
+ import { g as getObject } from "../core/index-DVXUNE-L.js";
3
3
  const INJECT_CONFIG = {
4
4
  "pro-table": {
5
5
  injectionKey: Symbol(""),
@@ -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({
@@ -34,33 +34,33 @@
34
34
  .pro-table_size-control_button[data-v-7af52d04] svg {
35
35
  transform: scale(1.3);
36
36
  }
37
- .pro-table_column-control_button[data-v-5a488a1c] {
37
+ .pro-table_column-control_button[data-v-ce445821] {
38
38
  display: flex;
39
39
  align-items: center;
40
40
  padding-right: 12px;
41
41
  padding-left: 12px;
42
42
  }
43
- .pro-table_column-control_button[data-v-5a488a1c] svg {
43
+ .pro-table_column-control_button[data-v-ce445821] svg {
44
44
  transform: scale(1.2, 1.4);
45
45
  }
46
- .pro-table_header[data-v-05f75d0b] {
46
+ .pro-table_header[data-v-890fd0f5] {
47
47
  display: flex;
48
48
  align-items: center;
49
49
  justify-content: flex-end;
50
50
  }
51
- .pro-table_header[data-v-05f75d0b]:empty {
51
+ .pro-table_header[data-v-890fd0f5]:empty {
52
52
  display: none;
53
53
  }
54
- .pro-table_header + .pro-table_header_content[data-v-05f75d0b] {
54
+ .pro-table_header + .pro-table_header_content[data-v-890fd0f5] {
55
55
  margin-top: 16px;
56
56
  }
57
- .pro-table_header_button-bar[data-v-05f75d0b] {
57
+ .pro-table_header_button-bar[data-v-890fd0f5] {
58
58
  flex: 1;
59
59
  }
60
- .pro-table_header_toolbar[data-v-05f75d0b] {
60
+ .pro-table_header_toolbar[data-v-890fd0f5] {
61
61
  margin-left: 12px;
62
62
  }
63
- .pro-table_pagination[data-v-05f75d0b] {
63
+ .pro-table_pagination[data-v-890fd0f5] {
64
64
  justify-content: flex-end;
65
65
  padding: 16px 0;
66
66
  }
@@ -1,7 +1,7 @@
1
1
  import { inject, computed, provide, toValue, defineComponent, useAttrs, useSlots, watchEffect, createBlock, openBlock, unref, mergeProps, withModifiers, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps, resolveComponent, createElementBlock, Fragment, renderList, createSlots, ref, createCommentVNode, resolveDynamicComponent, isVNode, createTextVNode, toDisplayString } from "vue";
2
2
  import { ElFormItem, ElCol, ElTable, ElPagination, useFormDisabled, ElForm, ElTransfer, ElTreeSelect, ElSlider, ElSwitch, ElRadioGroup, ElCheckboxGroup, ElTimeSelect, ElTimePicker, ElDatePicker, ElCascader, ElSelect, ElAutocomplete, ElInputNumber, ElInput, ElRow } from "element-plus";
3
3
  import { INJECT_CONFIG, getInjectConfig, INJECT_COMPONENTS } from "../component-provider/index.js";
4
- 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-VQxpXgLX.js";
4
+ 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-DVXUNE-L.js";
5
5
  import { i as isPlainObject, t as toPath, o as omit, c as cloneDeep } from "../vendor/utils/lodash-es-p6jau26B.js";
6
6
  const tableProps = () => ElTable.props || {};
7
7
  const paginationProps = () => ElPagination.props || {};
@@ -10,10 +10,16 @@ const formItemProps = () => ElFormItem.props || {};
10
10
  const DisabledContextKey = Symbol("pro-form-disabled-context");
11
11
  const useDisabledContext = () => {
12
12
  const formDisabled = useFormDisabled();
13
- return inject(DisabledContextKey, computed(() => !!formDisabled.value));
13
+ return inject(
14
+ DisabledContextKey,
15
+ computed(() => !!formDisabled.value)
16
+ );
14
17
  };
15
18
  const useDisabledContextProvider = (disabled) => {
16
- provide(DisabledContextKey, computed(() => !!toValue(disabled)));
19
+ provide(
20
+ DisabledContextKey,
21
+ computed(() => !!toValue(disabled))
22
+ );
17
23
  };
18
24
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
19
25
  ...{ name: "ProForm", inheritAttrs: false },
package/es/form/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { c, a, B, b, F, d, T, e, a as a2, h, f, u, g } from "./index-BvqMIOZ8.js";
2
- import { I, a as a3, e as e2 } from "../core/index-VQxpXgLX.js";
1
+ import { c, a, B, b, F, d, T, e, a as a2, h, f, u, g } from "./index-CWHWUZhj.js";
2
+ import { I, a as a3, e as e2 } from "../core/index-DVXUNE-L.js";
3
3
  export {
4
4
  c as BaseField,
5
5
  a as BaseForm,
package/es/index.d.ts CHANGED
@@ -106,8 +106,8 @@ declare type AdditionalMethods<FormItemInstance> = {
106
106
  };
107
107
 
108
108
  declare type AllowStringKey<T, Prefix extends string = ''> = {
109
- [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;
110
- }[keyof T];
109
+ [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}`;
110
+ } extends infer Obj ? Obj[keyof Obj] : never;
111
111
 
112
112
  /**
113
113
  * @type {Object} Base - 基础公共字段类型
@@ -911,8 +911,8 @@ declare type WithCommonBase<T = unknown> = T & Omit<FormItemProps, 'label'> & Co
911
911
  * @template D - 数据对象类型
912
912
  */
913
913
  declare type WithComponent<T extends abstract new (...args: any) => any, D extends Data = Data> = WithCommon<{
914
- slots?: ComponentSlots<T>;
915
- } & Omit<ComponentProps<T>, keyof VNodeProps>, D>;
914
+ slots?: Partial<ComponentSlots<T>>;
915
+ } & Partial<Omit<ComponentProps<T>, keyof VNodeProps>>, D>;
916
916
 
917
917
  declare type WithFields<D extends Data = Data> = WithRef<WithCommonBase & BaseWithFields<D>>;
918
918
 
package/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./element-plus-pro.css";
2
- import { a as _sfc_main } from "./form/index-BvqMIOZ8.js";
3
- import { c, B, b, F, d, T, e, h, f, u, g } from "./form/index-BvqMIOZ8.js";
4
- import { I, a, e as e2 } from "./core/index-VQxpXgLX.js";
2
+ import { a as _sfc_main } from "./form/index-CWHWUZhj.js";
3
+ import { c, B, b, F, d, T, e, h, f, u, g } from "./form/index-CWHWUZhj.js";
4
+ import { I, a, e as e2 } from "./core/index-DVXUNE-L.js";
5
5
  import BaseTable from "./table/index.js";
6
6
  import { useTable } from "./table/index.js";
7
7
  import _sfc_main$1 from "./component-provider/index.js";
package/es/table/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withKeys, withCtx, createVNode, renderSlot, resolveDynamicComponent, createTextVNode, createCommentVNode, Fragment, toDisplayString, normalizeStyle, useModel, renderList, withModifiers, mergeModels, inject, useAttrs, useSlots, onMounted, resolveDirective, normalizeClass, withDirectives, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
2
2
  import { ElSpace, ElButton, ElDropdown, ElDropdownMenu, ElDropdownItem, ElCheckbox, ElTableColumn, ElTable, ElPagination } from "element-plus";
3
- import { _ as _export_sfc, a as _sfc_main$a, t as tableProps, p as paginationProps, b as _sfc_main$b } from "../form/index-BvqMIOZ8.js";
3
+ import { _ as _export_sfc, a as _sfc_main$a, t as tableProps, p as paginationProps, b as _sfc_main$b } from "../form/index-CWHWUZhj.js";
4
4
  import { INJECT_CONFIG } from "../component-provider/index.js";
5
- import { c as camelizeProperties, g as getObject, f as useTable$1 } from "../core/index-VQxpXgLX.js";
5
+ import { c as camelizeProperties, g as getObject, f as useTable$1 } from "../core/index-DVXUNE-L.js";
6
6
  import { g as get, t as toPath, p as pick } from "../vendor/utils/lodash-es-p6jau26B.js";
7
7
  const _sfc_main$9 = {};
8
8
  const _hoisted_1$5 = {
@@ -359,12 +359,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
359
359
  set(val) {
360
360
  checkedColumnsOptions.value.forEach((item) => {
361
361
  var _a;
362
- (_a = __props.table) == null ? void 0 : _a.setColumn(
363
- item.value,
364
- {
365
- hidden: !val.includes(item.value)
366
- }
367
- );
362
+ (_a = __props.table) == null ? void 0 : _a.setColumn(item.value, {
363
+ hidden: !val.includes(item.value)
364
+ });
368
365
  });
369
366
  }
370
367
  });
@@ -376,7 +373,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
376
373
  };
377
374
  const toggleColumnsItem = (val) => {
378
375
  if (checkedColumnKeys.value.includes(val)) {
379
- checkedColumnKeys.value = checkedColumnKeys.value.filter((item) => item !== val);
376
+ checkedColumnKeys.value = checkedColumnKeys.value.filter(
377
+ (item) => item !== val
378
+ );
380
379
  } else {
381
380
  checkedColumnKeys.value = [...checkedColumnKeys.value, val];
382
381
  }
@@ -457,7 +456,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
457
456
  };
458
457
  }
459
458
  });
460
- const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-5a488a1c"]]);
459
+ const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ce445821"]]);
461
460
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
462
461
  ...{ name: "TableColumnRenderer" },
463
462
  __name: "TableColumnRenderer",
@@ -832,7 +831,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
832
831
  };
833
832
  }
834
833
  });
835
- const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-05f75d0b"]]);
834
+ const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-890fd0f5"]]);
836
835
  const useTable = (params = {}) => {
837
836
  const { data, ...rest } = params;
838
837
  const coreTable = useTable$1({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/element-plus-pro",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "基于 element-plus 的二次封装组件",
5
5
  "type": "module",
6
6
  "module": "es/index.js",