@qin-ui/antd-vue-pro 1.1.1 → 1.1.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.
- package/es/form/{index-1e0c8f68.js → index-6f2704d5.js} +61 -40
- package/es/form/index.js +1 -1
- package/es/index.d.ts +4 -0
- package/es/index.js +2 -2
- package/es/style.css +1 -1
- package/es/table/index.js +1 -1
- package/package.json +1 -1
|
@@ -676,10 +676,10 @@ MapCache.prototype["delete"] = mapCacheDelete;
|
|
|
676
676
|
MapCache.prototype.get = mapCacheGet;
|
|
677
677
|
MapCache.prototype.has = mapCacheHas;
|
|
678
678
|
MapCache.prototype.set = mapCacheSet;
|
|
679
|
-
var FUNC_ERROR_TEXT$
|
|
679
|
+
var FUNC_ERROR_TEXT$2 = "Expected a function";
|
|
680
680
|
function memoize(func, resolver) {
|
|
681
681
|
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
682
|
-
throw new TypeError(FUNC_ERROR_TEXT$
|
|
682
|
+
throw new TypeError(FUNC_ERROR_TEXT$2);
|
|
683
683
|
}
|
|
684
684
|
var memoized = function() {
|
|
685
685
|
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
@@ -1477,12 +1477,12 @@ var now = function() {
|
|
|
1477
1477
|
return root$1.Date.now();
|
|
1478
1478
|
};
|
|
1479
1479
|
const now$1 = now;
|
|
1480
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1480
|
+
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
1481
1481
|
var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
|
|
1482
1482
|
function debounce(func, wait, options) {
|
|
1483
1483
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
1484
1484
|
if (typeof func != "function") {
|
|
1485
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1485
|
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
1486
1486
|
}
|
|
1487
1487
|
wait = toNumber(wait) || 0;
|
|
1488
1488
|
if (isObject$2(options)) {
|
|
@@ -1651,6 +1651,26 @@ function parent(object4, path) {
|
|
|
1651
1651
|
function isEqual(value, other) {
|
|
1652
1652
|
return baseIsEqual(value, other);
|
|
1653
1653
|
}
|
|
1654
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1655
|
+
function negate(predicate) {
|
|
1656
|
+
if (typeof predicate != "function") {
|
|
1657
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1658
|
+
}
|
|
1659
|
+
return function() {
|
|
1660
|
+
var args = arguments;
|
|
1661
|
+
switch (args.length) {
|
|
1662
|
+
case 0:
|
|
1663
|
+
return !predicate.call(this);
|
|
1664
|
+
case 1:
|
|
1665
|
+
return !predicate.call(this, args[0]);
|
|
1666
|
+
case 2:
|
|
1667
|
+
return !predicate.call(this, args[0], args[1]);
|
|
1668
|
+
case 3:
|
|
1669
|
+
return !predicate.call(this, args[0], args[1], args[2]);
|
|
1670
|
+
}
|
|
1671
|
+
return !predicate.apply(this, args);
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1654
1674
|
function baseUnset(object4, path) {
|
|
1655
1675
|
path = castPath(path, object4);
|
|
1656
1676
|
object4 = parent(object4, path);
|
|
@@ -1715,6 +1735,21 @@ function basePickBy(object4, paths, predicate) {
|
|
|
1715
1735
|
}
|
|
1716
1736
|
return result;
|
|
1717
1737
|
}
|
|
1738
|
+
function pickBy(object4, predicate) {
|
|
1739
|
+
if (object4 == null) {
|
|
1740
|
+
return {};
|
|
1741
|
+
}
|
|
1742
|
+
var props = arrayMap(getAllKeysIn(object4), function(prop) {
|
|
1743
|
+
return [prop];
|
|
1744
|
+
});
|
|
1745
|
+
predicate = baseIteratee(predicate);
|
|
1746
|
+
return basePickBy(object4, props, function(value, path) {
|
|
1747
|
+
return predicate(value, path[0]);
|
|
1748
|
+
});
|
|
1749
|
+
}
|
|
1750
|
+
function omitBy(object4, predicate) {
|
|
1751
|
+
return pickBy(object4, negate(baseIteratee(predicate)));
|
|
1752
|
+
}
|
|
1718
1753
|
function basePick(object4, paths) {
|
|
1719
1754
|
return basePickBy(object4, paths, function(value, path) {
|
|
1720
1755
|
return hasIn(object4, path);
|
|
@@ -15745,13 +15780,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15745
15780
|
useProviderDisabled(ref(props.disabled));
|
|
15746
15781
|
const updateRefs = inject(UPDATE_REFS);
|
|
15747
15782
|
const getPath = (fieldKey) => {
|
|
15748
|
-
|
|
15749
|
-
if (fieldKey) {
|
|
15750
|
-
return `${props.path}.${fieldKey}`;
|
|
15751
|
-
}
|
|
15752
|
-
return props.path;
|
|
15753
|
-
}
|
|
15754
|
-
return fieldKey || "";
|
|
15783
|
+
return [props.path, fieldKey].filter(Boolean).join(".");
|
|
15755
15784
|
};
|
|
15756
15785
|
const setFormItemRef = (el, field) => {
|
|
15757
15786
|
if (!el)
|
|
@@ -15767,53 +15796,44 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15767
15796
|
];
|
|
15768
15797
|
});
|
|
15769
15798
|
const withDefault = (field) => {
|
|
15770
|
-
const baseFormItemProps =
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
delete baseFormItemProps.className;
|
|
15799
|
+
const baseFormItemProps = pickBy(
|
|
15800
|
+
field,
|
|
15801
|
+
(v2, k2) => formItemPropKeys.includes(k2) || k2.startsWith("data-form-item")
|
|
15802
|
+
);
|
|
15775
15803
|
const defaultProps = {
|
|
15776
|
-
validateFirst: true
|
|
15804
|
+
validateFirst: true,
|
|
15805
|
+
showFeedback: !field.fields
|
|
15777
15806
|
};
|
|
15778
|
-
if (field.fields) {
|
|
15779
|
-
Object.assign(defaultProps, {
|
|
15780
|
-
showFeedback: false
|
|
15781
|
-
});
|
|
15782
|
-
}
|
|
15783
15807
|
return {
|
|
15784
15808
|
...defaultProps,
|
|
15785
|
-
...baseFormItemProps
|
|
15786
|
-
container: void 0
|
|
15809
|
+
...baseFormItemProps
|
|
15787
15810
|
};
|
|
15788
15811
|
};
|
|
15789
15812
|
const omitFormItemProps = memoize((field) => {
|
|
15790
|
-
return
|
|
15813
|
+
return omitBy(
|
|
15814
|
+
field,
|
|
15815
|
+
(v2, k2) => proFormPropKeys.value.includes(k2) || k2.startsWith("data-form-item")
|
|
15816
|
+
);
|
|
15791
15817
|
});
|
|
15792
|
-
const defaultGrid = {
|
|
15793
|
-
gutter: 24
|
|
15794
|
-
};
|
|
15795
15818
|
const withDefaultGrid = computed(() => {
|
|
15796
15819
|
if (props.grid) {
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
}
|
|
15800
|
-
return { ...defaultGrid, ...props.grid };
|
|
15820
|
+
const defaultGrid = { gutter: 24 };
|
|
15821
|
+
return props.grid === true ? defaultGrid : { ...defaultGrid, ...props.grid };
|
|
15801
15822
|
}
|
|
15802
|
-
return
|
|
15823
|
+
return props.grid;
|
|
15803
15824
|
});
|
|
15804
15825
|
const withDefaultGridItem = memoize((field) => {
|
|
15805
|
-
const defaultSpan = field.fields ? 24 : 8;
|
|
15806
15826
|
const fieldGridItemProps = pick$1(field, gridItemPropKeys);
|
|
15807
15827
|
return {
|
|
15808
|
-
|
|
15809
|
-
|
|
15828
|
+
span: field.fields ? 24 : 8,
|
|
15829
|
+
...fieldGridItemProps
|
|
15810
15830
|
};
|
|
15811
15831
|
});
|
|
15812
15832
|
return (_ctx, _cache) => {
|
|
15813
15833
|
const _component_BaseFormItem = resolveComponent("BaseFormItem");
|
|
15814
15834
|
return openBlock(), createBlock(unref(_sfc_main$2), mergeProps({
|
|
15815
15835
|
component: _ctx.grid ? unref(Row$1) : void 0
|
|
15816
|
-
},
|
|
15836
|
+
}, withDefaultGrid.value), {
|
|
15817
15837
|
default: withCtx(() => [
|
|
15818
15838
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fields, (field, index2) => {
|
|
15819
15839
|
return openBlock(), createElementBlock(Fragment, {
|
|
@@ -16408,7 +16428,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16408
16428
|
...attrs,
|
|
16409
16429
|
...methods,
|
|
16410
16430
|
onFocus: void 0,
|
|
16411
|
-
disabled: attrs.disabled ?? parentDisabled.value ?? initProps.disabled
|
|
16431
|
+
disabled: attrs.disabled ?? parentDisabled.value ?? initProps.disabled,
|
|
16432
|
+
slots: void 0
|
|
16412
16433
|
};
|
|
16413
16434
|
});
|
|
16414
16435
|
const is = computed(() => {
|
|
@@ -16463,7 +16484,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16463
16484
|
};
|
|
16464
16485
|
}
|
|
16465
16486
|
});
|
|
16466
|
-
const
|
|
16487
|
+
const index_vue_vue_type_style_index_0_scoped_b22e2d2e_lang = "";
|
|
16467
16488
|
const _export_sfc = (sfc, props) => {
|
|
16468
16489
|
const target = sfc.__vccOpts || sfc;
|
|
16469
16490
|
for (const [key, val] of props) {
|
|
@@ -16471,7 +16492,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
16471
16492
|
}
|
|
16472
16493
|
return target;
|
|
16473
16494
|
};
|
|
16474
|
-
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
16495
|
+
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b22e2d2e"]]);
|
|
16475
16496
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
16476
16497
|
...{
|
|
16477
16498
|
name: "ContainerFragment",
|
package/es/form/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-6f2704d5.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "ant-design-vue";
|
|
4
4
|
import "../component-provider/index.js";
|
package/es/index.d.ts
CHANGED
|
@@ -304,6 +304,10 @@ 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
|
+
/** 以data-form-item-开头的属性将会被渲染至formItem的dom节点 */
|
|
308
|
+
[key: `data-form-item-${string}`]: string;
|
|
309
|
+
/** 以data-component-开头的属性将会被渲染至component的dom节点 */
|
|
310
|
+
[key: `data-component-${string}`]: string;
|
|
307
311
|
}
|
|
308
312
|
|
|
309
313
|
export declare const COMPONENT_MAP: Map<BaseComponentStringName, Component>;
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as _sfc_main } from "./form/index-
|
|
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-
|
|
2
|
+
import { _ as _sfc_main } from "./form/index-6f2704d5.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-6f2704d5.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";
|
package/es/style.css
CHANGED
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-
|
|
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-6f2704d5.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) {
|