@qin-ui/antd-vue-pro 1.1.6 → 1.1.8

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.
package/README.md CHANGED
@@ -183,6 +183,12 @@ ant-design-vue ui组件库form组件的二次封装
183
183
  * @example (val) => val?.trim()
184
184
  */
185
185
  valueFormatter?: (val: any) => any;
186
+ /** 是否隐藏校验错误信息(需要浏览器支持has选择器) */
187
+ hideFeedback?: boolean;
188
+ /** 以data-form-item-开头的属性将会被渲染至formItem的dom节点 */
189
+ [key: `data-form-item-${string}`]: string;
190
+ /** 以data-component-开头的属性将会被渲染至component的dom节点 */
191
+ [key: `data-component-${string}`]: string;
186
192
  }
187
193
  ```
188
194
 
@@ -241,6 +247,15 @@ ant-design-vue ui组件库form组件的二次封装
241
247
  /** 设置当前正在编辑的字段path */
242
248
  setActivePath: SetActivePath;
243
249
  };
250
+
251
+ /**
252
+ * @description useFormRef hook
253
+ * @returns {Object}
254
+ */
255
+ type UseFormRef = () => {
256
+ /** 表单组件实例引用Ref */
257
+ formRef: Ref<ProFormInstance | undefined>;
258
+ };
244
259
  ```
245
260
 
246
261
 
@@ -15774,7 +15774,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15774
15774
  "style",
15775
15775
  "className",
15776
15776
  "hidden",
15777
- "container"
15777
+ "container",
15778
+ "hideFeedback"
15778
15779
  ];
15779
15780
  const props = __props;
15780
15781
  useProviderDisabled(ref(props.disabled));
@@ -15801,8 +15802,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15801
15802
  (v2, k2) => formItemPropKeys.includes(k2) || k2.startsWith("data-form-item")
15802
15803
  );
15803
15804
  const defaultProps = {
15804
- validateFirst: true,
15805
- hideFeedback: !!field.fields
15805
+ validateFirst: true
15806
15806
  };
15807
15807
  return {
15808
15808
  ...defaultProps,
@@ -15851,6 +15851,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15851
15851
  ref: (el) => setFormItemRef(el, field),
15852
15852
  class: field.className,
15853
15853
  style: field.style,
15854
+ "hide-feedback": field.hideFeedback,
15854
15855
  name: _ctx.path ? unref(toPath)(getPath(field.key)) : getPath(field.key),
15855
15856
  path: getPath(field.key)
15856
15857
  }), createSlots({
@@ -15878,7 +15879,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15878
15879
  ])
15879
15880
  };
15880
15881
  })
15881
- ]), 1040, ["class", "style", "name", "path"])
15882
+ ]), 1040, ["class", "style", "hide-feedback", "name", "path"])
15882
15883
  ]),
15883
15884
  _: 2
15884
15885
  }, 1032, ["component", "path"])
@@ -15893,15 +15894,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
15893
15894
  };
15894
15895
  }
15895
15896
  });
15896
- const index_vue_vue_type_style_index_0_scoped_a4fb5eae_lang = "";
15897
- const _export_sfc = (sfc, props) => {
15898
- const target = sfc.__vccOpts || sfc;
15899
- for (const [key, val] of props) {
15900
- target[key] = val;
15901
- }
15902
- return target;
15903
- };
15904
- const BaseFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-a4fb5eae"]]);
15897
+ const index_vue_vue_type_style_index_0_lang = "";
15905
15898
  const generateFieldMap = (fields, prePath = "", preFieldPath = "", fieldMap = {}) => {
15906
15899
  fields.forEach((field, index2) => {
15907
15900
  let path;
@@ -16499,6 +16492,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
16499
16492
  }
16500
16493
  });
16501
16494
  const index_vue_vue_type_style_index_0_scoped_060ffbee_lang = "";
16495
+ const _export_sfc = (sfc, props) => {
16496
+ const target = sfc.__vccOpts || sfc;
16497
+ for (const [key, val] of props) {
16498
+ target[key] = val;
16499
+ }
16500
+ return target;
16501
+ };
16502
16502
  const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-060ffbee"]]);
16503
16503
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
16504
16504
  ...{
@@ -16620,7 +16620,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16620
16620
  model: _formData.value
16621
16621
  }, { ...unref(injectAttrs), ..._ctx.$attrs }), {
16622
16622
  default: withCtx(() => [
16623
- createVNode(unref(BaseFormItem), {
16623
+ createVNode(unref(_sfc_main$4), {
16624
16624
  fields: _fields.value,
16625
16625
  grid: _ctx.grid,
16626
16626
  disabled: _ctx.$attrs.disabled
@@ -16634,7 +16634,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16634
16634
  });
16635
16635
  export {
16636
16636
  AntdIcon as A,
16637
- BaseFormItem as B,
16637
+ BaseField as B,
16638
16638
  COMPONENT_MAP as C,
16639
16639
  FORM_ITEM_SLOT_KEYS as F,
16640
16640
  RULE_TYPE_MAP as R,
@@ -16643,7 +16643,7 @@ export {
16643
16643
  _export_sfc as a,
16644
16644
  _sfc_main$2 as b,
16645
16645
  cloneDeep as c,
16646
- BaseField as d,
16646
+ _sfc_main$4 as d,
16647
16647
  _sfc_main$1 as e,
16648
16648
  FORM_DATA as f,
16649
16649
  get$1 as g,
package/es/form/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { l, d, B, i, C, b, f, F, k, R, e, j, U, h, _, m, p, n, s, q, u, r, t } from "./index-a3649324.js";
1
+ import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, _, m, p, n, s, q, u, r, t } from "./index-a8e0c5c2.js";
2
2
  import "vue";
3
3
  import "ant-design-vue";
4
4
  import "../component-provider/index.js";
5
5
  export {
6
6
  l as ArrowFunctionRegexp,
7
- d as BaseField,
8
- B as BaseFormItem,
7
+ B as BaseField,
8
+ d as BaseFormItem,
9
9
  i as COMMAND,
10
10
  C as COMPONENT_MAP,
11
11
  b as ContainerFragment,
package/es/index.d.ts CHANGED
@@ -304,7 +304,7 @@ export declare interface Common<D extends FormData_2 = FormData_2> {
304
304
  * @example (val) => val?.trim()
305
305
  */
306
306
  valueFormatter?: (val: any) => any;
307
- /** 是否隐藏校验错误信息 */
307
+ /** 是否隐藏校验错误信息(需要浏览器支持has选择器) */
308
308
  hideFeedback?: boolean;
309
309
  /** 以data-form-item-开头的属性将会被渲染至formItem的dom节点 */
310
310
  [key: `data-form-item-${string}`]: string;
@@ -6148,9 +6148,9 @@ export declare type UseTable<T extends Data = Data> = <D extends T = T>(init: Pa
6148
6148
 
6149
6149
  export declare const useTable: UseTable;
6150
6150
 
6151
- declare type VModelProps = {
6152
- value?: unknown;
6153
- 'onUpdate:value'?: (val: unknown) => void;
6151
+ declare type VModelProps<T = any> = {
6152
+ value?: T;
6153
+ 'onUpdate:value'?: (val: T) => void;
6154
6154
  };
6155
6155
 
6156
6156
  export { }
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
- import { _ as _sfc_main } from "./form/index-a3649324.js";
3
- import { l, d, B, i, C, b, f, F, k, R, e, j, U, h, m, p, n, s, q, u, r, t } from "./form/index-a3649324.js";
2
+ import { _ as _sfc_main } from "./form/index-a8e0c5c2.js";
3
+ import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, m, p, n, s, q, u, r, t } from "./form/index-a8e0c5c2.js";
4
4
  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";
@@ -26,8 +26,8 @@ const index = {
26
26
  };
27
27
  export {
28
28
  l as ArrowFunctionRegexp,
29
- d as BaseField,
30
- B as BaseFormItem,
29
+ B as BaseField,
30
+ d as BaseFormItem,
31
31
  i as COMMAND,
32
32
  C as COMPONENT_MAP,
33
33
  b as ContainerFragment,
package/es/style.css CHANGED
@@ -1,4 +1,4 @@
1
- [data-v-a4fb5eae] .ant-form-item > [hideFeedback='true'] {
1
+ .ant-form-item:has(> [hide-feedback='true']) {
2
2
  margin-bottom: 0;
3
3
  }
4
4
  .field-component[data-v-060ffbee]:not(.ant-switch) {
package/es/table/index.js CHANGED
@@ -1,7 +1,7 @@
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, 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
3
  import { useInjectProps, INJECT_KEYS } from "../component-provider/index.js";
4
- import { A as AntdIcon, _ as _sfc_main$6, g as get, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-a3649324.js";
4
+ import { A as AntdIcon, _ as _sfc_main$6, g as get, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-a8e0c5c2.js";
5
5
  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" };
6
6
  const ColumnHeightOutlinedSvg = ColumnHeightOutlined$2;
7
7
  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.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "main": "",