@qin-ui/antd-vue-pro 1.1.17 → 1.1.18
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-7ee4d75c.js → index-e6fc6e90.js} +75 -64
- package/es/form/index.js +12 -14
- package/es/index.d.ts +17 -31
- package/es/index.js +13 -15
- package/es/style.css +1 -1
- package/es/table/index.js +3 -2
- package/package.json +27 -10
|
@@ -15191,7 +15191,7 @@ function getPropByPath(obj, path, strict) {
|
|
|
15191
15191
|
isValid: tempObj && keyArr[i2] in tempObj
|
|
15192
15192
|
};
|
|
15193
15193
|
}
|
|
15194
|
-
function useForm$
|
|
15194
|
+
function useForm$2(modelRef) {
|
|
15195
15195
|
let rulesRef = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ref({});
|
|
15196
15196
|
let options = arguments.length > 2 ? arguments[2] : void 0;
|
|
15197
15197
|
const initialModel = cloneDeep(unref(modelRef));
|
|
@@ -15463,7 +15463,7 @@ const Form = defineComponent({
|
|
|
15463
15463
|
colon: true
|
|
15464
15464
|
}),
|
|
15465
15465
|
Item: FormItem,
|
|
15466
|
-
useForm: useForm$
|
|
15466
|
+
useForm: useForm$2,
|
|
15467
15467
|
// emits: ['finishFailed', 'submit', 'finish', 'validate'],
|
|
15468
15468
|
setup(props, _ref) {
|
|
15469
15469
|
let {
|
|
@@ -15752,8 +15752,6 @@ const FORM_DATA = Symbol("formData");
|
|
|
15752
15752
|
const UPDATE_FORM_DATA = Symbol(
|
|
15753
15753
|
"updateFormData"
|
|
15754
15754
|
);
|
|
15755
|
-
const UPDATE_REFS = Symbol("updateRefs");
|
|
15756
|
-
const GET_REF = Symbol("getRef");
|
|
15757
15755
|
const COMMAND = Symbol("command");
|
|
15758
15756
|
const UPDATE_ACTIVE_PATH = Symbol(
|
|
15759
15757
|
"setActivePath"
|
|
@@ -15795,16 +15793,26 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15795
15793
|
];
|
|
15796
15794
|
const props = __props;
|
|
15797
15795
|
useProviderDisabled(computed(() => props.disabled));
|
|
15798
|
-
const updateRefs = inject(UPDATE_REFS);
|
|
15799
15796
|
const getPath = (field) => {
|
|
15800
15797
|
const path = (field == null ? void 0 : field.name) ?? [props.path, field == null ? void 0 : field.key].filter(Boolean);
|
|
15801
15798
|
return toPath(path).join(".");
|
|
15802
15799
|
};
|
|
15800
|
+
const formItemRefs = ref();
|
|
15803
15801
|
const setFormItemRef = (el, field) => {
|
|
15802
|
+
var _a;
|
|
15804
15803
|
if (!el)
|
|
15805
15804
|
return;
|
|
15806
|
-
|
|
15807
|
-
|
|
15805
|
+
if (((_a = field.getFormItemRef) == null ? void 0 : _a.call(field)) === el)
|
|
15806
|
+
return;
|
|
15807
|
+
Object.assign(field, { getFormItemRef: () => el });
|
|
15808
|
+
};
|
|
15809
|
+
const setComponentRef = (el, field) => {
|
|
15810
|
+
var _a;
|
|
15811
|
+
if (!el)
|
|
15812
|
+
return;
|
|
15813
|
+
if (((_a = field.getComponentRef) == null ? void 0 : _a.call(field)) === el)
|
|
15814
|
+
return;
|
|
15815
|
+
Object.assign(field, { getComponentRef: () => el });
|
|
15808
15816
|
};
|
|
15809
15817
|
const proFormPropKeys = computed(() => {
|
|
15810
15818
|
return [
|
|
@@ -15869,12 +15877,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15869
15877
|
default: withCtx(() => [
|
|
15870
15878
|
createVNode(unref(FormItem$1), mergeProps({ ref_for: true }, withDefault(field), {
|
|
15871
15879
|
ref_for: true,
|
|
15872
|
-
|
|
15880
|
+
ref_key: "formItemRefs",
|
|
15881
|
+
ref: formItemRefs,
|
|
15873
15882
|
class: field.className,
|
|
15874
15883
|
style: field.style,
|
|
15875
15884
|
"hide-feedback": field.hideFeedback,
|
|
15876
15885
|
name: unref(toPath)(getPath(field)),
|
|
15877
|
-
path: getPath(field)
|
|
15886
|
+
path: getPath(field),
|
|
15887
|
+
onVnodeMounted: () => {
|
|
15888
|
+
var _a;
|
|
15889
|
+
return setFormItemRef((_a = formItemRefs.value) == null ? void 0 : _a[index2], field);
|
|
15890
|
+
}
|
|
15878
15891
|
}), createSlots({
|
|
15879
15892
|
default: withCtx(() => [
|
|
15880
15893
|
field.fields ? (openBlock(), createBlock(_component_BaseFormItem, {
|
|
@@ -15890,8 +15903,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15890
15903
|
ref_for: true
|
|
15891
15904
|
}, unref(omitFormItemProps)(field), {
|
|
15892
15905
|
label: field.label,
|
|
15893
|
-
path: getPath(field)
|
|
15894
|
-
|
|
15906
|
+
path: getPath(field),
|
|
15907
|
+
onSetComponentRef: (el) => setComponentRef(el, field),
|
|
15908
|
+
onFieldChange: () => {
|
|
15909
|
+
var _a;
|
|
15910
|
+
return (_a = formItemRefs.value) == null ? void 0 : _a[index2].onFieldChange();
|
|
15911
|
+
},
|
|
15912
|
+
onFieldBlur: () => {
|
|
15913
|
+
var _a;
|
|
15914
|
+
return (_a = formItemRefs.value) == null ? void 0 : _a[index2].onFieldBlur();
|
|
15915
|
+
}
|
|
15916
|
+
}), null, 16, ["label", "path", "onSetComponentRef", "onFieldChange", "onFieldBlur"]))
|
|
15895
15917
|
]),
|
|
15896
15918
|
_: 2
|
|
15897
15919
|
}, [
|
|
@@ -15908,7 +15930,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15908
15930
|
])
|
|
15909
15931
|
};
|
|
15910
15932
|
})
|
|
15911
|
-
]), 1040, ["class", "style", "hide-feedback", "name", "path"])
|
|
15933
|
+
]), 1040, ["class", "style", "hide-feedback", "name", "path", "onVnodeMounted"])
|
|
15912
15934
|
]),
|
|
15913
15935
|
_: 2
|
|
15914
15936
|
}, 1032, ["component", "path"])
|
|
@@ -16047,6 +16069,7 @@ const useFields = (initFields) => {
|
|
|
16047
16069
|
getParentFields
|
|
16048
16070
|
};
|
|
16049
16071
|
};
|
|
16072
|
+
const useFields$1 = useFields;
|
|
16050
16073
|
const useFormData = (initFormData) => {
|
|
16051
16074
|
const formData = ref(initFormData);
|
|
16052
16075
|
const activePath = ref();
|
|
@@ -16082,6 +16105,7 @@ const useFormData = (initFormData) => {
|
|
|
16082
16105
|
};
|
|
16083
16106
|
return { formData, getFormData, setFormData, activePath, setActivePath };
|
|
16084
16107
|
};
|
|
16108
|
+
const useFormData$1 = useFormData;
|
|
16085
16109
|
const useFormRef = () => {
|
|
16086
16110
|
const formRef = ref();
|
|
16087
16111
|
const setFormRef = (val) => {
|
|
@@ -16089,13 +16113,15 @@ const useFormRef = () => {
|
|
|
16089
16113
|
};
|
|
16090
16114
|
return { formRef, setFormRef };
|
|
16091
16115
|
};
|
|
16116
|
+
const useFormRef$1 = useFormRef;
|
|
16092
16117
|
const useForm = (initFormData = {}, initFields = []) => {
|
|
16093
16118
|
return {
|
|
16094
|
-
...useFormData(initFormData),
|
|
16095
|
-
...useFields(initFields),
|
|
16096
|
-
...useFormRef()
|
|
16119
|
+
...useFormData$1(initFormData),
|
|
16120
|
+
...useFields$1(initFields),
|
|
16121
|
+
...useFormRef$1()
|
|
16097
16122
|
};
|
|
16098
16123
|
};
|
|
16124
|
+
const useForm$1 = useForm;
|
|
16099
16125
|
const isFunctionString = (param) => {
|
|
16100
16126
|
FunctionRegexp.lastIndex = 0;
|
|
16101
16127
|
ArrowFunctionRegexp.lastIndex = 0;
|
|
@@ -16212,7 +16238,7 @@ async function validateConditions(conditions, baseParam) {
|
|
|
16212
16238
|
return result;
|
|
16213
16239
|
}
|
|
16214
16240
|
async function runRules(rules2, baseParam) {
|
|
16215
|
-
const { form, run,
|
|
16241
|
+
const { form, run, message: message2, logQueue } = baseParam;
|
|
16216
16242
|
logQueue.push([[`逻辑执行规则: `, ["purple", "indent2"]]]);
|
|
16217
16243
|
for (let ruleIndex = 0; ruleIndex < rules2.length; ruleIndex += 1) {
|
|
16218
16244
|
const rule = rules2[ruleIndex];
|
|
@@ -16351,7 +16377,7 @@ const runCommands = async ({ path, trigger, ...baseParam }) => {
|
|
|
16351
16377
|
]);
|
|
16352
16378
|
}
|
|
16353
16379
|
};
|
|
16354
|
-
const useCommand = (
|
|
16380
|
+
const useCommand = (form) => {
|
|
16355
16381
|
let message$1;
|
|
16356
16382
|
try {
|
|
16357
16383
|
message$1 = message;
|
|
@@ -16365,7 +16391,6 @@ const useCommand = ({ refs, form }) => {
|
|
|
16365
16391
|
path,
|
|
16366
16392
|
trigger,
|
|
16367
16393
|
form,
|
|
16368
|
-
refs,
|
|
16369
16394
|
message: message$1,
|
|
16370
16395
|
run,
|
|
16371
16396
|
logQueue
|
|
@@ -16384,6 +16409,7 @@ const useCommand = ({ refs, form }) => {
|
|
|
16384
16409
|
};
|
|
16385
16410
|
return { run };
|
|
16386
16411
|
};
|
|
16412
|
+
const useCommand$1 = useCommand;
|
|
16387
16413
|
const useInitProps = () => {
|
|
16388
16414
|
const initPropsMap = /* @__PURE__ */ new Map();
|
|
16389
16415
|
INIT_PROPS_MAP.forEach((val, key) => {
|
|
@@ -16400,6 +16426,7 @@ const useInitProps = () => {
|
|
|
16400
16426
|
};
|
|
16401
16427
|
return { getInitProps };
|
|
16402
16428
|
};
|
|
16429
|
+
const useInitProps$1 = useInitProps;
|
|
16403
16430
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
16404
16431
|
...{
|
|
16405
16432
|
name: "BaseField"
|
|
@@ -16410,20 +16437,23 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16410
16437
|
path: { default: "" },
|
|
16411
16438
|
label: { default: "" }
|
|
16412
16439
|
},
|
|
16413
|
-
|
|
16440
|
+
emits: ["setComponentRef", "fieldChange", "fieldBlur"],
|
|
16441
|
+
setup(__props, { emit: __emit }) {
|
|
16414
16442
|
const props = __props;
|
|
16443
|
+
const emit = __emit;
|
|
16415
16444
|
const formData = inject(FORM_DATA);
|
|
16416
16445
|
const updateFormData = inject(UPDATE_FORM_DATA);
|
|
16417
|
-
const updateRefs = inject(UPDATE_REFS);
|
|
16418
|
-
const getRef = inject(GET_REF);
|
|
16419
16446
|
const command = inject(COMMAND);
|
|
16420
16447
|
const updateActivePath = inject(UPDATE_ACTIVE_PATH);
|
|
16421
|
-
const { getInitProps } = useInitProps();
|
|
16422
|
-
const
|
|
16448
|
+
const { getInitProps } = useInitProps$1();
|
|
16449
|
+
const componentRef = ref();
|
|
16450
|
+
const componentMounted = () => {
|
|
16451
|
+
emit("setComponentRef", componentRef.value);
|
|
16452
|
+
};
|
|
16453
|
+
const triggerFormItemChange = () => {
|
|
16423
16454
|
if (typeof props.component === "string" && COMPONENT_MAP.has(props.component))
|
|
16424
16455
|
return;
|
|
16425
|
-
|
|
16426
|
-
formItemRef == null ? void 0 : formItemRef.onFieldChange();
|
|
16456
|
+
emit("fieldChange");
|
|
16427
16457
|
};
|
|
16428
16458
|
const value = computed({
|
|
16429
16459
|
get() {
|
|
@@ -16436,7 +16466,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16436
16466
|
return;
|
|
16437
16467
|
}
|
|
16438
16468
|
updateFormData == null ? void 0 : updateFormData(props.path, val);
|
|
16439
|
-
|
|
16469
|
+
triggerFormItemChange();
|
|
16440
16470
|
}
|
|
16441
16471
|
});
|
|
16442
16472
|
const forceUpdateKey = ref(0);
|
|
@@ -16497,11 +16527,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16497
16527
|
const is = computed(() => {
|
|
16498
16528
|
return COMPONENT_MAP.get(props.component) ?? props.component;
|
|
16499
16529
|
});
|
|
16500
|
-
const setComponentRef = (el) => {
|
|
16501
|
-
if (!el)
|
|
16502
|
-
return;
|
|
16503
|
-
updateRefs == null ? void 0 : updateRefs("fieldRefs", props.path, el);
|
|
16504
|
-
};
|
|
16505
16530
|
function handleFocus(...args) {
|
|
16506
16531
|
var _a;
|
|
16507
16532
|
updateActivePath == null ? void 0 : updateActivePath(props.path);
|
|
@@ -16514,12 +16539,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16514
16539
|
}, {
|
|
16515
16540
|
default: withCtx(() => [
|
|
16516
16541
|
(openBlock(), createBlock(resolveDynamicComponent(is.value), mergeProps({ key: forceUpdateKey.value }, unref(omit$1)(mergedAttrs.value, "componentContainer"), {
|
|
16517
|
-
|
|
16542
|
+
ref_key: "componentRef",
|
|
16543
|
+
ref: componentRef,
|
|
16518
16544
|
[modelName.value]: value.value,
|
|
16519
16545
|
["onUpdate:" + modelName.value]: _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
16520
16546
|
class: [unref(attrs).componentClassName, "field-component"],
|
|
16521
16547
|
style: unref(attrs).componentStyle,
|
|
16522
16548
|
path: _ctx.path,
|
|
16549
|
+
onVnodeMounted: componentMounted,
|
|
16523
16550
|
onFocus: handleFocus
|
|
16524
16551
|
}), createSlots({ _: 2 }, [
|
|
16525
16552
|
renderList(unref(attrs).slots, (slot, name) => {
|
|
@@ -16540,7 +16567,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16540
16567
|
};
|
|
16541
16568
|
}
|
|
16542
16569
|
});
|
|
16543
|
-
const
|
|
16570
|
+
const index_vue_vue_type_style_index_0_scoped_aebf904c_lang = "";
|
|
16544
16571
|
const _export_sfc = (sfc, props) => {
|
|
16545
16572
|
const target = sfc.__vccOpts || sfc;
|
|
16546
16573
|
for (const [key, val] of props) {
|
|
@@ -16548,7 +16575,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
16548
16575
|
}
|
|
16549
16576
|
return target;
|
|
16550
16577
|
};
|
|
16551
|
-
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
16578
|
+
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-aebf904c"]]);
|
|
16552
16579
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
16553
16580
|
...{
|
|
16554
16581
|
name: "ContainerFragment",
|
|
@@ -16605,19 +16632,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16605
16632
|
const injectProps = useInjectProps(INJECT_KEYS["pro-form"]);
|
|
16606
16633
|
const injectAttrs = omit$1(injectProps, Object.keys(props));
|
|
16607
16634
|
const emit = __emit;
|
|
16608
|
-
const refs = {
|
|
16609
|
-
formItemRefs: {},
|
|
16610
|
-
fieldRefs: {}
|
|
16611
|
-
};
|
|
16612
|
-
const updateRefs = (type4, path, childRef) => {
|
|
16613
|
-
if (!path)
|
|
16614
|
-
return;
|
|
16615
|
-
refs[type4][path] = childRef;
|
|
16616
|
-
};
|
|
16617
|
-
const getRef = (type4, path) => {
|
|
16618
|
-
return refs[type4][path];
|
|
16619
|
-
};
|
|
16620
|
-
const exposed = shallowReactive({ refs, getRef });
|
|
16621
16635
|
const updateActivePath = (path) => {
|
|
16622
16636
|
var _a, _b;
|
|
16623
16637
|
if (props.form) {
|
|
@@ -16650,8 +16664,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16650
16664
|
updateActivePath(path);
|
|
16651
16665
|
};
|
|
16652
16666
|
const command = computed(() => {
|
|
16653
|
-
return props.form && !props.autoCommandDisabled ? useCommand(
|
|
16667
|
+
return props.form && !props.autoCommandDisabled ? useCommand$1(props.form) : null;
|
|
16654
16668
|
});
|
|
16669
|
+
const exposed = shallowReactive({});
|
|
16655
16670
|
const formInstanceRef = ref(null);
|
|
16656
16671
|
onMounted(() => {
|
|
16657
16672
|
var _a;
|
|
@@ -16664,8 +16679,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16664
16679
|
});
|
|
16665
16680
|
provide(FORM_DATA, _formData);
|
|
16666
16681
|
provide(UPDATE_FORM_DATA, updateFormData);
|
|
16667
|
-
provide(UPDATE_REFS, updateRefs);
|
|
16668
|
-
provide(GET_REF, getRef);
|
|
16669
16682
|
provide(COMMAND, command);
|
|
16670
16683
|
provide(UPDATE_ACTIVE_PATH, updateActivePath);
|
|
16671
16684
|
__expose(exposed);
|
|
@@ -16693,7 +16706,6 @@ export {
|
|
|
16693
16706
|
BaseField as B,
|
|
16694
16707
|
COMPONENT_MAP as C,
|
|
16695
16708
|
FORM_ITEM_SLOT_KEYS as F,
|
|
16696
|
-
GET_REF as G,
|
|
16697
16709
|
RULE_TYPE_MAP as R,
|
|
16698
16710
|
UPDATE_FORM_DATA as U,
|
|
16699
16711
|
_sfc_main as _,
|
|
@@ -16704,18 +16716,17 @@ export {
|
|
|
16704
16716
|
_sfc_main$1 as e,
|
|
16705
16717
|
FORM_DATA as f,
|
|
16706
16718
|
get$1 as g,
|
|
16707
|
-
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
|
|
16712
|
-
|
|
16713
|
-
|
|
16719
|
+
COMMAND as h,
|
|
16720
|
+
UPDATE_ACTIVE_PATH as i,
|
|
16721
|
+
FunctionRegexp as j,
|
|
16722
|
+
ArrowFunctionRegexp as k,
|
|
16723
|
+
isFunctionString as l,
|
|
16724
|
+
jsonStringifyReplacer as m,
|
|
16725
|
+
jsonParseReviver as n,
|
|
16714
16726
|
omit$1 as o,
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
|
|
16718
|
-
|
|
16719
|
-
|
|
16720
|
-
useForm as u
|
|
16727
|
+
useFields$1 as p,
|
|
16728
|
+
useFormData$1 as q,
|
|
16729
|
+
useCommand$1 as r,
|
|
16730
|
+
useInitProps$1 as s,
|
|
16731
|
+
useForm$1 as u
|
|
16721
16732
|
};
|
package/es/form/index.js
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k, B, d, h, C, b, f, F, j, R, e, i, U, _, l, n, m, r, p, u, q, s } from "./index-e6fc6e90.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "ant-design-vue";
|
|
4
4
|
import "../component-provider/index.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
k as ArrowFunctionRegexp,
|
|
7
7
|
B as BaseField,
|
|
8
8
|
d as BaseFormItem,
|
|
9
|
-
|
|
9
|
+
h as COMMAND,
|
|
10
10
|
C as COMPONENT_MAP,
|
|
11
11
|
b as ContainerFragment,
|
|
12
12
|
f as FORM_DATA,
|
|
13
13
|
F as FORM_ITEM_SLOT_KEYS,
|
|
14
|
-
|
|
15
|
-
G as GET_REF,
|
|
14
|
+
j as FunctionRegexp,
|
|
16
15
|
R as RULE_TYPE_MAP,
|
|
17
16
|
e as SlotComponent,
|
|
18
|
-
|
|
17
|
+
i as UPDATE_ACTIVE_PATH,
|
|
19
18
|
U as UPDATE_FORM_DATA,
|
|
20
|
-
h as UPDATE_REFS,
|
|
21
19
|
_ as default,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
l as isFunctionString,
|
|
21
|
+
n as jsonParseReviver,
|
|
22
|
+
m as jsonStringifyReplacer,
|
|
23
|
+
r as useCommand,
|
|
24
|
+
p as useFields,
|
|
27
25
|
u as useForm,
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
q as useFormData,
|
|
27
|
+
s as useInitProps
|
|
30
28
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -258,14 +258,22 @@ export declare const BaseField: DefineComponent<ExtractPropTypes<__VLS_WithDefau
|
|
|
258
258
|
path: string;
|
|
259
259
|
label: string;
|
|
260
260
|
getFormItemRef: undefined;
|
|
261
|
-
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
261
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
262
|
+
setComponentRef: (el: any) => void;
|
|
263
|
+
fieldChange: () => void;
|
|
264
|
+
fieldBlur: () => void;
|
|
265
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
|
|
262
266
|
component: () => VNode<RendererNode, RendererElement, {
|
|
263
267
|
[key: string]: any;
|
|
264
268
|
}>;
|
|
265
269
|
path: string;
|
|
266
270
|
label: string;
|
|
267
271
|
getFormItemRef: undefined;
|
|
268
|
-
}>>> & Readonly<{
|
|
272
|
+
}>>> & Readonly<{
|
|
273
|
+
onSetComponentRef?: ((el: any) => any) | undefined;
|
|
274
|
+
onFieldChange?: (() => any) | undefined;
|
|
275
|
+
onFieldBlur?: (() => any) | undefined;
|
|
276
|
+
}>, {
|
|
269
277
|
label: SlotComponentType;
|
|
270
278
|
component: "input" | "textarea" | "input-password" | "input-search" | "input-number" | "select" | "cascader" | "date-picker" | "range-picker" | "time-picker" | "checkbox-group" | "radio-group" | "switch" | "slider" | "tree-select" | "transfer" | RenderComponentType | Raw<RenderComponentType>;
|
|
271
279
|
path: string;
|
|
@@ -439,8 +447,6 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTyp
|
|
|
439
447
|
autoCommandDisabled: boolean;
|
|
440
448
|
activePath: undefined;
|
|
441
449
|
}>>, {
|
|
442
|
-
refs: Refs;
|
|
443
|
-
getRef: GetRef;
|
|
444
450
|
resetFields: (name?: NamePath | undefined) => void;
|
|
445
451
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
446
452
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -1274,9 +1280,7 @@ declare interface FormProps extends FormProps_2 {
|
|
|
1274
1280
|
*/
|
|
1275
1281
|
export declare const FunctionRegexp: RegExp;
|
|
1276
1282
|
|
|
1277
|
-
export declare
|
|
1278
|
-
|
|
1279
|
-
export declare type GetField<D extends FormData_2 = FormData_2> = (path?: Path<D>) => Readonly<Field<D>> | undefined;
|
|
1283
|
+
export declare type GetField<D extends FormData_2 = FormData_2> = (path?: Path<D>) => Readonly<WithRefGetter<Field<D>>> | undefined;
|
|
1280
1284
|
|
|
1281
1285
|
export declare type GetFieldPath<D extends FormData_2 = FormData_2> = (path: Path<D>) => string | undefined;
|
|
1282
1286
|
|
|
@@ -1284,11 +1288,6 @@ export declare type GetFormData<D extends FormData_2 = FormData_2> = (path?: Pat
|
|
|
1284
1288
|
|
|
1285
1289
|
export declare type GetParentFields<D extends FormData_2 = FormData_2> = (path: Path<D>) => Fields<D> | undefined;
|
|
1286
1290
|
|
|
1287
|
-
export declare type GetRef = {
|
|
1288
|
-
(type: 'formItemRefs', path: string): FormItemInstance;
|
|
1289
|
-
(type: 'fieldRefs', path: string): any;
|
|
1290
|
-
};
|
|
1291
|
-
|
|
1292
1291
|
export declare type Grid = boolean | RowProps;
|
|
1293
1292
|
|
|
1294
1293
|
export declare const INIT_PROPS_MAP: Map<symbol, {
|
|
@@ -2037,8 +2036,6 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
2037
2036
|
"onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
2038
2037
|
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
2039
2038
|
}>, {
|
|
2040
|
-
refs: Refs;
|
|
2041
|
-
getRef: GetRef;
|
|
2042
2039
|
resetFields: (name?: NamePath | undefined) => void;
|
|
2043
2040
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
2044
2041
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -2237,8 +2234,6 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
2237
2234
|
"onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
2238
2235
|
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
2239
2236
|
}>, {
|
|
2240
|
-
refs: Refs;
|
|
2241
|
-
getRef: GetRef;
|
|
2242
2237
|
resetFields: (name?: NamePath | undefined) => void;
|
|
2243
2238
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
2244
2239
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -2431,8 +2426,6 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
2431
2426
|
"onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
2432
2427
|
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
2433
2428
|
}>, {
|
|
2434
|
-
refs: Refs;
|
|
2435
|
-
getRef: GetRef;
|
|
2436
2429
|
resetFields: (name?: NamePath | undefined) => void;
|
|
2437
2430
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
2438
2431
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -5529,11 +5522,6 @@ export declare type ProTableProps = ProTableInstance['$props'];
|
|
|
5529
5522
|
|
|
5530
5523
|
declare type RangePickerSlots = FieldSlot<'dateRender' | 'renderExtraFooter' | 'separator'>;
|
|
5531
5524
|
|
|
5532
|
-
export declare type Refs = {
|
|
5533
|
-
formItemRefs: Record<string, FormItemInstance>;
|
|
5534
|
-
fieldRefs: Record<string, any>;
|
|
5535
|
-
};
|
|
5536
|
-
|
|
5537
5525
|
/**
|
|
5538
5526
|
* @description 自定义组件
|
|
5539
5527
|
* @example (p, ctx) => h('div', ctx.attrs)
|
|
@@ -5596,8 +5584,6 @@ export declare const UPDATE_ACTIVE_PATH: InjectionKey<SetActivePath>;
|
|
|
5596
5584
|
|
|
5597
5585
|
export declare const UPDATE_FORM_DATA: InjectionKey<UpdateFormData>;
|
|
5598
5586
|
|
|
5599
|
-
export declare const UPDATE_REFS: InjectionKey<UpdateRefs>;
|
|
5600
|
-
|
|
5601
5587
|
export declare type UpdateFieldOptions = {
|
|
5602
5588
|
/**
|
|
5603
5589
|
* 更新所有符合条件的字段,默认false(仅更新第一个)
|
|
@@ -5607,12 +5593,7 @@ export declare type UpdateFieldOptions = {
|
|
|
5607
5593
|
|
|
5608
5594
|
export declare type UpdateFormData = (path: string, value: any) => void;
|
|
5609
5595
|
|
|
5610
|
-
export declare type
|
|
5611
|
-
|
|
5612
|
-
export declare type UseCommand = (param: {
|
|
5613
|
-
refs: Refs;
|
|
5614
|
-
form: Form;
|
|
5615
|
-
}) => {
|
|
5596
|
+
export declare type UseCommand = (form: Form) => {
|
|
5616
5597
|
run: (path: string, trigger: CommandTrigger) => void;
|
|
5617
5598
|
};
|
|
5618
5599
|
|
|
@@ -5704,4 +5685,9 @@ declare type VModelProps<T = any> = {
|
|
|
5704
5685
|
'onUpdate:value'?: (val: T) => void;
|
|
5705
5686
|
};
|
|
5706
5687
|
|
|
5688
|
+
export declare type WithRefGetter<T> = T & {
|
|
5689
|
+
getFormItemRef?: () => FormItemInstance;
|
|
5690
|
+
getComponentRef?: () => any;
|
|
5691
|
+
};
|
|
5692
|
+
|
|
5707
5693
|
export { }
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as _sfc_main } from "./form/index-
|
|
3
|
-
import {
|
|
2
|
+
import { _ as _sfc_main } from "./form/index-e6fc6e90.js";
|
|
3
|
+
import { k, B, d, h, C, b, f, F, j, R, e, i, U, l, n, m, r, p, u, q, s } from "./form/index-e6fc6e90.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";
|
|
@@ -25,16 +25,15 @@ const index = {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
k as ArrowFunctionRegexp,
|
|
29
29
|
B as BaseField,
|
|
30
30
|
d as BaseFormItem,
|
|
31
|
-
|
|
31
|
+
h as COMMAND,
|
|
32
32
|
C as COMPONENT_MAP,
|
|
33
33
|
b as ContainerFragment,
|
|
34
34
|
f as FORM_DATA,
|
|
35
35
|
F as FORM_ITEM_SLOT_KEYS,
|
|
36
|
-
|
|
37
|
-
G as GET_REF,
|
|
36
|
+
j as FunctionRegexp,
|
|
38
37
|
INIT_PROPS_MAP,
|
|
39
38
|
INJECT_KEYS,
|
|
40
39
|
ProComponentProvider,
|
|
@@ -42,18 +41,17 @@ export {
|
|
|
42
41
|
ProTable,
|
|
43
42
|
R as RULE_TYPE_MAP,
|
|
44
43
|
e as SlotComponent,
|
|
45
|
-
|
|
44
|
+
i as UPDATE_ACTIVE_PATH,
|
|
46
45
|
U as UPDATE_FORM_DATA,
|
|
47
|
-
h as UPDATE_REFS,
|
|
48
46
|
index as default,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
l as isFunctionString,
|
|
48
|
+
n as jsonParseReviver,
|
|
49
|
+
m as jsonStringifyReplacer,
|
|
50
|
+
r as useCommand,
|
|
51
|
+
p as useFields,
|
|
54
52
|
u as useForm,
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
q as useFormData,
|
|
54
|
+
s as useInitProps,
|
|
57
55
|
useInjectProps,
|
|
58
56
|
useProviderProps,
|
|
59
57
|
useTable
|
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-e6fc6e90.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) {
|
|
@@ -670,7 +670,8 @@ const useTable = ({
|
|
|
670
670
|
resetQueryParams
|
|
671
671
|
};
|
|
672
672
|
};
|
|
673
|
+
const useTable$1 = useTable;
|
|
673
674
|
export {
|
|
674
675
|
BaseTable as default,
|
|
675
|
-
useTable
|
|
676
|
+
useTable$1 as useTable
|
|
676
677
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qin-ui/antd-vue-pro",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.18",
|
|
4
4
|
"description": "二次封装antd vue组件",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "",
|
|
6
|
+
"main": "es/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
8
8
|
"types": "es/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
|
-
"es"
|
|
10
|
+
"es",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
11
13
|
],
|
|
12
14
|
"homepage": "https://github.com/dufan3715/pro-components.git",
|
|
13
15
|
"repository": {
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
"scripts": {
|
|
18
20
|
"build": "vue-tsc && vite build"
|
|
19
21
|
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"vue",
|
|
22
|
-
"ant-design-vue",
|
|
23
|
-
"antd-vue-pro",
|
|
24
|
-
"form components"
|
|
25
|
-
],
|
|
26
22
|
"author": "dufan3715",
|
|
27
23
|
"license": "MIT",
|
|
28
24
|
"private": false,
|
|
@@ -35,8 +31,29 @@
|
|
|
35
31
|
},
|
|
36
32
|
"devDependencies": {
|
|
37
33
|
"@ant-design/icons-vue": "^7.0.1",
|
|
34
|
+
"@types/lodash-es": "^4.17.12",
|
|
38
35
|
"ant-design-vue": "^4.2.5",
|
|
39
36
|
"lodash-es": "^4.17.21",
|
|
40
37
|
"vue": "^3.5.12"
|
|
41
|
-
}
|
|
38
|
+
},
|
|
39
|
+
"sideEffects": false,
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"registry": "https://registry.npmjs.org/"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=16"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"vue",
|
|
49
|
+
"antd",
|
|
50
|
+
"ant-design-vue",
|
|
51
|
+
"antd-vue-pro",
|
|
52
|
+
"pro-components",
|
|
53
|
+
"ui",
|
|
54
|
+
"form",
|
|
55
|
+
"table",
|
|
56
|
+
"pro-form",
|
|
57
|
+
"pro-table"
|
|
58
|
+
]
|
|
42
59
|
}
|