@qin-ui/antd-vue-pro 1.0.30 → 1.0.32

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,6 +1,6 @@
1
1
  import { defineComponent, provide, renderSlot } from "vue";
2
2
  import "ant-design-vue";
3
- import { I as INJECT_COMPONENT_PROPS_KEYS } from "../form/index-1c203895.js";
3
+ import { I as INJECT_COMPONENT_PROPS_KEYS } from "../form/index-a8c9e629.js";
4
4
  import { PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS } from "../table/index.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "index",
@@ -15706,9 +15706,6 @@ const COMMAND = Symbol("command");
15706
15706
  const UPDATE_ACTIVE_PATH = Symbol(
15707
15707
  "setActivePath"
15708
15708
  );
15709
- const PARENT_DISABLED = Symbol(
15710
- "parentDisabled"
15711
- );
15712
15709
  const RULE_TYPE_MAP = /* @__PURE__ */ new Map([
15713
15710
  ["value", "字段赋值"],
15714
15711
  ["hidden", "字段隐藏/显示"],
@@ -15774,10 +15771,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15774
15771
  },
15775
15772
  __name: "index",
15776
15773
  props: {
15777
- grid: { type: [Boolean, Object] },
15774
+ grid: { type: [Boolean, Object], default: void 0 },
15778
15775
  fields: {},
15779
- path: {},
15780
- disabled: { type: Boolean }
15776
+ path: { default: void 0 },
15777
+ disabled: { type: Boolean, default: void 0 }
15781
15778
  },
15782
15779
  setup(__props) {
15783
15780
  const formItemPropKeys = Object.keys(formItemProps());
@@ -15790,7 +15787,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15790
15787
  "container"
15791
15788
  ];
15792
15789
  const props = __props;
15793
- provide(PARENT_DISABLED, props.disabled);
15790
+ useProviderDisabled(ref(props.disabled));
15794
15791
  const updateRefs = inject(UPDATE_REFS);
15795
15792
  const getPath = (fieldKey) => {
15796
15793
  if (props.path) {
@@ -16383,14 +16380,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
16383
16380
  const updateRefs = inject(UPDATE_REFS);
16384
16381
  const command = inject(COMMAND);
16385
16382
  const updateActivePath = inject(UPDATE_ACTIVE_PATH);
16386
- const parentDisabled = inject(PARENT_DISABLED);
16387
16383
  const { getInitProps } = useInitProps();
16388
16384
  const value = computed({
16389
16385
  get() {
16390
16386
  return get$1(formData == null ? void 0 : formData.value, props.path);
16391
16387
  },
16392
16388
  set(val) {
16393
- updateFormData == null ? void 0 : updateFormData(val, props.path);
16389
+ updateFormData == null ? void 0 : updateFormData(props.path, val);
16394
16390
  }
16395
16391
  });
16396
16392
  const forceUpdateKey = ref(0);
@@ -16425,7 +16421,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
16425
16421
  }
16426
16422
  return "value";
16427
16423
  });
16428
- const formDisabled = useInjectDisabled();
16424
+ const parentDisabled = useInjectDisabled();
16429
16425
  const mergedAttrs = computed(() => {
16430
16426
  const compType = componentType.value;
16431
16427
  const initProps = getInitProps({
@@ -16446,7 +16442,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
16446
16442
  ...attrs,
16447
16443
  ...methods,
16448
16444
  onFocus: void 0,
16449
- disabled: attrs.disabled ?? parentDisabled ?? formDisabled.value ?? initProps.disabled
16445
+ disabled: attrs.disabled ?? parentDisabled.value ?? initProps.disabled
16450
16446
  };
16451
16447
  });
16452
16448
  const is = computed(() => {
@@ -16501,7 +16497,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
16501
16497
  };
16502
16498
  }
16503
16499
  });
16504
- const index_vue_vue_type_style_index_0_scoped_301c3406_lang = "";
16500
+ const index_vue_vue_type_style_index_0_scoped_d0695884_lang = "";
16505
16501
  const _export_sfc = (sfc, props) => {
16506
16502
  const target = sfc.__vccOpts || sfc;
16507
16503
  for (const [key, val] of props) {
@@ -16509,7 +16505,7 @@ const _export_sfc = (sfc, props) => {
16509
16505
  }
16510
16506
  return target;
16511
16507
  };
16512
- const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-301c3406"]]);
16508
+ const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-d0695884"]]);
16513
16509
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
16514
16510
  ...{
16515
16511
  name: "ContainerFragment",
@@ -16588,24 +16584,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16588
16584
  return props.form ? (_a = props.form) == null ? void 0 : _a.formData.value : props.formData;
16589
16585
  }
16590
16586
  );
16591
- const updateFormData = (value, path) => {
16587
+ const updateFormData = (path, value) => {
16592
16588
  var _a;
16593
16589
  if (props.form) {
16594
16590
  (_a = props.form) == null ? void 0 : _a.setFormData(path, value);
16595
16591
  } else {
16596
- const keys2 = path.split(".");
16597
- const newFormData = keys2.reduce(
16598
- ({ preData, cb }, key, index2, arr) => {
16599
- if (index2 === arr.length - 1) {
16600
- return cb({ ...preData, [key]: value });
16601
- }
16602
- return {
16603
- preData: preData[key] || {},
16604
- cb: (data) => cb({ ...preData, [key]: data })
16605
- };
16606
- },
16607
- { preData: props.formData, cb: (data) => data }
16608
- );
16592
+ const newFormData = cloneDeep(_formData);
16593
+ set$1(newFormData, path, value);
16609
16594
  emit("update:formData", newFormData);
16610
16595
  }
16611
16596
  updateActivePath(path);
@@ -16641,8 +16626,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16641
16626
  default: withCtx(() => [
16642
16627
  createVNode(unref(_sfc_main$4), {
16643
16628
  fields: _fields.value,
16644
- grid: _ctx.grid
16645
- }, null, 8, ["fields", "grid"]),
16629
+ grid: _ctx.grid,
16630
+ disabled: _ctx.$attrs.disabled
16631
+ }, null, 8, ["fields", "grid", "disabled"]),
16646
16632
  renderSlot(_ctx.$slots, "default")
16647
16633
  ]),
16648
16634
  _: 3
@@ -16656,7 +16642,6 @@ export {
16656
16642
  COMPONENT_MAP as C,
16657
16643
  FORM_ITEM_SLOT_KEYS as F,
16658
16644
  INJECT_COMPONENT_PROPS_KEYS as I,
16659
- PARENT_DISABLED as P,
16660
16645
  RULE_TYPE_MAP as R,
16661
16646
  UPDATE_FORM_DATA as U,
16662
16647
  _sfc_main as _,
package/es/form/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { k, B, d, h, C, b, f, F, j, l, I, P, R, e, i, U, g, _, m, p, n, s, q, u, r, t } from "./index-1c203895.js";
1
+ import { k, B, d, h, C, b, f, F, j, l, I, R, e, i, U, g, _, m, p, n, s, q, u, r, t } from "./index-a8c9e629.js";
2
2
  import "vue";
3
3
  import "ant-design-vue";
4
4
  export {
@@ -13,7 +13,6 @@ export {
13
13
  j as FunctionRegexp,
14
14
  l as INIT_COMPONENT_PROPS_MAP,
15
15
  I as INJECT_COMPONENT_PROPS_KEYS,
16
- P as PARENT_DISABLED,
17
16
  R as RULE_TYPE_MAP,
18
17
  e as SlotComponent,
19
18
  i as UPDATE_ACTIVE_PATH,
package/es/index.d.ts CHANGED
@@ -101,6 +101,10 @@ declare type __VLS_Prettify_2<T> = {
101
101
  [K in keyof T]: T[K];
102
102
  } & {};
103
103
 
104
+ declare type __VLS_Prettify_3<T> = {
105
+ [K in keyof T]: T[K];
106
+ } & {};
107
+
104
108
  declare type __VLS_TypePropsToRuntimeProps<T> = {
105
109
  [K in keyof T]-?: {} extends Pick<T, K> ? {
106
110
  type: PropType<__VLS_NonUndefinedable<T[K]>>;
@@ -158,6 +162,12 @@ declare type __VLS_WithDefaults_2<P, D> = {
158
162
  }> : P[K];
159
163
  };
160
164
 
165
+ declare type __VLS_WithDefaults_3<P, D> = {
166
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_3<P[K] & {
167
+ default: D[K];
168
+ }> : P[K];
169
+ };
170
+
161
171
  declare type __VLS_WithTemplateSlots<T, S> = T & {
162
172
  new (): {
163
173
  $slots: S;
@@ -184,14 +194,14 @@ export declare type AutoCommand = Record<CommandTrigger, Commands>;
184
194
 
185
195
  export declare type BaseComponentStringName = Exclude<Field['component'], RenderComponentType | undefined>;
186
196
 
187
- export declare const BaseField: DefineComponent<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
197
+ export declare const BaseField: DefineComponent<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
188
198
  component: () => VNode<RendererNode, RendererElement, {
189
199
  [key: string]: any;
190
200
  }>;
191
201
  path: string;
192
202
  label: string;
193
203
  getFormItemRef: undefined;
194
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
204
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
195
205
  component: () => VNode<RendererNode, RendererElement, {
196
206
  [key: string]: any;
197
207
  }>;
@@ -206,7 +216,19 @@ export declare const BaseField: DefineComponent<__VLS_WithDefaults_2<__VLS_TypeP
206
216
 
207
217
  export declare type BaseFieldAttrs = FieldAttrsType[keyof FieldAttrsType];
208
218
 
209
- export declare const BaseFormItem: DefineComponent<__VLS_TypePropsToRuntimeProps_2<Props_2>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<Props_2>>>, {}, {}>;
219
+ export declare const BaseFormItem: DefineComponent<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2<Props_2>, {
220
+ grid: undefined;
221
+ path: undefined;
222
+ disabled: undefined;
223
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2<Props_2>, {
224
+ grid: undefined;
225
+ path: undefined;
226
+ disabled: undefined;
227
+ }>>>, {
228
+ path: string;
229
+ disabled: boolean;
230
+ grid: Grid;
231
+ }, {}>;
210
232
 
211
233
  declare type CascaderSlots = FieldSlot<'clearIcon' | 'expandIcon' | 'maxTagPlaceholder' | 'notFoundContent' | 'removeIcon' | 'suffixIcon' | 'tagRender'>;
212
234
 
@@ -1959,8 +1981,6 @@ export declare type ParamCache = {
1959
1981
  set(val: Data | ((v: Data) => Data)): void;
1960
1982
  };
1961
1983
 
1962
- export declare const PARENT_DISABLED: InjectionKey<boolean>;
1963
-
1964
1984
  export declare type PrependField = (path: string | undefined, field: Field) => void;
1965
1985
 
1966
1986
  export declare const PRO_TABLE_INIT_COMPONENT_PROPS_MAP: Map<symbol, {}>;
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
- import { _ as _sfc_main } from "./form/index-1c203895.js";
3
- import { k, B, d, h, C, b, f, F, j, l, I, P, R, e, i, U, g, m, p, n, s, q, u, r, t } from "./form/index-1c203895.js";
2
+ import { _ as _sfc_main } from "./form/index-a8c9e629.js";
3
+ import { k, B, d, h, C, b, f, F, j, l, I, R, e, i, U, g, m, p, n, s, q, u, r, t } from "./form/index-a8c9e629.js";
4
4
  import BaseTable from "./table/index.js";
5
5
  import { PRO_TABLE_INIT_COMPONENT_PROPS_MAP, PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS, useTable } from "./table/index.js";
6
6
  import _sfc_main$1 from "./component-provider/index.js";
@@ -35,7 +35,6 @@ export {
35
35
  j as FunctionRegexp,
36
36
  l as INIT_COMPONENT_PROPS_MAP,
37
37
  I as INJECT_COMPONENT_PROPS_KEYS,
38
- P as PARENT_DISABLED,
39
38
  PRO_TABLE_INIT_COMPONENT_PROPS_MAP,
40
39
  PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS,
41
40
  ProComponentProvider,
package/es/style.css CHANGED
@@ -1,4 +1,4 @@
1
- .field-component[data-v-301c3406] {
1
+ .field-component[data-v-d0695884] {
2
2
  width: 100%;
3
3
  min-width: 120px;
4
4
  }
package/es/table/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, mergeModels, useModel, computed, watch, Fragment, renderList, withModifiers, renderSlot, inject, useAttrs, useSlots, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
2
2
  import { Button, Space, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
3
- import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-1c203895.js";
3
+ import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-a8c9e629.js";
4
4
  var ColumnHeightOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z" } }] }, "name": "column-height", "theme": "outlined" };
5
5
  const ColumnHeightOutlinedSvg = ColumnHeightOutlined$2;
6
6
  function _objectSpread$2(target) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "main": "",